Skip to content

initial commit kms-keyring #9

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 14 commits into from
Apr 4, 2019
Merged

initial commit kms-keyring #9

merged 14 commits into from
Apr 4, 2019

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Mar 15, 2019

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@seebees seebees requested a review from a team March 15, 2019 20:44
@seebees seebees changed the title initial commit kms-keyring-node initial commit kms-keyring Mar 15, 2019
seebees added 6 commits March 21, 2019 16:59
package updates and comment language
Fix file name
# Conflicts:
#	modules/kms-keyring-node/package.json
#	modules/kms-keyring-node/src/index.ts
kms-keyring tests

kms-keyring lint

kms-keyring lint
SalusaSecondus
SalusaSecondus previously approved these changes Mar 27, 2019
Copy link

@SalusaSecondus SalusaSecondus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no obvious cryptographic problems.

mattsb42-aws
mattsb42-aws previously approved these changes Mar 28, 2019
@seebees seebees dismissed stale reviews from mattsb42-aws and SalusaSecondus via a55afd3 March 29, 2019 00:09

constructor ({ clientProvider, generatorKeyId, keyIds = [], grantTokens, discovery }: KmsKeyringInput<Client>) {
super()
/* Precondition: This is an abstract class. (But TypeScript does not have a clean way to model this) */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP/commenting: this is no longer an abstract class

/* Precondition: This is an abstract class. (But TypeScript does not have a clean way to model this) */
needs(this.constructor !== KmsKeyring, 'new KmsKeyring is not allowed')
/* Precondition: A noop KmsKeyring is not allowed. You must explicitly set discovery or keyIds. */
needs(!!discovery !== !!(generatorKeyId || keyIds.length), 'Noop keyring is not allowed: Set a keyId or discovery')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a confusing error message if I make the inverse: not a no-op, but instead a discovery and also key IDs.

@seebees seebees merged commit 68b7a0e into aws:master Apr 4, 2019
@seebees seebees deleted the add-kms-keyring branch April 4, 2019 23:15
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

Successfully merging this pull request may close these issues.

3 participants