Skip to content

feat: change KMS discovery keyring configuration path #228

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 2 commits into from
Mar 25, 2020
Merged

feat: change KMS discovery keyring configuration path #228

merged 2 commits into from
Mar 25, 2020

Conversation

mattsb42-aws
Copy link
Member

Issue #, if available:
resolves #227

Description of changes:

Reasoning is described in #227 and awslabs/aws-encryption-sdk-specification#84.
The short version is that rather than discovery being a derived property that is the result of an absence of key IDs, discovery is now an explicit parameter that is incompatible with key IDs being supplied.

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

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

I would add a test for your neither case

@mattsb42-aws
Copy link
Member Author

@mattsb42-aws mattsb42-aws added this to the keyrings milestone Mar 25, 2020
@mattsb42-aws mattsb42-aws requested a review from seebees March 25, 2020 18:57
seebees
seebees previously approved these changes Mar 25, 2020
Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

LGTM

raise TypeError("is_discovery cannot be True if key IDs are provided")

if neither:
raise TypeError("No key IDs provided")
Copy link
Contributor

Choose a reason for hiding this comment

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

You could mention discovery in the error message, something like "Key IDs are required for non-discovery KMS Keyrings.", so the user knows about discovery if they actually didn't want to supply key ids

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, misread that; actually in the error message. Sure.

@mattsb42-aws mattsb42-aws merged commit 1dac283 into aws:keyring Mar 25, 2020
@mattsb42-aws mattsb42-aws deleted the dev-227 branch March 25, 2020 21:27
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