Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rewrite object in CMEK enabled bucket #807

Merged
merged 1 commit into from Jun 3, 2022

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Jun 2, 2022

Allow rewrite on top of an existing blob in CMEK enabled bucket by ignoring kmsKeyName version resource ID in a rewrite request.

The Cloud Storage API expects the kmsKeyName resource ID without version information. If a Blob instance with kmsKeyName version resource ID set is used to rewrite the object, then it can't be used in the rewrite request and the client should ignore it.

Note: A metadata GET on a blob includes the kmsKeyName version resource ID

Fixes #806

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Jun 2, 2022
@cojenco cojenco marked this pull request as ready for review June 2, 2022 22:03
@cojenco cojenco requested review from a team as code owners June 2, 2022 22:03
@cojenco cojenco requested review from andrewsg and frankyn June 2, 2022 22:21
Copy link
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

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

Thanks!

@cojenco cojenco merged commit 9b3cbf3 into googleapis:main Jun 3, 2022
@cojenco cojenco deleted the 806-rewrite branch November 16, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite object receives 400 error when CMEK is enabled for a bucket
2 participants