-
Notifications
You must be signed in to change notification settings - Fork 77
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: KMS Bad Key error when using existing Blob context to overwrite object #507
Conversation
Codecov Report
@@ Coverage Diff @@
## master #507 +/- ##
============================================
- Coverage 64.69% 64.68% -0.02%
+ Complexity 629 620 -9
============================================
Files 32 32
Lines 5249 5255 +6
Branches 509 511 +2
============================================
+ Hits 3396 3399 +3
- Misses 1694 1697 +3
Partials 159 159
Continue to review full report at Codecov.
|
google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java
Outdated
Show resolved
Hide resolved
google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java
Outdated
Show resolved
Hide resolved
@frankyn PTAL |
@@ -621,7 +637,8 @@ Builder setCustomerEncryption(CustomerEncryption customerEncryption) { | |||
|
|||
@Override | |||
Builder setKmsKeyName(String kmsKeyName) { | |||
this.kmsKeyName = kmsKeyName; | |||
this.kmsKeyName = | |||
kmsKeyName != null && kmsKeyName.contains("cryptoKeyVersions") ? "" : kmsKeyName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should be in the HttpStorageRpc request being sent instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
🤖 I have created a release \*beep\* \*boop\* --- ### [1.113.1](https://www.github.com/googleapis/java-storage/compare/v1.113.0...v1.113.1) (2020-09-17) ### Bug Fixes * KMS Bad Key error when using existing Blob context to overwrite object ([#507](https://www.github.com/googleapis/java-storage/issues/507)) ([4d9c490](https://www.github.com/googleapis/java-storage/commit/4d9c49027e4746ee273902694441886c2f43188d)) * When passing a sub-array (offset, length) to the Storage#create method the array is needlessly cloned ([#506](https://www.github.com/googleapis/java-storage/issues/506)) ([9415bb7](https://www.github.com/googleapis/java-storage/commit/9415bb7bdb42d8012ca457a90070b616e6bbec19)), closes [#505](https://www.github.com/googleapis/java-storage/issues/505) ### Dependencies * update dependency com.google.apis:google-api-services-storage to v1-rev20200814-1.30.10 ([#499](https://www.github.com/googleapis/java-storage/issues/499)) ([af91d7d](https://www.github.com/googleapis/java-storage/commit/af91d7da4117fb22992d6a860af61f72906e0aa1)) ### Documentation * update libraries-bom ([#504](https://www.github.com/googleapis/java-storage/issues/504)) ([0e58c1c](https://www.github.com/googleapis/java-storage/commit/0e58c1cb2b6a890e567b043188613021592f2bc8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Fixes #502