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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns configuration of the provider.@NotNull StringReturns unique identifier of the provider.getSecretBinary(@NotNull String key) Returns secretByteBufferfor given key.getSecretString(@NotNull String key) Returns secretStringfor given key.protected <ST> STprotected abstract <ST> STresolveSecret(@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, waitMethods inherited from interface com.evolveum.midpoint.prism.crypto.SecretsProvider
destroy, getDependencies, initialize
-
Constructor Details
-
SecretsProviderImpl
-
-
Method Details
-
getConfiguration
Description copied from interface:SecretsProviderReturns configuration of the provider.- Specified by:
getConfigurationin interfaceSecretsProvider<T extends SecretsProviderType>
-
getIdentifier
Description copied from interface:SecretsProviderReturns unique identifier of the provider.- Specified by:
getIdentifierin interfaceSecretsProvider<T extends SecretsProviderType>
-
getSecretString
Description copied from interface:SecretsProviderReturns secretStringfor given key. Returns null if the secret does not exist.- Specified by:
getSecretStringin interfaceSecretsProvider<T extends SecretsProviderType>- Throws:
EncryptionException- if the secret cannot be resolved (e.g. due to network problems)
-
getSecretBinary
Description copied from interface:SecretsProviderReturns secretByteBufferfor given key. Returns null if the secret does not exist.- Specified by:
getSecretBinaryin 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
-