-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Storage] KMS integration #3196
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
Conversation
| } | ||
| Encryption encryption = bucketPb.getEncryption(); | ||
| if (encryption != null && encryption.getDefaultKmsKeyName() != null && !encryption.getDefaultKmsKeyName().isEmpty()) { | ||
| builder.setDefaultKmsKeyName(encryption.getDefaultKmsKeyName()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| /** | ||
| * Returns the default Cloud KMS key to be applied to newly inserted objects in this bucket. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLAs look good, thanks! |
| .decode("H4sIAAAAAAAAAPNIzcnJV3DPz0/PSVVwzskvTVEILskvSkxPVQQA/LySchsAAAA="); | ||
| private static final Map<String, String> BUCKET_LABELS = ImmutableMap.of("label1", "value1"); | ||
| private static final String SERVICE_ACCOUNT_EMAIL = "[email protected]"; | ||
| private static final String KMS_KEY_NAME = ""; // use real KMS KEY associated to the test project. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
CLAs look good, thanks! |
|
Also adding @garrettjonesgoogle |
google-cloud-storage/pom.xml
Outdated
| <dependency> | ||
| <groupId>com.google.apis</groupId> | ||
| <artifactId>google-api-services-storage</artifactId> | ||
| <version>v1-rev125-1.23.0</version> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
|
|
||
| @Override | ||
| public Builder setKmsKeyName(String kmsKeyName) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * 'requester_pays' flag. | ||
| */ | ||
| @GcpLaunchStage.Alpha | ||
| public static BucketSourceOption userProject(String userProject) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import jdk.nashorn.internal.runtime.regexp.joni.exception.ValueException; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@pongad and @garrettjonesgoogle, I realized yesterday afternoon that I confused myself on API surface for this feature in context of inserting an object with a KMS KeyName. On I updated the PR/design to use More context and background on the operation: |
|
Oh dear I'm sorry I dropped the ball on this. We moved a bunch of files. Could you merge from master? There are some lint warnings that are worth fixing, but I'm fine fixing those in a separate PR. |
99a7491 to
619c6e4
Compare
pongad
left a comment
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.
One nit, but LGTM otherwise
| @Override | ||
| public Builder setDefaultKmsKeyName(String defaultKmsKeyName) { | ||
| this.defaultKmsKeyName = defaultKmsKeyName != null | ||
| ? new String(defaultKmsKeyName) : Data.<String>nullOf(String.class); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@garrettjonesgoogle Do you also want to take a look? |
garrettjonesgoogle
left a comment
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.
LGTM
|
All checks passed merging now. |
|
🎉 Thanks Frank, Michael and Garrett! |
Original author: @rossjudson
cc: @danoscarmike @rossjudson
Expected work items:
BucketField.ENCRYPTION.BlobField.KMS_KEY_NAME.