Class EnvKeyProvider
java.lang.Object
com.kingsrook.qqq.backend.core.crypto.AbstractLookupKeyProvider
com.kingsrook.qqq.backend.core.crypto.EnvKeyProvider
- All Implemented Interfaces:
QKeyProviderInterface
Key provider that reads base64 keys from environment variables - which is
how Infisical-via-ESO and Kubernetes secrets arrive. The keyRef is the
variable name; see AbstractLookupKeyProvider for the version convention.
The environment lookup is injectable, for tests.
-
Field Summary
Fields inherited from class com.kingsrook.qqq.backend.core.crypto.AbstractLookupKeyProvider
DEFAULT_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionConstructor - reads the real process environment.EnvKeyProvider(Function<String, String> envLookup) Constructor with an injectable environment lookup. -
Method Summary
Methods inherited from class com.kingsrook.qqq.backend.core.crypto.AbstractLookupKeyProvider
getKey, getKey
-
Constructor Details
-
EnvKeyProvider
public EnvKeyProvider()Constructor - reads the real process environment. -
EnvKeyProvider
-
-
Method Details
-
lookup
Description copied from class:AbstractLookupKeyProviderLook up the (base64) value stored under a name. Empty if not found.- Specified by:
lookupin classAbstractLookupKeyProvider
-
describeSource
Description copied from class:AbstractLookupKeyProviderDescribe the source, for messages (e.g., "environment variable").- Specified by:
describeSourcein classAbstractLookupKeyProvider
-