[ 
https://issues.apache.org/jira/browse/HADOOP-9852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13733670#comment-13733670
 ] 

Daryn Sharp commented on HADOOP-9852:
-------------------------------------

A side-effect of this hacky swapping of the static keytab/principal results in 
an unintended bug.  Invoking reloginFromKeytab on the UGI returned by 
loginUserFromKeytabAndReturnUGI will relogin with the login user's 
keytab/principal!  The UGI thinks it's the original principal but has a TGT for 
the current login user.

The UGI should remember it's login conf to ensure it will relogin as the 
correct principal, and to allow desynch'ing more methods.
                
> UGI login user keytab and principal should not be static
> --------------------------------------------------------
>
>                 Key: HADOOP-9852
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9852
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: security
>    Affects Versions: 2.0.0-alpha, 3.0.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>
> The static keytab and principal for the login user is problematic.  The login 
> conf explicitly references these statics.  As a result, 
> loginUserFromKeytabAndReturnUGI is unnecessarily synch'ed on the class to 
> swap out the login user's keytab and principal, login, then restore the 
> keytab/principal.  This method's synch blocks further de-synching of other 
> methods.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to