Package io.quarkus.vault.runtime
Class VaultKvManager
java.lang.Object
io.quarkus.vault.runtime.VaultKvManager
- All Implemented Interfaces:
VaultKVSecretReactiveEngine
@ApplicationScoped
public class VaultKvManager
extends Object
implements VaultKVSecretReactiveEngine
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVaultKvManager(io.quarkus.vault.client.VaultClient vaultClient, VaultConfigHolder vaultConfigHolder) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>deleteSecret(String path) delete secret for the default kv engine mount path.io.smallrye.mutiny.Uni<Void>deleteSecret(String alias, String path) Deletes the secret at the given path.listSecrets(String path) List all paths under the specified path for the default kv engine mount path.listSecrets(String alias, String path) List all paths under the specified path.static VaultKvManagerprivateClientManager(io.quarkus.vault.client.VaultClient vaultClient, VaultConfigHolder vaultConfigHolder) readSecret(String path) read secret for the default kv engine mount path.readSecret(String alias, String path) Provides the values stored in the Vault kv secret engine at a particular path.readSecretJson(String path) read secret as json for the default kv engine mount path.readSecretJson(String alias, String path) Provides the values stored in the Vault kv secret engine at a particular path.io.smallrye.mutiny.Uni<Void>Writes the secret at the given path.io.smallrye.mutiny.Uni<Void>writeSecret(String path, Map<String, String> secret) write secret for the default kv engine mount path.
-
Field Details
-
DEFAULT
- See Also:
-
-
Constructor Details
-
VaultKvManager
public VaultKvManager(io.quarkus.vault.client.VaultClient vaultClient, VaultConfigHolder vaultConfigHolder)
-
-
Method Details
-
privateClientManager
@Produces public static VaultKvManager privateClientManager(io.quarkus.vault.client.VaultClient vaultClient, VaultConfigHolder vaultConfigHolder) -
readSecret
Description copied from interface:VaultKVSecretReactiveEngineread secret for the default kv engine mount path.- Specified by:
readSecretin interfaceVaultKVSecretReactiveEngine- See Also:
-
readSecret
Description copied from interface:VaultKVSecretReactiveEngineProvides the values stored in the Vault kv secret engine at a particular path. This is a shortcut to `readSecretJson(String)` when the secret value is a String, which is the common case.- Specified by:
readSecretin interfaceVaultKVSecretReactiveEngine- Parameters:
alias- the name of the kv engine mount path, orfor the default kv engine path- in Vault, without the kv engine mount path- Returns:
- list of key value pairs stored at 'path' in Vault
-
readSecretJson
Description copied from interface:VaultKVSecretReactiveEngineread secret as json for the default kv engine mount path.- Specified by:
readSecretJsonin interfaceVaultKVSecretReactiveEngine- See Also:
-
readSecretJson
Description copied from interface:VaultKVSecretReactiveEngineProvides the values stored in the Vault kv secret engine at a particular path.- Specified by:
readSecretJsonin interfaceVaultKVSecretReactiveEngine- Parameters:
alias- the name of the kv engine mount path, orfor the default kv engine path- in Vault, without the kv engine mount path- Returns:
- list of key value pairs stored at 'path' in Vault
-
writeSecret
Description copied from interface:VaultKVSecretReactiveEnginewrite secret for the default kv engine mount path.- Specified by:
writeSecretin interfaceVaultKVSecretReactiveEngine- See Also:
-
writeSecret
public io.smallrye.mutiny.Uni<Void> writeSecret(String alias, String path, Map<String, String> secret) Description copied from interface:VaultKVSecretReactiveEngineWrites the secret at the given path. If the path does not exist, the secret will be created. If not the new secret will be merged with the existing one.- Specified by:
writeSecretin interfaceVaultKVSecretReactiveEngine- Parameters:
alias- the name of the kv engine mount path, orfor the default kv engine path- in Vault, without the kv engine mount pathsecret- to write at path
-
deleteSecret
Description copied from interface:VaultKVSecretReactiveEnginedelete secret for the default kv engine mount path.- Specified by:
deleteSecretin interfaceVaultKVSecretReactiveEngine- See Also:
-
deleteSecret
Description copied from interface:VaultKVSecretReactiveEngineDeletes the secret at the given path. It has no effect if no secret is currently stored at path.- Specified by:
deleteSecretin interfaceVaultKVSecretReactiveEngine- Parameters:
alias- the name of the kv engine mount path, orfor the default kv engine path- to delete
-
listSecrets
Description copied from interface:VaultKVSecretReactiveEngineList all paths under the specified path for the default kv engine mount path.- Specified by:
listSecretsin interfaceVaultKVSecretReactiveEngine- See Also:
-
listSecrets
Description copied from interface:VaultKVSecretReactiveEngineList all paths under the specified path.- Specified by:
listSecretsin interfaceVaultKVSecretReactiveEngine- Parameters:
alias- the name of the kv engine mount path, orfor the default kv engine path- to list- Returns:
- list of subpaths
-