Class VaultClientConfiguration

java.lang.Object
io.micronaut.http.client.HttpClientConfiguration
io.micronaut.discovery.vault.config.VaultClientConfiguration

@ConfigurationProperties("vault.client") @Requires(property="vault.client") public class VaultClientConfiguration extends io.micronaut.http.client.HttpClientConfiguration
A HttpClientConfiguration for Vault Client.
Since:
1.2.0
Author:
thiagolocatelli
  • Field Details

  • Constructor Details

    • VaultClientConfiguration

      @Inject public VaultClientConfiguration(VaultClientConfiguration.VaultClientConnectionPoolConfiguration vaultClientConnectionPoolConfiguration, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
      Parameters:
      vaultClientConnectionPoolConfiguration - Vault Client Connection Pool Configuration
      applicationConfiguration - Application Configuration
  • Method Details

    • getConnectionPoolConfiguration

      public io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration getConnectionPoolConfiguration()
      Specified by:
      getConnectionPoolConfiguration in class io.micronaut.http.client.HttpClientConfiguration
    • getDiscoveryConfiguration

      Returns:
      The discovery service configuration
    • getUri

      public String getUri()
      Returns:
      The Vault Server Uri
    • setUri

      public void setUri(String uri)
      Set the Vault Server Uri. Default value ("http://locahost:8200").
      Parameters:
      uri - Vault Server Uri
    • getToken

      public String getToken()
      Returns:
      The Vault authentication token
    • setToken

      public void setToken(String token)
      Set the Vault authentication token.
      Parameters:
      token - Vault authentication token
    • getKvVersion

      Returns:
      The Vault Secret engine version
    • setKvVersion

      public void setKvVersion(VaultClientConfiguration.VaultKvVersion kvVersion)
      Set the version of the Vault Secret engine. V1 or V2. Default value (V2).
      Parameters:
      kvVersion - The version of the Vault Secret engine
    • getSecretEngineName

      public String getSecretEngineName()
      Returns:
      The Vault Secret engine name
    • setSecretEngineName

      public void setSecretEngineName(String secretEngineName)
      Set the name of the Vault Secret engine name. Default value ("secret").
      Parameters:
      secretEngineName - Vault Secret engine name
    • getPathPrefix

      public String getPathPrefix()
      Returns:
      The prefix for the keys used to get vault properties
    • setPathPrefix

      public void setPathPrefix(String pathPrefix)
      Set the prefix for the keys used to get vault properties. Default value is empty string
      Parameters:
      pathPrefix - path which prefixes keys.
    • isFailFast

      public boolean isFailFast()
      Returns:
      Flag to indicate that failure to connect to HashiCorp Vault is fatal (default false).
    • setFailFast

      public void setFailFast(boolean failFast)
      If set to true an exception will be thrown if configuration is not found for the application or any of its environments. Default value ().
      Parameters:
      failFast - Flag to fail fast