Skip to content

[keyring] keyring trace flag values #215

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

Closed
mattsb42-aws opened this issue Feb 21, 2020 · 0 comments
Closed

[keyring] keyring trace flag values #215

mattsb42-aws opened this issue Feb 21, 2020 · 0 comments
Milestone

Comments

@mattsb42-aws
Copy link
Member

mattsb42-aws commented Feb 21, 2020

When we originally made keyring trace flag values in C[1], we used bit-shifts so that they could be combined efficiently in C data structures. When we made them in Javascript[2], we went ahead and used the same values.

As the result of further discussion, we decided that we did not have any explicit intention for these values to be serialized in any way, and as such defining them with common values was potentially misleading. This is why the specification[3] does not mention any value for these flags, rather simply stating that what each flag means. In Java[4], we followed through on this decision and did not define any values. The flag values in Python were originally written before we came to this decision.

In order to avoid potential confusion, we should change the enum values to something else. Just a counter or an instance of object is fine, though it might be nice to have something explicit.

[1] https://github.com/aws/aws-encryption-sdk-c/blob/969c71d7b48a9c48e00a3ec8bc420c245681bab9/include/aws/cryptosdk/keyring_trace.h#L56-L79
[2] https://github.com/aws/aws-encryption-sdk-javascript/blob/7dfa1ae1a4696d4829c47033058d1157d6e11b0d/modules/material-management/src/keyring_trace.ts#L51-L74
[3] https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/structures.md#flags
[4] https://github.com/aws/aws-encryption-sdk-java/blob/f4973ec91598d662079159a3187d142c0e82d5b3/src/main/java/com/amazonaws/encryptionsdk/keyrings/KeyringTraceFlag.java#L20-L49

@mattsb42-aws mattsb42-aws mentioned this issue Feb 21, 2020
10 tasks
@mattsb42-aws mattsb42-aws added this to the keyrings milestone Feb 21, 2020
mattsb42-aws added a commit that referenced this issue Mar 23, 2020
…225)

* feat: remove specific value definition for keyring trace flags #215

* chore: autoformat

* feat: rename keyring trace flags to match names in specification

* docs: add docs explaining each keyring trace flag

* chore: fix linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant