Package org.forgerock.secrets.vault
Class VaultConfig
java.lang.Object
org.forgerock.secrets.vault.VaultConfig
Encapsulates the common configuration required for Hashicorp Vault secret backends.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder object for Vault configuration settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic VaultConfig.Builder
Returns a newVaultConfig.Builder
to construct the configuration.Returns the base URI of the Vault installation.getClock()
Returns the clock to use for determining secret expiry times.Returns the CHF HTTP client handler to use for connections to Vault.Returns the Vault namespace to use, orOptional.empty()
if no namespace is configured.getPath()
Returns the path at which the vault secret engine to be used is mounted relative to the base URI.Returns the mapping from purposes to Vault secret names.
-
Method Details
-
builder
Returns a newVaultConfig.Builder
to construct the configuration.- Parameters:
httpClient
- the CHF HTTP client handler to use for connections to Vault. Must not be null.baseUri
- the base URI of the Vault installation. Must not be null.- Returns:
- a new configuration builder.
-
getClock
Returns the clock to use for determining secret expiry times.- Returns:
- the clock to use for secret expiry time.
-
getBaseUri
Returns the base URI of the Vault installation.- Returns:
- the URI of the Vault installation.
-
getNamespace
Returns the Vault namespace to use, orOptional.empty()
if no namespace is configured.- Returns:
- the namespace if one is configured.
-
getPath
Returns the path at which the vault secret engine to be used is mounted relative to the base URI.- Returns:
- the path of the secret engine on the Vault server.
-
getHttpClient
Returns the CHF HTTP client handler to use for connections to Vault.- Returns:
- the CHF HTTP client handler.
-
getPurposeMapping
Returns the mapping from purposes to Vault secret names.- Returns:
- the purpose mapping.
-