diff --git a/examples/src/aws_kms_discovery_keyring_example.py b/examples/src/aws_kms_discovery_keyring_example.py index 3baa668d4..ba02b62a7 100644 --- a/examples/src/aws_kms_discovery_keyring_example.py +++ b/examples/src/aws_kms_discovery_keyring_example.py @@ -33,14 +33,14 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsDiscoveryKeyringInput, CreateAwsKmsKeyringInput, DiscoveryFilter, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_discovery_multi_keyring_example.py b/examples/src/aws_kms_discovery_multi_keyring_example.py index d07d499b2..5dd85f99c 100644 --- a/examples/src/aws_kms_discovery_multi_keyring_example.py +++ b/examples/src/aws_kms_discovery_multi_keyring_example.py @@ -30,14 +30,14 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsDiscoveryMultiKeyringInput, CreateAwsKmsKeyringInput, DiscoveryFilter, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_keyring_example.py b/examples/src/aws_kms_keyring_example.py index dc18dadc2..8590b35ef 100644 --- a/examples/src/aws_kms_keyring_example.py +++ b/examples/src/aws_kms_keyring_example.py @@ -18,10 +18,10 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_mrk_discovery_keyring_example.py b/examples/src/aws_kms_mrk_discovery_keyring_example.py index a93552532..a88e1ae20 100644 --- a/examples/src/aws_kms_mrk_discovery_keyring_example.py +++ b/examples/src/aws_kms_mrk_discovery_keyring_example.py @@ -35,14 +35,14 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsMrkDiscoveryKeyringInput, CreateAwsKmsMrkKeyringInput, DiscoveryFilter, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_mrk_discovery_multi_keyring_example.py b/examples/src/aws_kms_mrk_discovery_multi_keyring_example.py index 958683a19..26412e2b2 100644 --- a/examples/src/aws_kms_mrk_discovery_multi_keyring_example.py +++ b/examples/src/aws_kms_mrk_discovery_multi_keyring_example.py @@ -37,14 +37,14 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsMrkDiscoveryMultiKeyringInput, CreateAwsKmsMrkKeyringInput, DiscoveryFilter, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_mrk_keyring_example.py b/examples/src/aws_kms_mrk_keyring_example.py index 8611a6120..1cadfec45 100644 --- a/examples/src/aws_kms_mrk_keyring_example.py +++ b/examples/src/aws_kms_mrk_keyring_example.py @@ -22,10 +22,10 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsMrkKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsMrkKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_mrk_multi_keyring_example.py b/examples/src/aws_kms_mrk_multi_keyring_example.py index 9c32affb8..d9514d961 100644 --- a/examples/src/aws_kms_mrk_multi_keyring_example.py +++ b/examples/src/aws_kms_mrk_multi_keyring_example.py @@ -28,10 +28,13 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsMrkKeyringInput, CreateAwsKmsMrkMultiKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( + CreateAwsKmsMrkKeyringInput, + CreateAwsKmsMrkMultiKeyringInput, +) +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_multi_keyring_example.py b/examples/src/aws_kms_multi_keyring_example.py index 4e74eafc8..69928ccd7 100644 --- a/examples/src/aws_kms_multi_keyring_example.py +++ b/examples/src/aws_kms_multi_keyring_example.py @@ -38,10 +38,10 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput, CreateAwsKmsMultiKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput, CreateAwsKmsMultiKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/aws_kms_rsa_keyring_example.py b/examples/src/aws_kms_rsa_keyring_example.py index e86ea6973..4750660eb 100644 --- a/examples/src/aws_kms_rsa_keyring_example.py +++ b/examples/src/aws_kms_rsa_keyring_example.py @@ -15,10 +15,10 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsRsaKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsRsaKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/branch_key_id_supplier_example.py b/examples/src/branch_key_id_supplier_example.py index b25d9abeb..a14e8eae3 100644 --- a/examples/src/branch_key_id_supplier_example.py +++ b/examples/src/branch_key_id_supplier_example.py @@ -2,8 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 """Example implementation of a branch key ID supplier.""" -from aws_cryptographic_materialproviders.mpl.models import GetBranchKeyIdInput, GetBranchKeyIdOutput -from aws_cryptographic_materialproviders.mpl.references import IBranchKeyIdSupplier +from aws_cryptographic_material_providers.mpl.models import GetBranchKeyIdInput, GetBranchKeyIdOutput +from aws_cryptographic_material_providers.mpl.references import IBranchKeyIdSupplier from typing import Dict # noqa pylint: disable=wrong-import-order diff --git a/examples/src/custom_mpl_cmm_example.py b/examples/src/custom_mpl_cmm_example.py index 544ca5f00..b9a8f043f 100644 --- a/examples/src/custom_mpl_cmm_example.py +++ b/examples/src/custom_mpl_cmm_example.py @@ -23,13 +23,13 @@ https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#crypt-materials-manager """ -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateDefaultCryptographicMaterialsManagerInput, SignatureAlgorithmNone, ) -from aws_cryptographic_materialproviders.mpl.references import ICryptographicMaterialsManager, IKeyring +from aws_cryptographic_material_providers.mpl.references import ICryptographicMaterialsManager, IKeyring import aws_encryption_sdk from aws_encryption_sdk import CommitmentPolicy @@ -65,10 +65,10 @@ def __init__(self, keyring: IKeyring, cmm: ICryptographicMaterialsManager = None def get_encryption_materials(self, param): """Provides encryption materials appropriate for the request for the custom CMM. - :param aws_cryptographic_materialproviders.mpl.models.GetEncryptionMaterialsInput param: Input object to + :param aws_cryptographic_material_providers.mpl.models.GetEncryptionMaterialsInput param: Input object to provide to a crypto material manager's `get_encryption_materials` method. :returns: Encryption materials output - :rtype: aws_cryptographic_materialproviders.mpl.models.GetEncryptionMaterialsOutput + :rtype: aws_cryptographic_material_providers.mpl.models.GetEncryptionMaterialsOutput """ materials = self.underlying_cmm.get_encryption_materials(param) if isinstance(materials.encryption_materials.algorithm_suite.signature, SignatureAlgorithmNone): @@ -81,10 +81,10 @@ def get_encryption_materials(self, param): def decrypt_materials(self, param): """Provides decryption materials appropriate for the request for the custom CMM. - :param aws_cryptographic_materialproviders.mpl.models.DecryptMaterialsInput param: Input object to provide + :param aws_cryptographic_material_providers.mpl.models.DecryptMaterialsInput param: Input object to provide to a crypto material manager's `decrypt_materials` method. :returns: Decryption materials output - :rtype: aws_cryptographic_materialproviders.mpl.models.GetDecryptionMaterialsOutput + :rtype: aws_cryptographic_material_providers.mpl.models.GetDecryptionMaterialsOutput """ materials = self.underlying_cmm.decrypt_materials(param) if isinstance(materials.decryption_materials.algorithm_suite.signature, SignatureAlgorithmNone): diff --git a/examples/src/default_cryptographic_materials_manager_example.py b/examples/src/default_cryptographic_materials_manager_example.py index 091e79ada..e60b1cea7 100644 --- a/examples/src/default_cryptographic_materials_manager_example.py +++ b/examples/src/default_cryptographic_materials_manager_example.py @@ -18,13 +18,13 @@ https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/concepts.html#crypt-materials-manager """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsKeyringInput, CreateDefaultCryptographicMaterialsManagerInput, ) -from aws_cryptographic_materialproviders.mpl.references import ICryptographicMaterialsManager, IKeyring +from aws_cryptographic_material_providers.mpl.references import ICryptographicMaterialsManager, IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/file_streaming_example.py b/examples/src/file_streaming_example.py index debbb6859..56953f667 100644 --- a/examples/src/file_streaming_example.py +++ b/examples/src/file_streaming_example.py @@ -25,10 +25,10 @@ import filecmp import secrets -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/hierarchical_keyring_example.py b/examples/src/hierarchical_keyring_example.py index 92efa2865..a325491e3 100644 --- a/examples/src/hierarchical_keyring_example.py +++ b/examples/src/hierarchical_keyring_example.py @@ -35,17 +35,17 @@ import boto3 # Ignore missing MPL for pylint, but the MPL is required for this example # noqa pylint: disable=import-error -from aws_cryptographic_materialproviders.keystore import KeyStore -from aws_cryptographic_materialproviders.keystore.config import KeyStoreConfig -from aws_cryptographic_materialproviders.keystore.models import CreateKeyInput, KMSConfigurationKmsKeyArn -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.keystore import KeyStore +from aws_cryptographic_material_providers.keystore.config import KeyStoreConfig +from aws_cryptographic_material_providers.keystore.models import CreateKeyInput, KMSConfigurationKmsKeyArn +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CacheTypeDefault, CreateAwsKmsHierarchicalKeyringInput, DefaultCache, ) -from aws_cryptographic_materialproviders.mpl.references import IBranchKeyIdSupplier, IKeyring +from aws_cryptographic_material_providers.mpl.references import IBranchKeyIdSupplier, IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/migration/migration_aws_kms_key_example.py b/examples/src/migration/migration_aws_kms_key_example.py index e0a577d20..c46c6f1c9 100644 --- a/examples/src/migration/migration_aws_kms_key_example.py +++ b/examples/src/migration/migration_aws_kms_key_example.py @@ -21,10 +21,10 @@ https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-kms-keyring.html """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/migration/migration_raw_aes_key_example.py b/examples/src/migration/migration_raw_aes_key_example.py index 4bd15d1f9..c00ec489e 100644 --- a/examples/src/migration/migration_raw_aes_key_example.py +++ b/examples/src/migration/migration_raw_aes_key_example.py @@ -26,10 +26,10 @@ """ import secrets -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/migration/migration_raw_rsa_key_example.py b/examples/src/migration/migration_raw_rsa_key_example.py index 22c9512ec..8d4d3f322 100644 --- a/examples/src/migration/migration_raw_rsa_key_example.py +++ b/examples/src/migration/migration_raw_rsa_key_example.py @@ -28,10 +28,10 @@ For more information on how to use Raw RSA keyrings, see https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-rsa-keyring.html """ -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateRawRsaKeyringInput, PaddingScheme -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateRawRsaKeyringInput, PaddingScheme +from aws_cryptographic_material_providers.mpl.references import IKeyring from cryptography.hazmat.backends import default_backend as crypto_default_backend from cryptography.hazmat.primitives import serialization as crypto_serialization from cryptography.hazmat.primitives.asymmetric import rsa diff --git a/examples/src/migration/migration_set_commitment_policy_example.py b/examples/src/migration/migration_set_commitment_policy_example.py index 81506e710..b698fd3ab 100644 --- a/examples/src/migration/migration_set_commitment_policy_example.py +++ b/examples/src/migration/migration_set_commitment_policy_example.py @@ -21,10 +21,10 @@ """ import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/multi_keyring_example.py b/examples/src/multi_keyring_example.py index f55b2aeca..2465c7c04 100644 --- a/examples/src/multi_keyring_example.py +++ b/examples/src/multi_keyring_example.py @@ -39,15 +39,15 @@ import secrets import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( AesWrappingAlg, CreateAwsKmsKeyringInput, CreateMultiKeyringInput, CreateRawAesKeyringInput, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/multithreading/__init__.py b/examples/src/multithreading/__init__.py index 4fdad58fd..6ac3d9a33 100644 --- a/examples/src/multithreading/__init__.py +++ b/examples/src/multithreading/__init__.py @@ -3,7 +3,7 @@ """init file for multi-threading examples.""" import time -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/multithreading/raw_aes_keyring.py b/examples/src/multithreading/raw_aes_keyring.py index 42a391344..65e4627b1 100644 --- a/examples/src/multithreading/raw_aes_keyring.py +++ b/examples/src/multithreading/raw_aes_keyring.py @@ -4,10 +4,10 @@ import secrets -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring def create_keyring(): diff --git a/examples/src/multithreading/raw_rsa_keyring.py b/examples/src/multithreading/raw_rsa_keyring.py index 77d26f2fc..06d2fe679 100644 --- a/examples/src/multithreading/raw_rsa_keyring.py +++ b/examples/src/multithreading/raw_rsa_keyring.py @@ -1,10 +1,10 @@ # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """This file contains methods to use for testing multi-threading for Raw RSA keyring.""" -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateRawRsaKeyringInput, PaddingScheme -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateRawRsaKeyringInput, PaddingScheme +from aws_cryptographic_material_providers.mpl.references import IKeyring from cryptography.hazmat.backends import default_backend as crypto_default_backend from cryptography.hazmat.primitives import serialization as crypto_serialization from cryptography.hazmat.primitives.asymmetric import rsa diff --git a/examples/src/raw_aes_keyring_example.py b/examples/src/raw_aes_keyring_example.py index a28c350ff..0e0b53491 100644 --- a/examples/src/raw_aes_keyring_example.py +++ b/examples/src/raw_aes_keyring_example.py @@ -23,10 +23,10 @@ """ import secrets -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/src/raw_rsa_keyring_example.py b/examples/src/raw_rsa_keyring_example.py index 22101bb57..e59a9581c 100644 --- a/examples/src/raw_rsa_keyring_example.py +++ b/examples/src/raw_rsa_keyring_example.py @@ -33,10 +33,10 @@ https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/use-raw-rsa-keyring.html """ -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateRawRsaKeyringInput, PaddingScheme -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateRawRsaKeyringInput, PaddingScheme +from aws_cryptographic_material_providers.mpl.references import IKeyring from cryptography.hazmat.backends import default_backend as crypto_default_backend from cryptography.hazmat.primitives import serialization as crypto_serialization from cryptography.hazmat.primitives.asymmetric import rsa diff --git a/examples/src/required_encryption_context_cmm.py b/examples/src/required_encryption_context_cmm.py index edbb3f414..8edf7545e 100644 --- a/examples/src/required_encryption_context_cmm.py +++ b/examples/src/required_encryption_context_cmm.py @@ -10,14 +10,14 @@ import boto3 # Ignore missing MPL for pylint, but the MPL is required for this example # noqa pylint: disable=import-error -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateAwsKmsKeyringInput, CreateDefaultCryptographicMaterialsManagerInput, CreateRequiredEncryptionContextCMMInput, ) -from aws_cryptographic_materialproviders.mpl.references import ICryptographicMaterialsManager, IKeyring +from aws_cryptographic_material_providers.mpl.references import ICryptographicMaterialsManager, IKeyring from typing import Dict, List # noqa pylint: disable=wrong-import-order import aws_encryption_sdk @@ -142,7 +142,7 @@ def encrypt_and_decrypt_with_keyring( try: plaintext_bytes_a, _ = client.decrypt( source=ciphertext, - materials_manager=required_ec_cmm, + materials_manager=underlying_cmm, # No reproduced encryption context for required EC CMM-produced message makes decryption fail. ) raise Exception("If this exception is raised, decryption somehow succeeded!") diff --git a/examples/src/set_encryption_algorithm_suite_example.py b/examples/src/set_encryption_algorithm_suite_example.py index 95c7a0938..f6df411aa 100644 --- a/examples/src/set_encryption_algorithm_suite_example.py +++ b/examples/src/set_encryption_algorithm_suite_example.py @@ -39,10 +39,10 @@ """ import secrets -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from typing import Dict # noqa pylint: disable=wrong-import-order import aws_encryption_sdk diff --git a/examples/test/test_i_custom_mpl_cmm_example.py b/examples/test/test_i_custom_mpl_cmm_example.py index d98b6b6b9..6791914c4 100644 --- a/examples/test/test_i_custom_mpl_cmm_example.py +++ b/examples/test/test_i_custom_mpl_cmm_example.py @@ -3,10 +3,10 @@ """Test suite for encryption and decryption using custom CMM.""" import boto3 import pytest -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from ..src.custom_mpl_cmm_example import MPLCustomSigningSuiteOnlyCMM, encrypt_decrypt_with_cmm diff --git a/performance_tests/requirements_mpl.txt b/performance_tests/requirements_mpl.txt index d9744a723..9d72dfb8e 100644 --- a/performance_tests/requirements_mpl.txt +++ b/performance_tests/requirements_mpl.txt @@ -1 +1 @@ -aws-cryptographic-materialproviders @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python \ No newline at end of file +aws-cryptographic-material-providers @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-main-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python diff --git a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/aws_kms_keyring.py b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/aws_kms_keyring.py index e846ec695..c05409ca4 100644 --- a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/aws_kms_keyring.py +++ b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/aws_kms_keyring.py @@ -4,10 +4,10 @@ import aws_encryption_sdk import boto3 -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring def create_keyring( diff --git a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/hierarchy_keyring.py b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/hierarchy_keyring.py index b1bdc6913..8ee7b8992 100644 --- a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/hierarchy_keyring.py +++ b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/hierarchy_keyring.py @@ -4,17 +4,17 @@ import aws_encryption_sdk import boto3 -from aws_cryptographic_materialproviders.keystore import KeyStore -from aws_cryptographic_materialproviders.keystore.config import KeyStoreConfig -from aws_cryptographic_materialproviders.keystore.models import KMSConfigurationKmsKeyArn -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.keystore import KeyStore +from aws_cryptographic_material_providers.keystore.config import KeyStoreConfig +from aws_cryptographic_material_providers.keystore.models import KMSConfigurationKmsKeyArn +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CacheTypeDefault, CreateAwsKmsHierarchicalKeyringInput, DefaultCache, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from ..utils.util import PerfTestUtils diff --git a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_aes_keyring.py b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_aes_keyring.py index a2a3c9ab1..08be9d216 100644 --- a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_aes_keyring.py +++ b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_aes_keyring.py @@ -3,10 +3,10 @@ """Performance tests for the Raw AES keyring.""" import aws_encryption_sdk -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import AesWrappingAlg, CreateRawAesKeyringInput +from aws_cryptographic_material_providers.mpl.references import IKeyring from ..utils.util import PerfTestUtils diff --git a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_rsa_keyring.py b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_rsa_keyring.py index 6eed281bd..48894330e 100644 --- a/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_rsa_keyring.py +++ b/performance_tests/src/aws_encryption_sdk_performance_tests/keyrings/raw_rsa_keyring.py @@ -2,10 +2,10 @@ # SPDX-License-Identifier: Apache-2.0 """Performance tests for the Raw RSA keyring.""" import aws_encryption_sdk -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import CreateRawRsaKeyringInput, PaddingScheme -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import CreateRawRsaKeyringInput, PaddingScheme +from aws_cryptographic_material_providers.mpl.references import IKeyring def create_keyring(public_key, private_key): diff --git a/requirements_mpl.txt b/requirements_mpl.txt index 5cbdb37a1..9d72dfb8e 100644 --- a/requirements_mpl.txt +++ b/requirements_mpl.txt @@ -1 +1 @@ -aws-cryptographic-materialproviders @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python +aws-cryptographic-material-providers @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-main-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python diff --git a/setup.py b/setup.py index 3af72f984..6260c1ad2 100644 --- a/setup.py +++ b/setup.py @@ -43,9 +43,9 @@ def get_requirements(): # TODO-MPL: Point at PyPI once MPL is released. # This blocks releasing ESDK-Python MPL integration. extras_require={ - "MPL": ["aws-cryptographic-materialproviders @" \ + "MPL": ["aws-cryptographic-material-providers @" \ "git+https://github.com/aws/aws-cryptographic-material-providers-library.git@" \ - "python-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python"], + "python-main-with-dafny-code#subdirectory=AwsCryptographicMaterialProviders/runtimes/python"], }, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/src/aws_encryption_sdk/__init__.py b/src/aws_encryption_sdk/__init__.py index 9f3525349..326dacc13 100644 --- a/src/aws_encryption_sdk/__init__.py +++ b/src/aws_encryption_sdk/__init__.py @@ -96,10 +96,10 @@ def encrypt(self, **kwargs): .. code:: python >>> import boto3 - >>> from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - >>> from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - >>> from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput - >>> from aws_cryptographic_materialproviders.mpl.references import IKeyring + >>> from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + >>> from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + >>> from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput + >>> from aws_cryptographic_material_providers.mpl.references import IKeyring >>> import aws_encryption_sdk >>> client = aws_encryption_sdk.EncryptionSDKClient() >>> mat_prov: AwsCryptographicMaterialProviders = AwsCryptographicMaterialProviders( @@ -129,7 +129,7 @@ def encrypt(self, **kwargs): :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider :param keyring: `IKeyring` that returns keyring for encryption (requires either `materials_manager` or `keyring`) - :type keyring: aws_cryptographic_materialproviders.mpl.references.IKeyring + :type keyring: aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: @@ -164,10 +164,10 @@ def decrypt(self, **kwargs): .. code:: python >>> import boto3 - >>> from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - >>> from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - >>> from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput - >>> from aws_cryptographic_materialproviders.mpl.references import IKeyring + >>> from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + >>> from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + >>> from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput + >>> from aws_cryptographic_material_providers.mpl.references import IKeyring >>> import aws_encryption_sdk >>> client = aws_encryption_sdk.EncryptionSDKClient() >>> mat_prov: AwsCryptographicMaterialProviders = AwsCryptographicMaterialProviders( @@ -197,7 +197,7 @@ def decrypt(self, **kwargs): :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider :param keyring: `IKeyring` that returns keyring for encryption (requires either `materials_manager` or `keyring`) - :type keyring: aws_cryptographic_materialproviders.mpl.references.IKeyring + :type keyring: aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: @@ -238,10 +238,10 @@ def stream(self, **kwargs): .. code:: python >>> import boto3 - >>> from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - >>> from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - >>> from aws_cryptographic_materialproviders.mpl.models import CreateAwsKmsKeyringInput - >>> from aws_cryptographic_materialproviders.mpl.references import IKeyring + >>> from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + >>> from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + >>> from aws_cryptographic_material_providers.mpl.models import CreateAwsKmsKeyringInput + >>> from aws_cryptographic_material_providers.mpl.references import IKeyring >>> import aws_encryption_sdk >>> client = aws_encryption_sdk.EncryptionSDKClient() >>> mat_prov: AwsCryptographicMaterialProviders = AwsCryptographicMaterialProviders( diff --git a/src/aws_encryption_sdk/internal/formatting/serialize.py b/src/aws_encryption_sdk/internal/formatting/serialize.py index f2920a1ac..c9679a08d 100644 --- a/src/aws_encryption_sdk/internal/formatting/serialize.py +++ b/src/aws_encryption_sdk/internal/formatting/serialize.py @@ -196,7 +196,7 @@ def _serialize_header_auth_v1( :type signer: aws_encryption_sdk.Signer :param required_encryption_context_bytes: Serialized encryption context items for all items whose keys are in the required_encryption_context list. - This is ONLY processed if using the aws-cryptographic-materialproviders library + This is ONLY processed if using the aws-cryptographic-material-providers library AND its required encryption context CMM. (optional) :type required_encryption_context_bytes: bytes :returns: Serialized header authentication data @@ -250,7 +250,7 @@ def _serialize_header_auth_v2( :type signer: aws_encryption_sdk.Signer :param required_encryption_context_bytes: Serialized encryption context items for all items whose keys are in the required_encryption_context list. - This is ONLY processed if using the aws-cryptographic-materialproviders library + This is ONLY processed if using the aws-cryptographic-material-providers library AND its required encryption context CMM. (optional) :type required_encryption_context_bytes: bytes :returns: Serialized header authentication data @@ -306,7 +306,7 @@ def serialize_header_auth( :type signer: aws_encryption_sdk.Signer :param required_encryption_context_bytes: Serialized encryption context items for all items whose keys are in the required_encryption_context list. - This is ONLY processed if using the aws-cryptographic-materialproviders library + This is ONLY processed if using the aws-cryptographic-material-providers library AND its required encryption context CMM. (optional) :type required_encryption_context_bytes: bytes :returns: Serialized header authentication data diff --git a/src/aws_encryption_sdk/key_providers/base.py b/src/aws_encryption_sdk/key_providers/base.py index a855ee596..5fa99cc1c 100644 --- a/src/aws_encryption_sdk/key_providers/base.py +++ b/src/aws_encryption_sdk/key_providers/base.py @@ -12,6 +12,7 @@ ConfigMismatchError, DecryptKeyError, IncorrectMasterKeyError, + InvalidDataKeyError, InvalidKeyIdError, MasterKeyProviderError, ) @@ -256,7 +257,7 @@ def decrypt_data_key(self, encrypted_data_key, algorithm, encryption_context): # //# input encryption context. data_key = master_key.decrypt_data_key(encrypted_data_key, algorithm, encryption_context) - except (IncorrectMasterKeyError, DecryptKeyError) as error: + except (IncorrectMasterKeyError, DecryptKeyError, InvalidDataKeyError) as error: _LOGGER.debug( "%s raised when attempting to decrypt data key with master key %s", repr(error), @@ -304,8 +305,8 @@ def decrypt_data_key_from_list(self, encrypted_data_keys, algorithm, encryption_ try: data_key = self.decrypt_data_key(encrypted_data_key, algorithm, encryption_context) # MasterKeyProvider.decrypt_data_key throws DecryptKeyError - # but MasterKey.decrypt_data_key throws IncorrectMasterKeyError - except (DecryptKeyError, IncorrectMasterKeyError): + # but MasterKey.decrypt_data_key throws IncorrectMasterKeyError and InvalidDataKeyError + except (DecryptKeyError, IncorrectMasterKeyError, InvalidDataKeyError): continue else: break diff --git a/src/aws_encryption_sdk/materials_managers/__init__.py b/src/aws_encryption_sdk/materials_managers/__init__.py index 706770405..3d03e1f30 100644 --- a/src/aws_encryption_sdk/materials_managers/__init__.py +++ b/src/aws_encryption_sdk/materials_managers/__init__.py @@ -80,7 +80,7 @@ class DecryptionMaterialsRequest(object): :type encrypted_data_keys: set of `aws_encryption_sdk.structures.EncryptedDataKey` :param dict encryption_context: Encryption context to provide to master keys for underlying decrypt requests :param dict reproduced_encryption_context: Encryption context to provide on decrypt. - This is ONLY processed if using a CMM from the aws-cryptographic-materialproviders library. + This is ONLY processed if using a CMM from the aws-cryptographic-material-providers library. """ algorithm = attr.ib(validator=attr.validators.instance_of(Algorithm)) diff --git a/src/aws_encryption_sdk/materials_managers/mpl/cmm.py b/src/aws_encryption_sdk/materials_managers/mpl/cmm.py index 49a743f89..430417c0d 100644 --- a/src/aws_encryption_sdk/materials_managers/mpl/cmm.py +++ b/src/aws_encryption_sdk/materials_managers/mpl/cmm.py @@ -7,11 +7,11 @@ # pylint should pass even if the MPL isn't installed # Also thinks these imports aren't used if it can't import them # noqa pylint: disable=import-error,unused-import -from aws_cryptographic_materialproviders.mpl.errors import ( +from aws_cryptographic_material_providers.mpl.errors import ( AwsCryptographicMaterialProvidersException, CollectionOfErrors, ) -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl.models import ( AlgorithmSuiteIdESDK as MPL_AlgorithmSuiteIdESDK, CommitmentPolicyESDK as MPL_CommitmentPolicyESDK, DecryptMaterialsInput as MPL_DecryptMaterialsInput, @@ -20,7 +20,7 @@ GetEncryptionMaterialsInput as MPL_GetEncryptionMaterialsInput, GetEncryptionMaterialsOutput as MPL_GetEncryptionMaterialsOutput, ) -from aws_cryptographic_materialproviders.mpl.references import ( +from aws_cryptographic_material_providers.mpl.references import ( ICryptographicMaterialsManager as MPL_ICryptographicMaterialsManager, ) # noqa pylint: enable=import-error,unused-import @@ -38,7 +38,7 @@ class CryptoMaterialsManagerFromMPL(CryptoMaterialsManager): """ In instances where encryption materials are provided by an implementation of the MPL's - `aws_cryptographic_materialproviders.mpl.references.MPL_ICryptographicMaterialsManager`, + `aws_cryptographic_material_providers.mpl.references.MPL_ICryptographicMaterialsManager`, this maps the ESDK-Python CMM interfaces to the MPL CMM. """ diff --git a/src/aws_encryption_sdk/materials_managers/mpl/materials.py b/src/aws_encryption_sdk/materials_managers/mpl/materials.py index 54ea21b39..c2ae305ed 100644 --- a/src/aws_encryption_sdk/materials_managers/mpl/materials.py +++ b/src/aws_encryption_sdk/materials_managers/mpl/materials.py @@ -6,7 +6,7 @@ """ # pylint should pass even if the MPL isn't installed # noqa pylint: disable=import-error -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl.models import ( DecryptionMaterials as MPL_DecryptionMaterials, EncryptedDataKey as MPL_EncryptedDataKey, EncryptionMaterials as MPL_EncryptionMaterials, @@ -30,7 +30,7 @@ def _mpl_algorithm_id_to_native_algorithm_id(mpl_algorithm_id: str) -> int: class EncryptionMaterialsFromMPL(Native_EncryptionMaterials): """ In instances where encryption materials are be provided by - the MPL's `aws_cryptographic_materialproviders.mpl.models.EncryptionMaterials`, + the MPL's `aws_cryptographic_material_providers.mpl.models.EncryptionMaterials`, this maps the ESDK interfaces to the underlying MPL materials. """ @@ -107,7 +107,7 @@ def required_encryption_context_keys(self) -> bytes: class DecryptionMaterialsFromMPL(Native_DecryptionMaterials): """ In instances where decryption materials are be provided by - the MPL's `aws_cryptographic_materialproviders.mpl.models.DecryptionMaterials`, + the MPL's `aws_cryptographic_material_providers.mpl.models.DecryptionMaterials`, this maps the ESDK interfaces to the underlying MPL materials. """ diff --git a/src/aws_encryption_sdk/streaming_client.py b/src/aws_encryption_sdk/streaming_client.py index 64d77b91a..0eb5670b4 100644 --- a/src/aws_encryption_sdk/streaming_client.py +++ b/src/aws_encryption_sdk/streaming_client.py @@ -63,11 +63,11 @@ try: # pylint should pass even if the MPL isn't installed # noqa pylint: disable=import-error - from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - from aws_cryptographic_materialproviders.mpl.errors import AwsCryptographicMaterialProvidersException - from aws_cryptographic_materialproviders.mpl.models import CreateDefaultCryptographicMaterialsManagerInput - from aws_cryptographic_materialproviders.mpl.references import ( + from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + from aws_cryptographic_material_providers.mpl.errors import AwsCryptographicMaterialProvidersException + from aws_cryptographic_material_providers.mpl.models import CreateDefaultCryptographicMaterialsManagerInput + from aws_cryptographic_material_providers.mpl.references import ( ICryptographicMaterialsManager as MPL_ICryptographicMaterialsManager, IKeyring as MPL_IKeyring, ) @@ -425,10 +425,10 @@ class EncryptorConfig(_ClientConfig): :param key_provider: `MasterKeyProvider` from which to obtain data keys for encryption (either `materials_manager` or `key_provider` required) :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider - :param keyring: `IKeyring` from the aws_cryptographic_materialproviders library + :param keyring: `IKeyring` from the aws_cryptographic_material_providers library which handles encryption and decryption :type keyring: - aws_cryptographic_materialproviders.mpl.references.IKeyring + aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: @@ -480,10 +480,10 @@ class StreamEncryptor(_EncryptionStream): # pylint: disable=too-many-instance-a :param key_provider: `MasterKeyProvider` from which to obtain data keys for encryption (either `materials_manager` or `key_provider` required) :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider - :param keyring: `IKeyring` from the aws_cryptographic_materialproviders library + :param keyring: `IKeyring` from the aws_cryptographic_material_providers library which handles encryption and decryption :type keyring: - aws_cryptographic_materialproviders.mpl.references.IKeyring + aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: @@ -867,10 +867,10 @@ class DecryptorConfig(_ClientConfig): :param key_provider: `MasterKeyProvider` from which to obtain data keys for decryption (either `keyring`, `materials_manager` or `key_provider` required) :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider - :param keyring: `IKeyring` from the aws_cryptographic_materialproviders library + :param keyring: `IKeyring` from the aws_cryptographic_material_providers library which handles encryption and decryption :type keyring: - aws_cryptographic_materialproviders.mpl.references.IKeyring + aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: @@ -915,10 +915,10 @@ class StreamDecryptor(_EncryptionStream): # pylint: disable=too-many-instance-a :param key_provider: `MasterKeyProvider` from which to obtain data keys for decryption (either `materials_manager` or `key_provider` required) :type key_provider: aws_encryption_sdk.key_providers.base.MasterKeyProvider - :param keyring: `IKeyring` from the aws_cryptographic_materialproviders library + :param keyring: `IKeyring` from the aws_cryptographic_material_providers library which handles encryption and decryption :type keyring: - aws_cryptographic_materialproviders.mpl.references.IKeyring + aws_cryptographic_material_providers.mpl.references.IKeyring :param int source_length: Length of source data (optional) .. note:: diff --git a/test/mpl/integ/test_required_ec_cmm.py b/test/mpl/integ/test_required_ec_cmm.py index c99528f70..ab308ed54 100644 --- a/test/mpl/integ/test_required_ec_cmm.py +++ b/test/mpl/integ/test_required_ec_cmm.py @@ -3,9 +3,9 @@ import copy import pytest -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateDefaultCryptographicMaterialsManagerInput, CreateRequiredEncryptionContextCMMInput, ) diff --git a/test/mpl/unit/test_material_managers_mpl_cmm.py b/test/mpl/unit/test_material_managers_mpl_cmm.py index 603446550..e8d6ceb8b 100644 --- a/test/mpl/unit/test_material_managers_mpl_cmm.py +++ b/test/mpl/unit/test_material_managers_mpl_cmm.py @@ -6,8 +6,8 @@ """ import pytest -from aws_cryptographic_materialproviders.mpl.errors import AwsCryptographicMaterialProvidersException -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl.errors import AwsCryptographicMaterialProvidersException +from aws_cryptographic_material_providers.mpl.models import ( AlgorithmSuiteIdESDK as MPL_AlgorithmSuiteIdESDK, CommitmentPolicyESDK as MPL_CommitmentPolicyESDK, DecryptionMaterials as MPL_DecryptionMaterials, @@ -16,7 +16,7 @@ GetEncryptionMaterialsInput as MPL_GetEncryptionMaterialsInput, GetEncryptionMaterialsOutput as MPL_GetEncryptionMaterialsOutput, ) -from aws_cryptographic_materialproviders.mpl.references import ( +from aws_cryptographic_material_providers.mpl.references import ( ICryptographicMaterialsManager as MPL_ICryptographicMaterialsManager, ) from mock import MagicMock, patch diff --git a/test/mpl/unit/test_material_managers_mpl_materials.py b/test/mpl/unit/test_material_managers_mpl_materials.py index 8d9052c0a..0466a6424 100644 --- a/test/mpl/unit/test_material_managers_mpl_materials.py +++ b/test/mpl/unit/test_material_managers_mpl_materials.py @@ -6,7 +6,7 @@ """ import pytest -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl.models import ( DecryptionMaterials as MPL_DecryptionMaterials, EncryptedDataKey as MPL_EncryptedDataKey, EncryptionMaterials as MPL_EncryptionMaterials, diff --git a/test/mpl/utils.py b/test/mpl/utils.py index 0809aace4..a3168c02c 100644 --- a/test/mpl/utils.py +++ b/test/mpl/utils.py @@ -5,12 +5,12 @@ import string import boto3 -from aws_cryptographic_materialproviders.keystore import KeyStore -from aws_cryptographic_materialproviders.keystore.config import KeyStoreConfig -from aws_cryptographic_materialproviders.keystore.models import KMSConfigurationKmsKeyArn -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.keystore import KeyStore +from aws_cryptographic_material_providers.keystore.config import KeyStoreConfig +from aws_cryptographic_material_providers.keystore.models import KMSConfigurationKmsKeyArn +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( AesWrappingAlg, CacheTypeDefault, CreateAwsKmsHierarchicalKeyringInput, @@ -21,7 +21,7 @@ DefaultCache, PaddingScheme, ) -from aws_cryptographic_materialproviders.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.references import IKeyring from cryptography.hazmat.backends import default_backend as crypto_default_backend from cryptography.hazmat.primitives import serialization as crypto_serialization from cryptography.hazmat.primitives.asymmetric import rsa diff --git a/test/unit/test_streaming_client_configs.py b/test/unit/test_streaming_client_configs.py index fc066ef1a..d0ecefcf4 100644 --- a/test/unit/test_streaming_client_configs.py +++ b/test/unit/test_streaming_client_configs.py @@ -23,7 +23,7 @@ # Ideally, this logic would be based on mocking imports and testing logic, # but doing that introduces errors that cause other tests to fail. try: - from aws_cryptographic_materialproviders.mpl.references import ICryptographicMaterialsManager, IKeyring + from aws_cryptographic_material_providers.mpl.references import ICryptographicMaterialsManager, IKeyring HAS_MPL = True from aws_encryption_sdk.materials_managers.mpl.cmm import CryptoMaterialsManagerFromMPL diff --git a/test/unit/test_streaming_client_mpl_import.py b/test/unit/test_streaming_client_mpl_import.py index 638b04fd6..0dcd8a981 100644 --- a/test/unit/test_streaming_client_mpl_import.py +++ b/test/unit/test_streaming_client_mpl_import.py @@ -13,7 +13,7 @@ # Ideally, this logic would be based on mocking imports and testing logic, # but doing that introduces errors that cause other tests to fail. try: - import aws_cryptographic_materialproviders # noqa pylint: disable=unused-import + import aws_cryptographic_material_providers # noqa pylint: disable=unused-import HAS_MPL = True except ImportError: HAS_MPL = False diff --git a/test_vector_handlers/requirements_mpl.txt b/test_vector_handlers/requirements_mpl.txt index 6cffc62e6..6995b3187 100644 --- a/test_vector_handlers/requirements_mpl.txt +++ b/test_vector_handlers/requirements_mpl.txt @@ -1 +1 @@ -aws-cryptography-internal-mpl-testvectors @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-with-dafny-code#subdirectory=TestVectorsAwsCryptographicMaterialProviders/runtimes/python \ No newline at end of file +aws-cryptography-internal-mpl-testvectors @ git+https://github.com/aws/aws-cryptographic-material-providers-library.git@python-main-with-dafny-code#subdirectory=TestVectorsAwsCryptographicMaterialProviders/runtimes/python \ No newline at end of file diff --git a/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt.py b/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt.py index d1e7a6811..91b68287a 100644 --- a/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt.py +++ b/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt.py @@ -6,7 +6,7 @@ from awses_test_vectors.manifests.full_message.decrypt import MessageDecryptionManifest try: - import aws_cryptographic_materialproviders # noqa pylint: disable=unused-import,import-error + import aws_cryptographic_material_providers # noqa pylint: disable=unused-import,import-error _HAS_MPL = True except ImportError: _HAS_MPL = False diff --git a/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt_generate.py b/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt_generate.py index 49f2647fa..6383f7229 100644 --- a/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt_generate.py +++ b/test_vector_handlers/src/awses_test_vectors/commands/full_message_decrypt_generate.py @@ -6,7 +6,7 @@ from awses_test_vectors.manifests.full_message.decrypt_generation import MessageDecryptionGenerationManifest try: - import aws_cryptographic_materialproviders # noqa pylint: disable=unused-import,import-error + import aws_cryptographic_material_providers # noqa pylint: disable=unused-import,import-error _HAS_MPL = True except ImportError: _HAS_MPL = False diff --git a/test_vector_handlers/src/awses_test_vectors/commands/full_message_encrypt.py b/test_vector_handlers/src/awses_test_vectors/commands/full_message_encrypt.py index ba7579e6f..1025b9426 100644 --- a/test_vector_handlers/src/awses_test_vectors/commands/full_message_encrypt.py +++ b/test_vector_handlers/src/awses_test_vectors/commands/full_message_encrypt.py @@ -6,7 +6,7 @@ from awses_test_vectors.manifests.full_message.encrypt import MessageEncryptionManifest try: - import aws_cryptographic_materialproviders # noqa pylint: disable=unused-import,import-error + import aws_cryptographic_material_providers # noqa pylint: disable=unused-import,import-error _HAS_MPL = True except ImportError: _HAS_MPL = False diff --git a/test_vector_handlers/src/awses_test_vectors/internal/mpl/tampering_mpl_materials.py b/test_vector_handlers/src/awses_test_vectors/internal/mpl/tampering_mpl_materials.py index 29a820ecc..00a0eb252 100644 --- a/test_vector_handlers/src/awses_test_vectors/internal/mpl/tampering_mpl_materials.py +++ b/test_vector_handlers/src/awses_test_vectors/internal/mpl/tampering_mpl_materials.py @@ -16,9 +16,9 @@ from aws_encryption_sdk.materials_managers.mpl.cmm import ( CryptoMaterialsManagerFromMPL ) -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.models import ( +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.models import ( CreateDefaultCryptographicMaterialsManagerInput, ) diff --git a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt.py b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt.py index 79df4f2cf..0f5b2e680 100644 --- a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt.py +++ b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt.py @@ -29,10 +29,10 @@ try: from awses_test_vectors.manifests.mpl_keyring import KeyringSpec, keyring_from_master_key_specs - from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - from aws_cryptographic_materialproviders.mpl.references import ICryptographicMaterialsManager - from aws_cryptographic_materialproviders.mpl.models import ( + from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + from aws_cryptographic_material_providers.mpl.references import ICryptographicMaterialsManager + from aws_cryptographic_material_providers.mpl.models import ( CreateDefaultCryptographicMaterialsManagerInput, CreateRequiredEncryptionContextCMMInput, ) diff --git a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt_generation.py b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt_generation.py index 63f8b8ff3..2e94dc6a7 100644 --- a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt_generation.py +++ b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/decrypt_generation.py @@ -19,12 +19,12 @@ from aws_encryption_sdk.materials_managers.default import DefaultCryptoMaterialsManager try: - from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders - from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig - from aws_cryptographic_materialproviders.mpl.references import ( + from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders + from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig + from aws_cryptographic_material_providers.mpl.references import ( IKeyring, ) - from aws_cryptographic_materialproviders.mpl.models import ( + from aws_cryptographic_material_providers.mpl.models import ( CreateDefaultCryptographicMaterialsManagerInput, ) from aws_encryption_sdk.materials_managers.mpl.cmm import CryptoMaterialsManagerFromMPL diff --git a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/encrypt.py b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/encrypt.py index 81581fa8e..2a6795902 100644 --- a/test_vector_handlers/src/awses_test_vectors/manifests/full_message/encrypt.py +++ b/test_vector_handlers/src/awses_test_vectors/manifests/full_message/encrypt.py @@ -33,7 +33,7 @@ from aws_encryption_sdk.identifiers import Algorithm as AlgorithmSuite try: - from aws_cryptographic_materialproviders.mpl.references import ( + from aws_cryptographic_material_providers.mpl.references import ( IKeyring, ) diff --git a/test_vector_handlers/src/awses_test_vectors/manifests/master_key.py b/test_vector_handlers/src/awses_test_vectors/manifests/master_key.py index 7e64f9983..96af030d7 100644 --- a/test_vector_handlers/src/awses_test_vectors/manifests/master_key.py +++ b/test_vector_handlers/src/awses_test_vectors/manifests/master_key.py @@ -7,8 +7,9 @@ """ import attr import six +from aws_encryption_sdk.exceptions import InvalidKeyIdError from aws_encryption_sdk.identifiers import EncryptionKeyType, WrappingAlgorithm -from aws_encryption_sdk.key_providers.base import MasterKeyProvider # noqa pylint: disable=unused-import +from aws_encryption_sdk.key_providers.base import MasterKeyProvider, MasterKeyProviderConfig from aws_encryption_sdk.key_providers.kms import ( # noqa pylint: disable=unused-import DiscoveryFilter, KMSMasterKey, @@ -290,6 +291,44 @@ def scenario_spec(self): return spec +class TestVectorsMultiMasterKeyProvider(MasterKeyProvider): + """ + Provider for other MasterKeyProviders. + Acts as a "multi" MasterKeyProvider for use in test vectors. + + There is some disagreement between the spec + and how Python ESDK implements MasterKey; + this class fills that gap. + + In the ESDK-Python, MasterKey extends MasterKeyProvider; + i.e. MasterKey "is a" MasterKeyProvider; isinstance(some_master_key, MasterKeyProvider) == True. + + From AWS ESDK specification: + "A master key MUST supply itself and MUST NOT supply any other master keys." + https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/master-key-interface.md#get-master-key + + The MasterKey class overrides MasterKeyProvider's `decrypt_data_key` method to correct this gap. + However, this modification suggests that this "is a" relationship is not entirely true. + + master_key_provider_from_master_key_specs expects to return a MasterKeyProvider, not a MasterKey. + master_key_provider_from_master_key_specs uses this class to always return a MasterKeyProvider + that wraps any MasterKeyProvider or MasterKey loaded from a spec. + """ + + _config_class = MasterKeyProviderConfig + provider_id = "aws-test-vectors-multi-master-key-provider" + _members = [] + + def add_key(self, key_provider): + """Add a MKP to the list of configured MKPs.""" + self._members.append(key_provider) + + def _new_master_key(self, key_id): + # This MKP does not have a key associated with it. + # ESDK-Python will find keys in _members. + raise InvalidKeyIdError() + + def master_key_provider_from_master_key_specs(keys, master_key_specs): # type: (KeysManifest, Iterable[MasterKeySpec]) -> MasterKeyProvider """Build and combine all master key providers identified by the provided specs and @@ -312,8 +351,7 @@ def master_key_provider_from_master_key_specs(keys, master_key_specs): pass if len(master_keys) == 0: return None - primary = master_keys[0] - others = master_keys[1:] - for master_key in others: - primary.add_master_key_provider(master_key) - return primary + mkp = TestVectorsMultiMasterKeyProvider() + for master_key in master_keys: + mkp.add_key(master_key) + return mkp diff --git a/test_vector_handlers/src/awses_test_vectors/manifests/mpl_keyring.py b/test_vector_handlers/src/awses_test_vectors/manifests/mpl_keyring.py index f2ea05559..8d972d2c5 100644 --- a/test_vector_handlers/src/awses_test_vectors/manifests/mpl_keyring.py +++ b/test_vector_handlers/src/awses_test_vectors/manifests/mpl_keyring.py @@ -25,10 +25,10 @@ GetKeyDescriptionOutput, TestVectorKeyringInput, ) -from aws_cryptographic_materialproviders.mpl import AwsCryptographicMaterialProviders -from aws_cryptographic_materialproviders.mpl.config import MaterialProvidersConfig -from aws_cryptographic_materialproviders.mpl.references import IKeyring -from aws_cryptographic_materialproviders.mpl.models import CreateMultiKeyringInput +from aws_cryptographic_material_providers.mpl import AwsCryptographicMaterialProviders +from aws_cryptographic_material_providers.mpl.config import MaterialProvidersConfig +from aws_cryptographic_material_providers.mpl.references import IKeyring +from aws_cryptographic_material_providers.mpl.models import CreateMultiKeyringInput import _dafny from smithy_dafny_standard_library.internaldafny.generated import UTF8