Skip to content

HDDS-13826. Move ACL check in OMKeySetTimesRequest#9192

Merged
jojochuang merged 1 commit intoapache:masterfrom
ss77892:HDDS-13826
Nov 5, 2025
Merged

HDDS-13826. Move ACL check in OMKeySetTimesRequest#9192
jojochuang merged 1 commit intoapache:masterfrom
ss77892:HDDS-13826

Conversation

@ss77892
Copy link
Contributor

@ss77892 ss77892 commented Oct 23, 2025

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 validateAndUpdateCache to preExecute in both OMKeySetTimesRequest and OMKeySetTimesRequestWithFSO
  • 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.

@ss77892 ss77892 force-pushed the HDDS-13826 branch 2 times, most recently from 80a5653 to c54fbf1 Compare October 23, 2025 18:12
Copy link
Contributor

@jojochuang jojochuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jojochuang jojochuang merged commit 51deb3c into apache:master Nov 5, 2025
43 checks passed
@jojochuang
Copy link
Contributor

Merged. Thanks @ss77892 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants