-
Notifications
You must be signed in to change notification settings - Fork 86
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
chore: Add example for custom KMS client config #440
Conversation
Occasionally custom configuration for the AWS KMS client is needed. This is especially important in Discovery mode, But anytime you are dealing with more than one AWS KMS Key, the master key providers are simpler to work with then individual master keys.
self._register_client(client, region_name) | ||
self._regional_clients[region_name] = client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: IMO by including this in the official examples, this implicitly blesses these private methods as part of the public API for this class. Not sure if that's an issue or not, depending on the plans for the future of the codebase. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it may be better to refactor this example as:
main_mk = StrictAwsKmsMasterKeyProvider(providerConfig)
main_mk.add_master_key(MRKAwareKMSMasterKey(anotherConfig))
However this does not address discovery.
This will resolve #446. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapproving after syntax fixes.
Occasionally custom configuration for the AWS KMS client is needed.
This is especially important in Discovery mode,
But anytime you are dealing with more than one AWS KMS Key,
the master key providers are simpler to work with then individual master keys.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: