Repository navigation
Conversation
…quests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Looks good.
|
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
Review effort: Lite
Copilot stopped reviewing on behalf of
jojochuang due to an error
October 23, 2026 20:09
Co-authored-by: Codex (GPT-6) Change-Id: I5fea7356b90fef65e1b6ccb19bf9d747c5c6bdea
Co-authored-by: Codex (GPT-6) Change-Id: I599f736ba48aa02b92e0ed00cdf38e7fad4f35b3
Co-authored-by: Codex (GPT-6) Change-Id: If1348d6868bf87be117809a3728d9dc312e00c3c
Co-authored-by: Codex (GPT-6) Change-Id: I561a7b800d879c29f9151331e8a716abda6207ee
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.

Generated-by: Claude Code (Opus 5.5)
What changes were proposed in this pull request?
OM converts the ACLs sent with key, file, directory, multipart upload, bucket and volume create requests (
KeyArgs.acls,BucketInfo.acls,VolumeInfo.volumeAcls) withOzoneAcl.fromProtobufonly invalidateAndUpdateCache. An ACL with an empty user or group name, a WORLD or ANONYMOUS ACL with another name, or rights longer than 4 bytes fails there with anIllegalArgumentExceptionorAssertionErrorinstead of anOMExceptionwith a result code.Rights bits beyond the known ACL types are accepted by all requests that carry ACLs, including AddAcl, SetAcl and RemoveAcl.
IAccessAuthorizer.ACLType.getACLString(used byOzoneAcl.toString, for example in audit logs) then fails with anArrayIndexOutOfBoundsException, and so doesOzoneAclStorage.fromProtobufwhen reading such a prefix ACL from the prefix table. The latter also fails for a prefix ACL without any rights.This PR:
OMClientRequest.toOzoneAcls, which converts client ACLs and throwsOMExceptionwithINVALID_REQUESTfor a malformed one, andOMClientRequest.checkAclRights, which does the same for rights beyond the known ACL types;toOzoneAclsinpreExecuteof the create requests (OMKeyRequest.resolveBucketAndCheckKeyAcls, shared by key, file, directory and multipart upload requests, plusOMBucketCreateRequestandOMVolumeCreateRequest), andcheckAclRightsinpreExecuteof the volume, bucket, key and prefix AddAcl, SetAcl and RemoveAcl requests, so such ACLs are rejected before the request is replicated;toOzoneAclsinvalidateAndUpdateCacheof the create requests (OMKeyRequest.getAclsForKeyandgetAclsForDir,OMBucketCreateRequest,OMVolumeCreateRequest), so such a request also gets an error response there.OMBucketCreateRequestandOMVolumeCreateRequestnow set the client ACLs inside thetryblock instead of inOmBucketInfo.getFromProtobufandOmVolumeArgs.builderFromProtobuf;ozone.om.object.creation.ignore.client.aclsis true, so the create requests ignore the client ACLs without validating them;ACLType.getACLStringandOzoneAclStorage.fromProtobufskip unknown rights bits, and the latter accept no rights, so existing ACLs can still be printed and read;IllegalArgumentExceptioninstead ofAssertionErrorinOzoneAcl.fromProtobuffor rights longer than 4 bytes.The Ozone client and the S3 Gateway build ACLs that already pass this validation, so they see no difference. No protocol, version or layout change.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17298
How was this patch tested?
testInvalidAclinTestOMKeyCreateRequest(and soTestOMKeyCreateRequestWithFSO),TestOMBucketCreateRequestandTestOMVolumeCreateRequest, andtestRejectInvalidAclinTestOMDirectoryCreateRequest, for the malformed ACLs inOMRequestTestUtils.invalidAcls(). By default, each checks thatpreExecutefails withINVALID_REQUEST, and thatvalidateAndUpdateCachereturnsINVALID_REQUESTfor an already pre-executed request with such an ACL.testInvalidAclalso checks that the request succeeds when client ACLs are ignored.testRejectUnknownAclRightsinTestOMKeyAclRequest(and soTestOMKeyAclRequestWithFSO),TestOMPrefixAclRequest,TestOMBucketAddAclRequestandTestOMVolumeAddAclRequest:preExecutefails withINVALID_REQUEST, andvalidateAndUpdateCachecompletes with its usual result.TestOzoneAcls#testToStringIgnoresUnknownRightsandTestOmPrefixInfo#testGetFromProtobufWithUnknownOrNoRights.ozone-common,ozone-interface-storageandozone-managerpass locally.🤖 Generated with Claude Code