Skip to content

Commit 7bee34b

Browse files
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 03d3a06 commit 7bee34b

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
@@ -131,7 +131,10 @@ pre-existing instance of a ``botocore session`` to the ``StrictAwsKmsMasterKeyPr
131131
This latter option can be useful if you have an alternate way to store your AWS credentials or
132132
you want to reuse an existing instance of a botocore session in order to decrease startup costs.
133133

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

@@ -315,6 +318,7 @@ to your use-case in order to obtain peak performance.
315318
.. _GitHub: https://github.com/aws/aws-encryption-sdk-python/
316319
.. _AWS KMS: https://docs.aws.amazon.com/kms/latest/developerguide/overview.html
317320
.. _KMS customer master key (CMK): https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
321+
.. _KMS key identifier: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id
318322
.. _boto3 SDK: https://boto3.readthedocs.io/en/latest/
319323
.. _standard means by which boto3 locates credentials: https://boto3.readthedocs.io/en/latest/guide/configuration.html
320324
.. _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
@@ -237,7 +237,6 @@ class StrictAwsKmsMasterKeyProvider(BaseKMSMasterKeyProvider):
237237
... 'arn:aws:kms:us-east-1:2222222222222:key/22222222-2222-2222-2222-222222222222',
238238
... 'arn:aws:kms:us-east-1:3333333333333:key/33333333-3333-3333-3333-333333333333'
239239
... ])
240-
>>> kms_key_provider.add_master_key('arn:aws:kms:ap-northeast-1:4444444444444:alias/another-key')
241240
242241
.. note::
243242
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)