HDDS-16356. SCM finalize API should only be reachable by OM - #11177
Open
errose28 wants to merge 6 commits into
Open
HDDS-16356. SCM finalize API should only be reachable by OM#11177errose28 wants to merge 6 commits into
errose28 wants to merge 6 commits into
Conversation
errose28
marked this pull request as ready for review
August 31, 2026 22:30
Currently ignoring config files used in other secure envs: hadoop-ozone/dist/src/main/compose/common/hadoop-security.conf hadoop-ozone/dist/src/main/compose/ozonesecure-ha/docker-config hadoop-ozone/dist/src/main/compose/xcompat/docker-config
Contributor
Author
|
Additional testing and docs improvements for internal protocol ACLs not related to ZDU are tracked in HDDS-16366. |
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?
With the new ZDU finalization flow, the admin sends the finalize request to OM and OM forwards it to SCM. The admin is never supposed to finalize SCM directly. This ensures that components are always finalized in the expected order.
Currently SCM's finalize command is under the container location protocol with other admin facing commands guarded by an admin check. This happened to work in the ZDU acceptance test suite because OM was configured as a cluster admin, however this is not expected in a real deployments. Additionally, it allows a custom client created by an admin to invoke this API out of order.
Instead, the new finalize API should be in the block location protocol with similar APIs like
deleteKeyBlocks. This protocol is only accessible to principals configured inhdds.security.client.scm.block.protocol.acl, which the admin is expected to set to the OM and SCM's principals. Additionally, the acceptance tests should not configure OM as an admin since it masks issues like this.What is the link to the Apache JIRA
HDDS-16356
How was this patch tested?
Unit tests for the finalize API that used to be in
TestSCMClientProtocolServerwere moved toTestSCMBlockProtocolServer.OM was removed as an admin in the acceptance tests' global
security.conffile.