Skip to content

[keyring] Enable use of keyrings #211

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
9 tasks done
mattsb42-aws opened this issue Feb 20, 2020 · 0 comments
Closed
9 tasks done

[keyring] Enable use of keyrings #211

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

Comments

@mattsb42-aws
Copy link
Member

mattsb42-aws commented Feb 20, 2020

We have some keyrings defined, but we can't actually use them yet.

Following on from #209, I think that trying to build an abstraction layer that lets master key providers (MKPs) pretend to be keyrings is not viable. There are just too many subtle differences in the APIs, including:

  • MKPs accept the plaintext length and plaintext body as input on encrypt. Keyrings do not. We've been trying to discourage this usage for a while, but we can't just cut it off without potentially breaking custom MKPs that might use these values.
  • MKPs implicitly assume that they are generating the data key. This could work out ok if you never combine the MKP keyring wrapper with any other keyrings, but if you ever do then the potential issues expand significantly.

Instead, we're just going to expand the default CMM to accept either an MKP or a keyring, and contain the complexity there.

Testing this will require:

  • DefaultCryptoMaterialsManager MUST accept either a MKP or a keyring and require exactly one
  • DefaultCryptoMaterialsManager MUST fail if the keyring could not complete the cryptographic materials
  • DefaultCryptoMaterialsManager MUST fail if the keyring changes the algorithm, encryption context, or signing/verification key from the requested materials
  • CachingCryptoMaterialsManager MUST accept either a MKP or a keyring and require exactly one
  • StreamEncryptor MUST accept either a MKP or a keyring and require exactly one
  • StreamDecryptor MUST accept either a MKP or a keyring and require exactly one
  • All functional and integration tests must test with both MKPs and keyrings
  • raw MKPs and keyrings MUST inter-operate end-to-end
  • AWS KMS MKPs and keyrings MUST interoperate end-to-end
@mattsb42-aws mattsb42-aws mentioned this issue Feb 20, 2020
10 tasks
@mattsb42-aws mattsb42-aws self-assigned this Feb 20, 2020
@mattsb42-aws mattsb42-aws added this to the keyrings milestone Feb 21, 2020
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