Skip to content

redact OBS/OSS/COSN/TOS/BOS secrets in sensitive-config-keys#8613

Open
nishat-06 wants to merge 1 commit into
apache:trunkfrom
nishat-06:redact-cloud-connector-secrets
Open

redact OBS/OSS/COSN/TOS/BOS secrets in sensitive-config-keys#8613
nishat-06 wants to merge 1 commit into
apache:trunkfrom
nishat-06:redact-cloud-connector-secrets

Conversation

@nishat-06

Copy link
Copy Markdown

Description of PR

hadoop.security.sensitive-config-keys lists credential keys for the s3a, azure, adl and gs connectors only, so the obs, oss, cosn, tos and bos connectors have their secret keys and session tokens matched by no pattern. ConfigRedactor.configIsSensitive returns false for all of them, and Configuration.dumpConfiguration / writeXml then emit the values verbatim, so the /conf servlet on the NameNode, DataNode, ResourceManager, NodeManager and HttpFS hands out object store secrets and session tokens in cleartext, as does reconfiguration logging through ReconfigurableBase.

The thirteen missing patterns are added to both core-default.xml and CommonConfigurationKeysPublic.HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS_DEFAULT, since the latter is what applies when core-default.xml is off the classpath. Bucket-scoped forms follow the existing fs.s3a.secret.key / fs.s3a.*.secret.key shape. Access key ids are deliberately left unredacted, matching how fs.s3a.access.key is treated today.

How was this patch tested?

TestConfigRedactor covers this through its existing testRedactWithCoreDefault and testRedactNoCoreDefault pair, so the added keys are asserted against both the XML default and the Java constant. Each of the thirteen keys is redacted with the patch and returned in cleartext without it.

Local surefire did not run to completion on my machine (the build host ran out of disk), so I verified by driving ConfigRedactor directly against the built hadoop-common jar over both config paths, and separately replayed the pre-patch pattern list from trunk to confirm the same thirteen keys come back unredacted. I also matched the new patterns against every <name> in the tree's *-default.xml files to check for over-matching, which returned no hits. Full CI results here would be welcome.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

No JIRA id yet and no new dependencies; no connector code is touched, so the object store integration suites do not apply. Happy to open a JIRA and retitle if that is preferred before review.

AI Tooling

If an AI tool was used:

Contains content generated by BugQore, a multi-agent AI code review system. The finding, the patch and this description were produced with it and reviewed by me before submitting.

@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 41m 24s trunk passed
+1 💚 compile 16m 6s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 16m 29s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 1m 34s trunk passed
+1 💚 mvnsite 2m 2s trunk passed
+1 💚 javadoc 1m 32s trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 28s trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 3m 7s trunk passed
+1 💚 shadedclient 30m 39s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 12s the patch passed
+1 💚 compile 15m 43s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 15m 43s the patch passed
+1 💚 compile 16m 57s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 16m 57s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 24s the patch passed
+1 💚 mvnsite 1m 57s the patch passed
+1 💚 javadoc 1m 27s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 25s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 3m 18s the patch passed
+1 💚 shadedclient 31m 1s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 22m 54s hadoop-common in the patch passed.
+1 💚 asflicense 1m 14s The patch does not generate ASF License warnings.
214m 57s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8613/1/artifact/out/Dockerfile
GITHUB PR #8613
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets xmllint
uname Linux aa753a281b77 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 7916e2c
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8613/1/testReport/
Max. process+thread count 1400 (vs. ulimit of 10000)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8613/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants