-
Notifications
You must be signed in to change notification settings - Fork 54
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
Patches #3
Patches #3
Conversation
I cannot think of a better way to handle this. |
libhdfs3/src/rpc/RpcChannel.cpp
Outdated
@@ -761,8 +761,8 @@ void RpcChannelImpl::buildConnectionContext( | |||
std::string euser = key.getAuth().getUser().getEffectiveUser(); | |||
std::string ruser = key.getAuth().getUser().getRealUser(); | |||
|
|||
if (!key.getAuth().getUser().hasEffectiveUser()) | |||
euser = principal; | |||
if (!euser.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this change is correct. There is also still a call down below.
I played around with this a little today. I think this works if real and effective are both "user" but fails if effective is "user@DOMAIN" , even though that will get mapped to user also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think behavior we want is:
1 Kerberos or simple, set effective to the effective user name if set, otherwise real. (for kerberos we get the real user name from the ticket).
2 For simple, if there is also a real user, set that.
This is a bit complicated, because I think in the UGI, real user name can be the effective user name and getUser is the original principal, so it won't match up to Java code exactly.
@bdrosen96 , do you think there is a better way to do this than to walk through the patches one-by-one like this? Having based the repo on HAWQ, I don't know how a I could cherry-pick or otherwise apply your changes.