Skip to content

Commit 04b5f94

Browse files
authored
Merge pull request #218 from mattsb42-aws/kms-keyring-reorg
Add AWS KMS keyring
2 parents 71b795d + d2bbb7b commit 04b5f94

24 files changed

+1881
-462
lines changed

doc/index.rst

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Modules
1515
aws_encryption_sdk.caches.local
1616
aws_encryption_sdk.caches.null
1717
aws_encryption_sdk.keyrings.base
18+
aws_encryption_sdk.keyrings.aws_kms
19+
aws_encryption_sdk.keyrings.aws_kms.client_suppliers
1820
aws_encryption_sdk.keyrings.multi
1921
aws_encryption_sdk.keyrings.raw
2022
aws_encryption_sdk.key_providers.base
@@ -40,6 +42,8 @@ Modules
4042
aws_encryption_sdk.internal.formatting.serialize
4143
aws_encryption_sdk.internal.str_ops
4244
aws_encryption_sdk.internal.structures
45+
aws_encryption_sdk.internal.validators
4346
aws_encryption_sdk.internal.utils
47+
aws_encryption_sdk.keyrings.aws_kms._client_cache
4448

4549
.. include:: ../CHANGELOG.rst

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ force_grid_wrap = 0
5252
combine_as_imports = True
5353
not_skip = __init__.py
5454
known_first_party = aws_encryption_sdk
55-
known_third_party = attr,awses_test_vectors,basic_encryption,basic_file_encryption_with_multiple_providers,basic_file_encryption_with_raw_key_provider,boto3,botocore,cryptography,data_key_caching_basic,integration_test_utils,mock,pytest,pytest_mock,setuptools,six,typing,wrapt
55+
known_third_party = attr,awacs,aws_encryption_sdk_decrypt_oracle,awses_test_vectors,boto3,botocore,chalice,cryptography,integration_test_utils,mock,moto,pytest,pytest_mock,requests,setuptools,six,troposphere,wrapt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
"""Common ``attrs`` validators."""
4+
import attr # only used by mypy, so pylint: disable=unused-import
5+
import six
6+
7+
try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
8+
from typing import Any # noqa pylint: disable=unused-import
9+
except ImportError: # pragma: no cover
10+
# We only actually need these imports when running the mypy checks
11+
pass
12+
13+
14+
def value_is_not_a_string(instance, attribute, value):
15+
# type: (Any, attr.Attribute, Any) -> None
16+
"""Technically a string is an iterable containing strings.
17+
18+
This validator lets you accept other iterators but not strings.
19+
"""
20+
if isinstance(value, six.string_types):
21+
raise TypeError("'{}' must not a string".format(attribute.name))

0 commit comments

Comments
 (0)