-
Notifications
You must be signed in to change notification settings - Fork 122
Incorporate Keyrings into AwsCrypto and deprecate MasterKeyProviders. #151
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
bd5f9e4
to
63ff149
Compare
src/examples/java/com/amazonaws/crypto/examples/FileStreamingExample.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/internal/StaticKeyring.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/internal/StaticKeyring.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/BasicEncryptionExample.java
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/BasicEncryptionExample.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/BasicEncryptionExample.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/BasicEncryptionExample.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/EscrowedEncryptExample.java
Outdated
Show resolved
Hide resolved
Not entirely relevant to this PR, but since we don't have a better place and this is where you said you'll be doing the change: As mentioned here[1], can we make sure that we call the AWS KMS keyring the "AWS KMS" keyring, not just the "KMS" keyring? |
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.
Other than the minor naming issue, I like it.
Obviously this needs review from one of our resident Java folks, but as far as the overall design of the keyrings and how they're being integrated into the existing system, I like it.
src/test/java/com/amazonaws/encryptionsdk/internal/StaticKeyring.java
Outdated
Show resolved
Hide resolved
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.
Dependent on the review of one of our Java experts, LGTM.
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.
Just some initial thoughts on the API changes based on reviewing the examples. More to come! :)
src/examples/java/com/amazonaws/crypto/examples/BasicEncryptionExample.java
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/EscrowedEncryptExample.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/FileStreamingExample.java
Outdated
Show resolved
Hide resolved
src/examples/java/com/amazonaws/crypto/examples/FileStreamingExample.java
Outdated
Show resolved
Hide resolved
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.
Another batch of comments - I've looked at about half of the non-test file changes now.
src/main/java/com/amazonaws/encryptionsdk/internal/MessageCryptoHandler.java
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/internal/DecryptionHandler.java
Show resolved
Hide resolved
) * Making tests opt-out instead of opt-in and update TestVectorRunner JUnit5 doesn't support test suites yet (see junit-team/junit5#744) and the existing test suites do not support the new JUnit5 tests that are being used for keyrings. This change removes the test suites, and configures Maven to include all tests except those marked with certain JUnit tags. Additionally, this change updates the TestVectorRunner to also test Keyrings and removes the redundant XCompat tests. * Client caching is now enabled by default in AwsKmsClientSupplier * Rename slow tag to ad_hoc and fix TestVectorRunner
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.
Finished reviewing all source file, will do one more quick batch that looks at the test files.
src/main/java/com/amazonaws/encryptionsdk/internal/EncryptionHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/CreateDecryptingInputStreamRequest.java
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManager.java
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManager.java
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/caching/CachingCryptoMaterialsManager.java
Outdated
Show resolved
Hide resolved
src/main/java/com/amazonaws/encryptionsdk/model/EncryptionMaterials.java
Show resolved
Hide resolved
src/test/java/com/amazonaws/crypto/examples/FileStreamingExampleTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/crypto/examples/FileStreamingExampleTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/crypto/examples/FileStreamingExampleTest.java
Show resolved
Hide resolved
src/test/java/com/amazonaws/crypto/examples/FileStreamingExampleTest.java
Outdated
Show resolved
Hide resolved
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.
Just minor stuff in the tests.
src/test/java/com/amazonaws/encryptionsdk/DecryptRequestTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManagerTest.java
Show resolved
Hide resolved
src/test/java/com/amazonaws/encryptionsdk/kms/AwsKmsCmkIdTest.java
Outdated
Show resolved
Hide resolved
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, thanks for addressing all the feedback!
* Additional example code for Keyrings * Updating wording * Remove AWS from AWS KMS keyring and make keyring lowercase
Description of changes:
This change incorporates Keyrings into AwsCrypto and deprecates MasterKeys and MasterKeyProviders.
See #150 for a discussion on the evolution of the API as we transition to Keyrings
See #153 for a discussion on the ergonomics of Keyrings
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: