HDDS-13826. Move ACL check in OMKeySetTimesRequest#9192
Merged
jojochuang merged 1 commit intoapache:masterfrom Nov 5, 2025
Merged
HDDS-13826. Move ACL check in OMKeySetTimesRequest#9192jojochuang merged 1 commit intoapache:masterfrom
jojochuang merged 1 commit intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR moves ACL (Access Control List) checks from the validateAndUpdateCache method to the preExecute method in OMKeySetTimesRequest and its FSO variant. This ensures ACL enforcement happens earlier in the request processing lifecycle and is tied to the leader node at request submission time.
Key Changes:
- ACL checks moved from
validateAndUpdateCachetopreExecutein bothOMKeySetTimesRequestandOMKeySetTimesRequestWithFSO - Added audit logging for ACL check failures during preExecute
- New integration test validates leader-specific ACL enforcement behavior after leadership changes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| OMKeySetTimesRequest.java | Moves ACL check to preExecute method with audit logging for failures |
| OMKeySetTimesRequestWithFSO.java | Removes ACL check from validateAndUpdateCache (now handled by parent class preExecute) |
| TestOMHALeaderSpecificACLEnforcement.java | Adds comprehensive test for setTimes ACL enforcement across leader transitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeySetTimesRequest.java
Show resolved
Hide resolved
...tion-test/src/test/java/org/apache/hadoop/ozone/om/TestOMHALeaderSpecificACLEnforcement.java
Outdated
Show resolved
Hide resolved
...tion-test/src/test/java/org/apache/hadoop/ozone/om/TestOMHALeaderSpecificACLEnforcement.java
Outdated
Show resolved
Hide resolved
80a5653 to
c54fbf1
Compare
Contributor
|
Merged. Thanks @ss77892 ! |
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?
HDDS-13826. Move ACL check in OMKeySetTimesRequest and OMKeySetTimesRequestWithFSO
Please describe your PR in detail:
The ACL checks have been moved to the preExecute method.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13826
How was this patch tested?
Unit test is provided. Also, to confirm that the manual test was performed.