-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29789: Backport 'HBASE-29761: The HBase UI's Debug Dump is not redacting sensitive information' to branch-2 #7568
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
base: branch-2
Are you sure you want to change the base?
Conversation
…redacting sensitive information' to branch-2 Change-Id: Ib3fa2674e9362b038e37df1a32ad35094811a00d
796c610 to
23b2817
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
taklwu
left a comment
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.
@kgeisz you may need to revisit the patch for branch-2 and branch-2.6
|
|
||
| String page = getRegionServerStatusPageContent(hostname, infoPort); | ||
| URL url = new URL("http://" + hostname + ":" + infoPort + "/regionserver.jsp"); | ||
| String page = TestServerHttpUtils.getPageContent(url, "text/html;charset=utf-8"); |
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.
the test failed
[ERROR] org.apache.hadoop.hbase.regionserver.http.TestRSStatusPage.testStatusPage -- Time elapsed: 1.225 s <<< FAILURE!
org.junit.ComparisonFailure: expected:<text/html[;charset=utf-8]> but was:<text/html[]>
at org.junit.Assert.assertEquals(Assert.java:117)
at org.junit.Assert.assertEquals(Assert.java:146)
at org.apache.hadoop.hbase.util.TestServerHttpUtils.getPageContent(TestServerHttpUtils.java:44)
at org.apache.hadoop.hbase.regionserver.http.TestRSStatusPage.testStatusPage(TestRSStatusPage.java:125)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:829)
https://issues.apache.org/jira/browse/HBASE-29789
This pull request back-ports HBASE-29761: The HBase UI's Debug Dump is not redacting sensitive information into branch-2. HBASE-29761 fixes an issue where sensitive information, such as passwords, were not being redacted when looking at a server's Debug Dump in the HBase UI. Some small modifications needed to be made in the Java code in order to get this commit to build. The changes included:
MasterDumpServlet.java and RSDumpServlet.java
StandardCharsets.UTF_8.toString()instead ofStandardCharsets.UTF_8MasterDumpServlet.java
if (isShowQueueDump(conf))toif (isShowQueueDump(master.getConfiguration()))since theconfvariable no longer exists in the code (the master branch does not have thisifblock at all).TestDebugDumpRedaction.java
HBaseTestingUtilityinstead ofHBaseTestingUtilREDACTED_PROPSusingArrays.asList()instead ofList.of()and using.collect(Collectors.toList())instead of.toList().TestServerHttpUtils.java
static final String PLAIN_TEXT = "text/plain"instead ofstatic final String PLAIN_TEXT_UTF8 = "text/plain;charset=utf-8".