Skip to content

Commit

Permalink
chore: Update README section on using StrictAwsKmsKeyProvider (#312)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
farleyb-amazon committed Dec 14, 2020
1 parent 03d3a06 commit 7bee34b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ pre-existing instance of a ``botocore session`` to the ``StrictAwsKmsMasterKeyPr
This latter option can be useful if you have an alternate way to store your AWS credentials or
you want to reuse an existing instance of a botocore session in order to decrease startup costs.

To create a ``StrictAwsKmsMasterKeyProvider`` you must provide one or more CMKs.
To create a ``StrictAwsKmsMasterKeyProvider`` you must provide one or more CMKs. For providers that will only
be used for encryption, you can use any valid `KMS key identifier`_. For providers that will be used for decryption, you
must use the key ARN; key ids, alias names, and alias ARNs are not supported.

If you configure the the ``StrictAwsKmsMasterKeyProvider`` with multiple CMKs, the `final message`_
will include a copy of the data key encrypted by each configured CMK.

Expand Down Expand Up @@ -315,6 +318,7 @@ to your use-case in order to obtain peak performance.
.. _GitHub: https://github.com/aws/aws-encryption-sdk-python/
.. _AWS KMS: https://docs.aws.amazon.com/kms/latest/developerguide/overview.html
.. _KMS customer master key (CMK): https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
.. _KMS key identifier: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id
.. _boto3 SDK: https://boto3.readthedocs.io/en/latest/
.. _standard means by which boto3 locates credentials: https://boto3.readthedocs.io/en/latest/guide/configuration.html
.. _final message: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/message-format.html
Expand Down
1 change: 0 additions & 1 deletion src/aws_encryption_sdk/key_providers/kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ class StrictAwsKmsMasterKeyProvider(BaseKMSMasterKeyProvider):
... 'arn:aws:kms:us-east-1:2222222222222:key/22222222-2222-2222-2222-222222222222',
... 'arn:aws:kms:us-east-1:3333333333333:key/33333333-3333-3333-3333-333333333333'
... ])
>>> kms_key_provider.add_master_key('arn:aws:kms:ap-northeast-1:4444444444444:alias/another-key')
.. note::
If no botocore_session is provided, the default botocore session will be used.
Expand Down
1 change: 0 additions & 1 deletion test_vector_handlers/compatibility-requirements/1.7.1
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
aws-encryption-sdk==1.7.1
attrs<19.2.0
1 change: 0 additions & 1 deletion test_vector_handlers/compatibility-requirements/2.0.0
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
aws-encryption-sdk==2.0.0
attrs<19.2.0

0 comments on commit 7bee34b

Please sign in to comment.