Skip to content

chore(MPL): Rename MPL Python package #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/src/aws_kms_discovery_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_discovery_multi_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_mrk_discovery_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_mrk_discovery_multi_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_mrk_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_mrk_multi_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,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, 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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_multi_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/aws_kms_rsa_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/src/branch_key_id_supplier_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
16 changes: 8 additions & 8 deletions examples/src/custom_mpl_cmm_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/file_streaming_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions examples/src/hierarchical_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/migration/migration_aws_kms_key_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/migration/migration_raw_aes_key_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/migration/migration_raw_rsa_key_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/multi_keyring_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/src/multithreading/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions examples/src/multithreading/raw_aes_keyring.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Loading
Loading