Most Recent Provider¶
Cryptographic materials provider that uses a provider store to obtain cryptographic materials.
CachingMostRecentProvider(provider_store, material_name, version_ttl, cache_size=1000)¶
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.
- 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
Return decryption materials.
Parameters: encryption_context (EncryptionContext) – Encryption context for request Raises: AttributeError – if no decryption materials are available
Return encryption materials.
Parameters: encryption_context (EncryptionContext) – Encryption context for request Raises: AttributeError – if no encryption materials are available
Clear all local caches for this provider.