Unable to upload new object when CMEK is enabled for a bucket. #155
Labels
api: storage
Issues related to the googleapis/python-storage API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Tracking issue for a customer.
The issue is the Python library does a metadata get on an Object which includes kmsKeyName version resource ID metadata.
If you use the same Blob instance to perform an upload the Python library will use the kmsKeyName version resource ID instead of the kmsKeyName resource ID.
Cloud Storage API expects the kmsKeyName kmsKeyName without version information.
Here's an example for illustration:
kmsKeyName version resource ID:
kmsKeyName resource ID:
Reproduction
Workaround
Potential Fix:
blob.upload_from_*
should only use kmsKeyName if it doesn't end with a version.The text was updated successfully, but these errors were encountered: