Repository navigation
HDDS-16963. Require SCM admin access for secret key rotation - #11811
Open
andyhuangdev wants to merge 1 commit into
Open
andyhuangdev wants to merge 1 commit into
andyhuangdev wants to merge 1 commit into
Conversation
Test plan: TestSecureOzoneCluster and TestBlockTokensCLI (12 tests passed); checkstyle passed.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues with the change restricting secret key rotation to SCM administrators.
No open issues 🎉
What changed in this PR
This PR restricts secret key rotation to SCM administrators, following the authorization pattern used by other SCM administrative operations.
Changes:
- Checks SCM admin access before validating secret key status or performing rotation.
- Adds regression coverage for non-admin denial with both
forcevalues, unchanged keys after denial, and successful forced rotation by an SCM admin.
| File | Description |
|---|---|
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java |
Adds secret key rotation authorization coverage using authenticated RPC clients. |
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMSecurityProtocolServer.java |
Enforces SCM admin access in checkAndRotate and allows authorization failures to propagate as IOException. |
Review effort: Balanced
jojochuang
approved these changes
Oct 28, 2026
jojochuang
marked this pull request as ready for review
October 28, 2026 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add an SCM admin access check to SCMSecurityProtocolServer.checkAndRotate before validating secret key status or performing rotation. This prevents authenticated non-admin users from triggering secret key rotation and follows the authorization pattern used by other SCM administrative operations.
What is the link to the Apache JIRA
HDDS-16963
How was this patch tested?
Added regression coverage to TestSecureOzoneCluster verifying that non-admin users are denied for both values of force, the current key remains unchanged after denial, and an SCM admin can successfully force rotation. The regression test failed before the fix.
TestSecureOzoneCluster and TestBlockTokensCLI passed all 12 tests. The checkstyle script and git diff --check also passed.
https://github.com/andyhuangdev/ozone/actions/runs/40639047599