Most Recent Provider
Cryptographic materials provider that uses a provider store to obtain cryptographic materials.
- class dynamodb_encryption_sdk.material_providers.most_recent.CachingMostRecentProvider(provider_store: dynamodb_encryption_sdk.material_providers.store.ProviderStore, material_name: str, version_ttl: float, cache_size: int = 1000)[source]
Bases:
dynamodb_encryption_sdk.material_providers.CryptographicMaterialsProvider
Cryptographic materials provider that uses a provider store to obtain cryptography materials. Materials obtained from the store are cached for a user-defined amount of time, then removed from the cache and re-retrieved from the store.
When encrypting, the most recent provider that the provider store knows about will always be used.
- Parameters
provider_store (ProviderStore) – Provider store to use
material_name (str) – Name of materials for which to ask the provider store
version_ttl (float) – Max time in seconds to go until checking with provider store for a more recent version
cache_size (int) – The maximum number of entries that the cache can hold
- decryption_materials(encryption_context: dynamodb_encryption_sdk.structures.EncryptionContext) dynamodb_encryption_sdk.materials.CryptographicMaterials [source]
Return decryption materials.
- Parameters
encryption_context (EncryptionContext) – Encryption context for request
- Raises
AttributeError – if no decryption materials are available
- encryption_materials(encryption_context: dynamodb_encryption_sdk.structures.EncryptionContext) dynamodb_encryption_sdk.materials.CryptographicMaterials [source]
Return encryption materials.
- Parameters
encryption_context (EncryptionContext) – Encryption context for request
- Raises
AttributeError – if no encryption materials are available