Class SecretsProviderImpl<T extends SecretsProviderType>
java.lang.Object
com.evolveum.midpoint.common.secrets.SecretsProviderImpl<T>
- All Implemented Interfaces:
SecretsProvider<T>
- Direct Known Subclasses:
ContainerSecretsProvider
,EnvironmentVariablesSecretsProvider
,PropertiesSecretsProvider
public abstract class SecretsProviderImpl<T extends SecretsProviderType>
extends Object
implements SecretsProvider<T>
Base implementation of
SecretsProvider
interface.-
Field Summary
Fields inherited from interface com.evolveum.midpoint.prism.crypto.SecretsProvider
EMPTY_DEPENDENCIES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns configuration of the provider.@NotNull String
Returns unique identifier of the provider.getSecretBinary
(@NotNull String key) Returns secretByteBuffer
for given key.getSecretString
(@NotNull String key) Returns secretString
for given key.protected <ST> ST
protected abstract <ST> ST
resolveSecret
(@NotNull String key, @NotNull Class<ST> type) Should return secret value for given key or null if the secret does not exist.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.prism.crypto.SecretsProvider
destroy, getDependencies, initialize
-
Constructor Details
-
SecretsProviderImpl
-
-
Method Details
-
getConfiguration
Description copied from interface:SecretsProvider
Returns configuration of the provider.- Specified by:
getConfiguration
in interfaceSecretsProvider<T extends SecretsProviderType>
-
getIdentifier
Description copied from interface:SecretsProvider
Returns unique identifier of the provider.- Specified by:
getIdentifier
in interfaceSecretsProvider<T extends SecretsProviderType>
-
getSecretString
Description copied from interface:SecretsProvider
Returns secretString
for given key. Returns null if the secret does not exist.- Specified by:
getSecretString
in interfaceSecretsProvider<T extends SecretsProviderType>
- Throws:
EncryptionException
- if the secret cannot be resolved (e.g. due to network problems)
-
getSecretBinary
Description copied from interface:SecretsProvider
Returns secretByteBuffer
for given key. Returns null if the secret does not exist.- Specified by:
getSecretBinary
in interfaceSecretsProvider<T extends SecretsProviderType>
- Throws:
EncryptionException
- if the secret cannot be resolved (e.g. due to network problems)
-
resolveSecret
protected abstract <ST> ST resolveSecret(@NotNull @NotNull String key, @NotNull @NotNull Class<ST> type) throws EncryptionException Should return secret value for given key or null if the secret does not exist.- Throws:
EncryptionException
- if the secret cannot be resolved (e.g. due to network problems, or unforeseen error)
-
mapValue
-