Repository navigation
HDDS-16842. Check admin rights in OM bootstrap RPC - #11502
Merged
Merged
Conversation
Require administrator privileges before adding an OM to the Ratis ring when admin authorization is enabled, consistent with decommission and getOMConfiguration. Add a non-admin bootstrap regression test and enable authorization in the existing bootstrap test. Tests: Confirmed regression test fails before the fix; 14 integration tests and 1 unit test pass after the fix. Checkstyle passes.
jojochuang
approved these changes
Oct 13, 2026
…lict. Keep bootstrap admin authorization tests from HDDS-16842 together with safe mode and echo RPC authorization tests added on master. Co-authored-by: Cursor <cursoragent@cursor.com> Change-Id: I56f53aced3f813dd38f0e14cc20b8005f3dcdec5
jojochuang
approved these changes
Oct 14, 2026
jojochuang
left a comment
Contributor
There was a problem hiding this comment.
Merged current master into HDDS-16842 and resolved the conflict in TestOMAdminRpcAuthorization.java by keeping both:
- bootstrap admin authorization coverage (HDDS-16842)
- safe mode + echo RPC authorization tests from master
Contributor
|
Merged. Thanks @andyhuangdev @smengcl |
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?
This patch adds an administrator authorization check to OMInterServiceProtocolServerSideImpl.bootstrap() before adding an OM to the Ratis ring, consistent with the checks in decommission() and getOMConfiguration().
The check uses the existing admin authorization helpers and error response handling. Normal bootstrap already calls getOMConfiguration() with administrator privileges before requesting membership changes. When admin authorization is disabled, behavior remains unchanged. No configuration or Protobuf changes are required.
A regression test verifies that non-admin bootstrap callers are rejected. The existing bootstrap test now enables admin authorization to verify that legitimate OMs can still join.
What is the link to the Apache JIRA
HDDS-16842
How was this patch tested?
The new bootstrapNonAdminIsDenied regression test was run before the fix and failed because the expected authorization denial was missing.
After the fix, all tests passed:
The project checkstyle script completed with zero violations, and git diff --check passed.