-
Notifications
You must be signed in to change notification settings - Fork 85
feat: remove specific value definition for keyring trace flags #215 #225
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
WRAPPING_KEY_SIGNED_ENC_CTX = KeyringTraceFlagValue("WRAPPING_KEY_SIGNED_ENC_CTX") | ||
WRAPPING_KEY_VERIFIED_ENC_CTX = KeyringTraceFlagValue("WRAPPING_KEY_VERIFIED_ENC_CTX") |
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.
Any reason these need to be appreviated?
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.
See reason for WRAPPING_KEY_
prefix.
|
||
name = attr.ib() | ||
|
||
WRAPPING_KEY_GENERATED_DATA_KEY = KeyringTraceFlagValue("WRAPPING_KEY_GENERATED_DATA_KEY") |
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.
Do these need to all start with "WRAPPING_KEY"?
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 we went with that because that's what the prevailing naming was at the time (last summer). It looks like the names in the spec are now the simpler version. I'll update to use those names instead.
|
||
WRAPPING_KEY_GENERATED_DATA_KEY = KeyringTraceFlagValue("WRAPPING_KEY_GENERATED_DATA_KEY") | ||
WRAPPING_KEY_ENCRYPTED_DATA_KEY = KeyringTraceFlagValue("WRAPPING_KEY_ENCRYPTED_DATA_KEY") | ||
WRAPPING_KEY_DECRYPTED_DATA_KEY = KeyringTraceFlagValue("WRAPPING_KEY_DECRYPTED_DATA_KEY") |
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.
You could put a comment for each of these, copying the description from the spec, like https://github.com/aws/aws-encryption-sdk-java/blob/930793314224381e37a1331b685069a0bd55e6aa/src/main/java/com/amazonaws/encryptionsdk/keyrings/KeyringTraceFlag.java#L33
Issue #, if available:
resolves: #215
Description of changes:
Addresses the issues discussed in #215.
I went with a custom class rather than just
object()
because it turns out thatcopy.deepcopy
cannot copy bare instances ofobject
.attrs
also gives us a nicerrepr
value.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: