HDDS-15853. Fix Ranger ACL validation for lifecycle requests#10753
Merged
Conversation
Contributor
|
@priyeshkaratha , I will check it later. BTW, could you move the ACL check in OMLifecycleSetServiceStatusRequest to preExecute too in this patch? |
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts OM lifecycle configuration authorization to correctly validate permissions under non-native authorizers (eg. Ranger) while preserving the existing native-authorization behavior patterns used for other bucket-level mutations.
Changes:
- Replace unconditional
ACLType.ALLbucket ACL checks with a dedicatedcheckAclPermission(...)helper for lifecycle set/delete. - Native authorizer path: allow only cluster admin or bucket owner; non-native path: require
ACLType.WRITEon the bucket.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/lifecycle/OMLifecycleConfigurationSetRequest.java | Switch lifecycle-set authorization to native admin/owner check vs non-native WRITE ACL check. |
| hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/lifecycle/OMLifecycleConfigurationDeleteRequest.java | Switch lifecycle-delete authorization to native admin/owner check vs non-native WRITE ACL check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChenSammi
approved these changes
Jul 15, 2026
ChenSammi
left a comment
Contributor
There was a problem hiding this comment.
Thanks @priyeshkaratha , LGTM.
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?
Lifecycle configuration set and delete requests previously called checkAcls(...) with ACLType.ALL unconditionally whenever ACLs were enabled. This does not map correctly onto Ranger-based (non-native) authorization: Ranger policies are expressed in terms of the standard S3/Ozone access types, and demanding ALL on the bucket is both incorrect and stricter than intended for these operations.
This PR splits the permission check into a dedicated checkAclPermission(...) helper in both OMLifecycleConfigurationSetRequest and OMLifecycleConfigurationDeleteRequest:
This keeps the two authorization models consistent with how the rest of the OM performs bucket-level permission checks and fixes Ranger ACL validation for lifecycle requests.
What is the link to the Apache JIRA
HDDS-15853
How was this patch tested?
Tested manually using ranger integation