Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerberos support #1025 #1030

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

blueshift-brasil
Copy link
Contributor

Applying the contribution of @muschneider. We are working in a kerberized cluster where we tested this code. I'll try provide a docker with Kerberos to test this feature.

@@ -48,6 +48,22 @@

// Client properties
private static final String CLIENT_PREFIX = FLUO_PREFIX + ".client";

/**
* @since 1.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 1.3.0

/**
* @since 1.2.0
*/
public static final String CLIENT_KERBEROS = CLIENT_PREFIX + ".kerberos";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only used for HDFS and not for zookeeper or accumulo, I think the prop name should be CLIENT_HDFS_KERBEROS = CLIENT_PREFIX + ".hdfs.kerberos"

Copy link
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of the Hadoop code bleeding into Fluo's tooling.

If there's any way we can avoid putting UGI stuff in Fluo, and instead be a bit more passive, I think I'd prefer that... but I don't know how much support UGI has for passive configuration without the calling application being explicitly aware of the Kerberos settings.

Ideally, UGI would respect standard Kerberos environment variables, or more likely, standard JAAS configuration, and the user can simply set up the appropriate Kerberos environment that the HDFS client library will use... without us needing to provide any explicit configuration for it to pass through.

* @param keytab Keytab path.
* @since 1.3.0
*/
public void loginWithKerberos(final String realm, final String keytab) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this only enables authentication to HDFS using HDFS client-side authentication features. The name should indicate hdfsLoginWithKerberos or some other indication. At the very least, the Javadoc should indicate that this is HDFS authentication.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we notice, just the jar copy process demanded kerberos authentication. All other components were able to retrieve the tokens from environment. But I agree with you. Fluo should work using the environment authentication.

I'll try other approaches. For while if someone want to use Fluo on kerberos this could help.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting. I'm surprised other components worked from the environment, but this did not. I wonder why. Did you try fluo-yarn? Also, do you know if this change allows it to work with Accumulo with Kerberos tokens? Or did you only try Accumulo using regular PasswordTokens?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possible way to fix this would be to ensure we use hadoop config from the classpath and document that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Our Accumulo is kerberized too. We have no problem with. We didn’t tried fluo-yarn yet on this environment. We can try.

@keith-turner
Copy link
Contributor

It seems like a user should be able to do the following with the current code. If this does not work, need to determine why.

kinit user@realm
fluo init app fluo-app.properties
kdestroy

http://dewoods.com/blog/hadoop-kerberos-guide

@alancamillo
Copy link

I'm back! I'm going to check if this is enough. Sorry by the delay!

@kennethmcfarland
Copy link
Contributor

kennethmcfarland commented Jul 10, 2018 via email

@keith-turner
Copy link
Contributor

I'm back!

glad to hear it.

@ctubbsii ctubbsii changed the base branch from master to main August 11, 2020 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants