hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabhu Joseph (Jira)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-17121) UGI Credentials#addToken silently overrides the token with same service name
Date Thu, 09 Jul 2020 12:45:00 GMT
Prabhu Joseph created HADOOP-17121:
--------------------------------------

             Summary: UGI Credentials#addToken silently overrides the token with same service
name
                 Key: HADOOP-17121
                 URL: https://issues.apache.org/jira/browse/HADOOP-17121
             Project: Hadoop Common
          Issue Type: Bug
            Reporter: Prabhu Joseph


UGI Credentials#addToken silently overrides the token with same service name.

{code:java}
public void addToken(Text alias, Token<? extends TokenIdentifier> t) {
  if (t == null) {
    LOG.warn("Null token ignored for " + alias);
  } else if (tokenMap.put(alias, t) != null) {
    // Update private tokens
    Map<Text, Token<? extends TokenIdentifier>> tokensToAdd =
        new HashMap<>();
    for (Map.Entry<Text, Token<? extends TokenIdentifier>> e :
        tokenMap.entrySet()) {
      Token<? extends TokenIdentifier> token = e.getValue();
      if (token.isPrivateCloneOf(alias)) {
        tokensToAdd.put(e.getKey(), t.privateClone(token.getService()));
      }
    }
    tokenMap.putAll(tokensToAdd);
  }
} 
{code}
 
There are tokens which does not have service name like YARN_AM_RM_TOKEN, Localizer and these
tokens gets overridden and causes access issues later which are tough to debug.

1. Need to check if they can be added with some random unique name.
2. Or at least a error message should be logged.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org


Mime
View raw message