HDDS-14207. Inconsistent Ozone admin check#9859
Open
Gargi-jais11 wants to merge 10 commits intoapache:masterfrom
Open
HDDS-14207. Inconsistent Ozone admin check#9859Gargi-jais11 wants to merge 10 commits intoapache:masterfrom
Gargi-jais11 wants to merge 10 commits intoapache:masterfrom
Conversation
…d objects in ozone
Contributor
Author
|
@adoroszlai and @ChenSammi Please review the patch. |
adoroszlai
reviewed
Mar 3, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @Gargi-jais11 for the patch.
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java
Show resolved
Hide resolved
...hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
...hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
adoroszlai
reviewed
Mar 3, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @Gargi-jais11 for updating the patch.
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
Outdated
Show resolved
Hide resolved
...e-manager/src/test/java/org/apache/hadoop/ozone/security/acl/TestOzoneAuthorizerFactory.java
Show resolved
Hide resolved
Contributor
|
Please also check test failure in |
Contributor
Author
|
Thanks @adoroszlai for pointing out, I am still working on the fix. Will mark the PR as ready for review once I fix those failures. |
adoroszlai
reviewed
Mar 4, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @Gargi-jais11 for updating the patch, LGTM.
ChenSammi
reviewed
Mar 6, 2026
| throw new OMException( | ||
| "Bucket properties are allowed to changed by Admin and Owner", | ||
| OMException.ResultCodes.PERMISSION_DENIED); | ||
| if (ozoneManager.isAdminAuthorizationEnabled()) { |
Contributor
There was a problem hiding this comment.
We don't need to check isAdminAuthorizationEnabled() again here, as it's checked in the caller ozoneManager.getAclsEnabled().
The rest looks good to me.
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?
Ozone administrators have super privileges in Ozone system. Some actions are only allowed by Ozone administrators.
While currently the ozone administrator check is not consistent. Some codes, check permission is enabled first, then check if user has the admin privilege. For example,
OMFinalizeUpgradeRequest#validateAndUpdateCacheSome codes, check if user has the admin privilege directly, for example,
OzoneManager#triggerSnapshotDefragProposed Fix:
ACLs are a subset of authorization, so we should not change
ozone.acl.enabledto cover more than that instead for a single flag for authorization, added a newozone.authorization.enabledproperty to cover both ACL and admin check.ozone.authorization.enablednew config with default value: trueWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14207
How was this patch tested?
Updated the existing testcases to work according to the admin and object permissions enabled basis.
Tested Manually in docker cluster in unsecure and secure environment for all commands, pasting result of some of them:
1. Unsecure Cluster:
ozone.security.enabled=false,ozone.authorization.enabled=true andozone.acl.enabled=false.2. Secure Cluster :
ozone.security.enabled=true,ozone.authorization.enabled=true andozone.acl.enabled=false.ozone.security.enabled=true,ozone.authorization.enabled=true andozone.acl.enabled=true