-
Notifications
You must be signed in to change notification settings - Fork 86
Keyring materials #163
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
Merged
Merged
Keyring materials #163
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a3d947d
bump attrs to 19.1.0
mattsb42-aws daaacba
add keyring trace and integrate into updated encrytion/decryption mat…
mattsb42-aws f254e73
s/KeyRing/Keyring/g
mattsb42-aws f9aa29d
align cryptographic materials and add write-only interface
mattsb42-aws 01759b9
encrypted_data_keys must only contain EncryptedDataKey
mattsb42-aws e8e5b82
fix test to be Python 2 compatible
mattsb42-aws 469600c
data encryption key must be set before encrypted data keys can be add…
mattsb42-aws a27ff74
add signing/verification key checks to Encryption/DecryptionMaterials
mattsb42-aws b311cda
DecryptionMaterials.algorithm must be set before DecryptionMaterials.…
mattsb42-aws 10ded57
update materials docs and typehints
mattsb42-aws 4f95e53
EncryptionMaterials must not be initialized with encrypted_data_keys …
mattsb42-aws 7302775
add is_complete properties to EncryptionMaterials and DecryptionMater…
mattsb42-aws f1e7f2f
change KeyringTraceFlag values to bitshifted ints to match other impl…
mattsb42-aws 524d847
normalize EncryptionMaterials._encrypted_data_keys to list and encryp…
mattsb42-aws d786409
temporarily pin pydocstyle at <4.0.0 to avoid issue breaking flake8-d…
mattsb42-aws 888fc17
temporarily cap pydocstyle at <4.0.0 for decrypt oracle
mattsb42-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
boto3>=1.4.4 | ||
cryptography>=1.8.1 | ||
attrs>=17.4.0 | ||
attrs>=19.1.0 | ||
wrapt>=1.10.11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
My spidey sense is tingling that we're going to hit an assumption impedance mismatch down the road between this being an incrementing integer enum here and bit fields in C https://github.com/aws/aws-encryption-sdk-c/blob/969c71d7b48a9c48e00a3ec8bc420c245681bab9/include/aws/cryptosdk/keyring_trace.h#L56
Have we hashed this out in the specification yet? Is there a good reason not to keep consistent keyring trace definition and value mappings across implementations?
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.
JS does the bit flag thing because I copied C. I don't much like the bit flag because people will not understand it.
While I can get behind your "specification" point, I'm not sure that this is strictly a specification thing. Knowing what wrapping key did what should be, but how this is recorded?
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.
We haven't touched on this yet in the spec, no.
My general take on this is that we have not really been defining this as a thing that should be passed around between implementations, but instead have been defining it as a thing that is used as a unique reference within an implementation.
Talking with the folks who worked on the C client, the reason for using the bitshift values was for simple storage and comparison in a world where you lack things like sets.
I guess it wouldn't hurt anything to set the values to those bit-shift values just in case we want to use them later, and make the decision on if we do or not when we get to that point with the spec.
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.
I think the question is more: "is this a value that we want to expose in any artifact that might cross implementations?"
We have precedent for values like this in, for example, the cache entry identifier and encryption context sorting order.
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.
Then I vote bit flags all the way down.
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