Interface SecretsProvider<C>

All Known Implementing Classes:
CacheableSecretsProviderDelegate, ContainerSecretsProvider, DockerSecretsProvider, EnvironmentVariablesSecretsProvider, FileSecretsProvider, PropertiesSecretsProvider, SecretsProviderImpl

public interface SecretsProvider<C>
Interface for component that can resolve secrets from external secrets managers (e.g. instead of decrypting them).
  • Field Details

    • EMPTY_DEPENDENCIES

      static final String[] EMPTY_DEPENDENCIES
  • Method Details

    • initialize

      default void initialize()
      Post-construction initialization. Called before the provider is added to the list of usable providers.
    • destroy

      default void destroy()
      This method can be used to clean-up resources of secret provider. Called after provider was removed from the list of usable providers.
    • getIdentifier

      @NotNull @NotNull String getIdentifier()
      Returns unique identifier of the provider.
    • getDependencies

      @NotNull default @NotNull String[] getDependencies()
      Returns list of providers that this provider depends on. The provider will be initialized after all dependencies are available and initialized. Default implementation returns an empty array.
    • getConfiguration

      C getConfiguration()
      Returns configuration of the provider.
    • getSecretString

      String getSecretString(@NotNull @NotNull String key) throws EncryptionException
      Returns secret String for given key. Returns null if the secret does not exist.
      Throws:
      EncryptionException - if the secret cannot be resolved (e.g. due to network problems)
    • getSecretBinary

      default ByteBuffer getSecretBinary(@NotNull @NotNull String key) throws EncryptionException
      Returns secret ByteBuffer for given key. Returns null if the secret does not exist.
      Throws:
      EncryptionException - if the secret cannot be resolved (e.g. due to network problems)