Repository: storm Updated Branches: refs/heads/1.x-branch 34a220c95 -> 5be414d08
STORM-2903: (follow up) Log token identifier and username associated with token identifier Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/05890efc Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/05890efc Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/05890efc Branch: refs/heads/1.x-branch Commit: 05890efcf0a509f6fabd2e89c4027eaffd497d68 Parents: 25fa9dd Author: Manikumar Reddy <[email protected]> Authored: Mon Jan 22 15:48:08 2018 +0530 Committer: Manikumar Reddy <[email protected]> Committed: Mon Jan 22 16:01:23 2018 +0530 ---------------------------------------------------------------------- .../main/java/org/apache/storm/common/AbstractAutoCreds.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/05890efc/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java ---------------------------------------------------------------------- diff --git a/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java b/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java index eb383f4..7b2fc2d 100644 --- a/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java +++ b/external/storm-autocreds/src/main/java/org/apache/storm/common/AbstractAutoCreds.java @@ -224,6 +224,12 @@ public abstract class AbstractAutoCreds implements IAutoCredentials, ICredential LOG.debug("Current user: {}", UserGroupInformation.getCurrentUser()); LOG.debug("Token from Credentials : {}", token); + TokenIdentifier tokenId = token.decodeIdentifier(); + if (tokenId != null) { + LOG.debug("Token identifier : {}", tokenId); + LOG.debug("Username in token identifier : {}", tokenId.getUser()); + } + UserGroupInformation.getCurrentUser().addToken(token); LOG.info("Added delegation tokens to UGI."); } catch (IOException e) {
