HDFS-16563. Namenode WebUI prints sensitive information on Token expiry#4241
HDFS-16563. Namenode WebUI prints sensitive information on Token expiry#4241steveloughran merged 1 commit intoapache:trunkfrom
Conversation
|
@hemanthboyina @Hexiaoqiao Can you please review the PR when you get time? |
|
thank you @prasad-acit for the PR, looks the test case failures are related, can you have a look once |
|
@prasad-acit Thanks for involving me here. IMO, the key and sensitive information is DelegationKey/Password for DelegationToken, the output message here does not include this information right? So I don't think it it security issue. Do you mind to more information about this output or stack demo? Thanks. |
|
looks like there are some big assumptions about the nested stack trace coming back. so please restore that change and see what happens if the issue is that toString leaks a secret, it should be fixed at that level, as it is likely to end up in logs. we don't want any output to expose secrets. |
|
Thanks @hemanthboyina @Hexiaoqiao @steveloughran for the quick review & feedback.
Yes, there is no password printed in it. But as per our internal security guidelines displaying the complete Token info is also prohibited. So, suppressed the token from being displayed in the browser.
Logging exception or full stack has no issue in this case. We are trying to avoid the token in the browser and keep the message abstract to the end-user. Here additional information is not necessary which can be avoided in the browser. Failed tests corrected, please review the changes. |
|
Thanks @jojochuang I have added logs with Token Info. |
|
Javadoc issues are not related. |
|
💔 -1 overall
This message was automatically generated. |
|
LGTM; will leave final vote to @jojochuang |
|
Thanks @steveloughran for the review. |
steveloughran
left a comment
There was a problem hiding this comment.
I'm happy with this; it's logging at info.
one minor change, just switching to the slf4j {} expansion strings. we should do this for all new log entries, -a lot of the existing stuff is a migration from the restricted commong logging api
There was a problem hiding this comment.
can you use
LOG.info("{}, Token={}", err, formatTokenId(identifier));
There was a problem hiding this comment.
can you use
LOG.warn("{}, Token={}", err, formatTokenId(identifier));
|
💔 -1 overall
This message was automatically generated. |
steveloughran
left a comment
There was a problem hiding this comment.
+1, merging. thanks!
…ry (#4241) Contributed by Renukaprasad C Change-Id: I5cd2cec1dd79917f810207821b3bdf4fe1a5d24c
|
Thanks @steveloughran |
…ry (apache#4241) Contributed by Renukaprasad C
Description of PR
How was this patch tested?
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?