Skip to content

Commit 246f315

Browse files
farleyb-amazonrobin-aws
authored andcommitted
chore: Update README section on using StrictAwsKmsKeyProvider (#312)
* chore: Update README section on using StrictAwsKmsKeyProvider Be more explicit about the fact that, when using a StrictAwsKmsMasterKeyProvider, key aliases are not supported on decryption * chore: remove test requirement dependency on old versions of attrs
1 parent 1b4d9ce commit 246f315

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ pre-existing instance of a ``botocore session`` to the ``StrictAwsKmsMasterKeyPr
128128
This latter option can be useful if you have an alternate way to store your AWS credentials or
129129
you want to reuse an existing instance of a botocore session in order to decrease startup costs.
130130

131-
To create a ``StrictAwsKmsMasterKeyProvider`` you must provide one or more CMKs.
131+
To create a ``StrictAwsKmsMasterKeyProvider`` you must provide one or more CMKs. For providers that will only
132+
be used for encryption, you can use any valid `KMS key identifier`_. For providers that will be used for decryption, you
133+
must use the key ARN; key ids, alias names, and alias ARNs are not supported.
134+
132135
If you configure the the ``StrictAwsKmsMasterKeyProvider`` with multiple CMKs, the `final message`_
133136
will include a copy of the data key encrypted by each configured CMK.
134137

@@ -312,6 +315,7 @@ to your use-case in order to obtain peak performance.
312315
.. _GitHub: https://github.com/aws/aws-encryption-sdk-python/
313316
.. _AWS KMS: https://docs.aws.amazon.com/kms/latest/developerguide/overview.html
314317
.. _KMS customer master key (CMK): https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
318+
.. _KMS key identifier: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id
315319
.. _boto3 SDK: https://boto3.readthedocs.io/en/latest/
316320
.. _standard means by which boto3 locates credentials: https://boto3.readthedocs.io/en/latest/guide/configuration.html
317321
.. _final message: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/message-format.html

src/aws_encryption_sdk/key_providers/kms.py

-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ class StrictAwsKmsMasterKeyProvider(BaseKMSMasterKeyProvider):
283283
... 'arn:aws:kms:us-east-1:2222222222222:key/22222222-2222-2222-2222-222222222222',
284284
... 'arn:aws:kms:us-east-1:3333333333333:key/33333333-3333-3333-3333-333333333333'
285285
... ])
286-
>>> kms_key_provider.add_master_key('arn:aws:kms:ap-northeast-1:4444444444444:alias/another-key')
287286
288287
.. note::
289288
If no botocore_session is provided, the default botocore session will be used.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
aws-encryption-sdk==1.7.1
2-
attrs<19.2.0
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
aws-encryption-sdk==2.0.0
2-
attrs<19.2.0

0 commit comments

Comments
 (0)