Skip to content

fix(storage): forward predefinedAcl on compose over JSON - #13975

Open
gaul wants to merge 1 commit into
googleapis:mainfrom
gaul:storage-compose-predefined-acl
Open

fix(storage): forward predefinedAcl on compose over JSON#13975
gaul wants to merge 1 commit into
googleapis:mainfrom
gaul:storage-compose-predefined-acl

Conversation

@gaul

@gaul gaul commented Jul 31, 2026

Copy link
Copy Markdown

Storage.compose accepts BlobTargetOption.predefinedAcl and carries it down as StorageRpc.Option.PREDEFINED_ACL, but HttpStorageRpc.compose forwarded only the generation, metageneration and userProject options. The caller was given no error: objects.compose ran without destinationPredefinedAcl and the composed object kept the ACL it would have had anyway, so an object asked to be public came back private.

The two transports disagreed on the same call. UnifiedOpts.PredefinedAcl already implements composeObject as setDestinationPredefinedAcl, so gRPC applied the option while JSON dropped it, and which one a caller got depended on how the client had been built.

Objects.Compose has taken destinationPredefinedAcl all along; set it as rewrite already does a few lines below.

Storage.compose accepts BlobTargetOption.predefinedAcl and carries it
down as StorageRpc.Option.PREDEFINED_ACL, but HttpStorageRpc.compose
forwarded only the generation, metageneration and userProject options.
The caller was given no error: objects.compose ran without
destinationPredefinedAcl and the composed object kept the ACL it would
have had anyway, so an object asked to be public came back private.

The two transports disagreed on the same call.  UnifiedOpts.PredefinedAcl
already implements composeObject as setDestinationPredefinedAcl, so gRPC
applied the option while JSON dropped it, and which one a caller got
depended on how the client had been built.

Objects.Compose has taken destinationPredefinedAcl all along; set it as
rewrite already does a few lines below.
@gaul
gaul requested review from a team as code owners July 31, 2026 18:49

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the compose method in HttpStorageRpc to set the destination predefined ACL on the compose request using the target options. It also introduces a new test class HttpStorageRpcComposeTest to verify that the predefined ACL option is correctly forwarded when provided and omitted when not. There are no review comments, and I have no feedback to provide.

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.

1 participant