Skip to content

[keyring] keyring trace flag values #215

Closed
@mattsb42-aws

Description

@mattsb42-aws

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions