HDDS-15460. Move ACL checks for key and prefix requests to preExecute - #10330
Closed
ss77892 wants to merge 2 commits into
Closed
HDDS-15460. Move ACL checks for key and prefix requests to preExecute#10330ss77892 wants to merge 2 commits into
ss77892 wants to merge 2 commits into
Conversation
1 task
sarvekshayr
reviewed
May 29, 2026
sarvekshayr
left a comment
Contributor
There was a problem hiding this comment.
Thanks @ss77892 for the patch.
| checkKeyAcls(ozoneManager, volumeName, bucketName, keyName, | ||
| IAccessAuthorizer.ACLType.DELETE, OzoneObj.ResourceType.KEY, | ||
| volumeOwner); | ||
| perfMetrics.setDeleteKeysAclCheckLatencyNs(Time.monotonicNowNanos() - startNanosDeleteKeysAclCheckLatency); |
Contributor
There was a problem hiding this comment.
deleteKeysAclCheckLatencyNs metric is no longer updated after moving out the ACL check from validateAndUpdateCache(). Let's restore the metric in OMKeysDeleteRequest.preExecute().
Move ACL authorization checks for key operations (delete-keys, rename-keys) and key/prefix ACL operations (add, remove, set ACL, including FSO variants) from validateAndUpdateCache to preExecute. For bulk operations (OMKeysDeleteRequest, OMKeysRenameRequest), keys that fail the ACL check are collected in new proto fields (aclDeniedKeys / aclDeniedRenameKeys) and removed from the batch so the remaining permitted keys can still be processed. Proto changes: add aclDeniedKeys to DeleteKeyArgs and aclDeniedRenameKeys to RenameKeysArgs. Co-authored-by: Cursor <cursoragent@cursor.com>
ss77892
force-pushed
the
HDDS-13855-key-prefix-acl-preexecute
branch
from
June 2, 2026 14:35
5291e8c to
38c39f2
Compare
|
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days. |
|
Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it. |
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?
DeleteKeys,RenameKeys) fromvalidateAndUpdateCachetopreExecuteOMKeyAclRequest,OMKeyAclRequestWithFSO,OMPrefixAclRequest, and FSO add/remove/set variants) fromvalidateAndUpdateCachetopreExecuteaclDeniedKeys/aclDeniedRenameKeys) and removed from the batch, so permitted keys in the same request can still be processedaclDeniedKeystoDeleteKeyArgsandaclDeniedRenameKeystoRenameKeysArgsWhat is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15460
How was this patch tested?
By existing tests, more tests would be added in a separate PR #10331
Made with Cursor