-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add --tokenKMSEncryptionKey option for PubSubToSplunkTemplate. #123
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
jaketf
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.
can we be more specific of the purpose of this KMS key in the param name to avoid confusion about pubsub and KMS
src/main/java/com/google/cloud/teleport/templates/common/SplunkConverters.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/cloud/teleport/templates/common/SplunkConverters.java
Outdated
Show resolved
Hide resolved
|
This is great! Thanks for the quick work here @melbrodrigues 🙌 |
sabhyankar
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.
Minor nit but looks good otherwise!
Thanks @melbrodrigues
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.
Can you add a JavaDoc here to clarify what we are doing with this static method?
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
|
@rarsan FYI |
sabhyankar
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
| */ | ||
| private static ValueProvider<String> maybeDecrypt( | ||
| ValueProvider<String> unencryptedToken, ValueProvider<String> kmsKey) { | ||
| return new KMSEncryptedNestedValueProvider(unencryptedToken, kmsKey); |
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.
thx @melbrodrigues for this update.
Shouldn't this parameter be named encryptedToken?
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.
Good catch @rarsan - I think the value may or may-not-be encrypted tbh since this is backwards compatible. The user could choose to send the hec token without any encryption.
Since this is a private method, we can correct it post merge.
Adds an optional parameter to specify a Cloud KMS Encryption Key if an encrypted
tokenparameter is passed to the template.Fixes #122