Interface SecretsProvider
- All Known Implementing Classes:
ClearTextSecretsProvider,EnvironmentBasedSecretsProvider
public interface SecretsProvider
This file defines the SecretsProvider interface. This interface is used by the function
instances/containers to actually fetch the secrets. What SecretsProvider to use is
decided by the SecretsProviderConfigurator.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidInitialize the SecretsProvider.default StringinterpolateSecretForValue(String value) If the passed value is formatted as a reference to a secret, as defined by the implementation, return the referenced secret.provideSecret(String secretName, Object pathToSecret) Fetches a secret.
-
Method Details
-
init
Initialize the SecretsProvider. -
provideSecret
Fetches a secret.- Returns:
- The actual secret
-
interpolateSecretForValue
If the passed value is formatted as a reference to a secret, as defined by the implementation, return the referenced secret. If the value is not formatted as a secret reference or the referenced secret does not exist, return null.- Parameters:
value- a config value that may be formatted as a reference to a secret- Returns:
- the materialized secret. Otherwise, null.
-