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
-
-
Constructor Summary
Constructors Constructor Description VaultKvManager(VaultClient vaultClient, VaultAuthManager vaultAuthManager, VaultConfigHolder vaultConfigHolder, VaultInternalKvV1SecretEngine vaultInternalKvV1SecretEngine, VaultInternalKvV2SecretEngine vaultInternalKvV2SecretEngine)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>deleteSecret(String path)Deletes the secret at the given path.io.smallrye.mutiny.Uni<List<String>>listSecrets(String path)List all paths under the specified path.static VaultKvManagerprivateClientManager(VaultClient vaultClient, VaultAuthManager vaultAuthManager, VaultConfigHolder vaultConfigHolder, VaultInternalKvV1SecretEngine vaultInternalKvV1SecretEngine, VaultInternalKvV2SecretEngine vaultInternalKvV2SecretEngine)io.smallrye.mutiny.Uni<Map<String,String>>readSecret(String path)Provides the values stored in the Vault kv secret engine at a particular path.io.smallrye.mutiny.Uni<Map<String,Object>>readSecretJson(String path)Provides the values stored in the Vault kv secret engine at a particular path.io.smallrye.mutiny.Uni<Void>writeSecret(String path, Map<String,String> secret)Writes the secret at the given path.
-
-
-
Constructor Detail
-
VaultKvManager
public VaultKvManager(VaultClient vaultClient, VaultAuthManager vaultAuthManager, VaultConfigHolder vaultConfigHolder, VaultInternalKvV1SecretEngine vaultInternalKvV1SecretEngine, VaultInternalKvV2SecretEngine vaultInternalKvV2SecretEngine)
-
-
Method Detail
-
privateClientManager
@Produces public static VaultKvManager privateClientManager(VaultClient vaultClient, VaultAuthManager vaultAuthManager, VaultConfigHolder vaultConfigHolder, VaultInternalKvV1SecretEngine vaultInternalKvV1SecretEngine, VaultInternalKvV2SecretEngine vaultInternalKvV2SecretEngine)
-
readSecret
public io.smallrye.mutiny.Uni<Map<String,String>> readSecret(String path)
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:
path- in Vault, without the kv engine mount path- Returns:
- list of key value pairs stored at 'path' in Vault
-
readSecretJson
public io.smallrye.mutiny.Uni<Map<String,Object>> readSecretJson(String path)
Description copied from interface:VaultKVSecretReactiveEngineProvides the values stored in the Vault kv secret engine at a particular path.- Specified by:
readSecretJsonin interfaceVaultKVSecretReactiveEngine- Parameters:
path- in Vault, without the kv engine mount path- Returns:
- list of key value pairs stored at 'path' in Vault
-
writeSecret
public io.smallrye.mutiny.Uni<Void> writeSecret(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:
path- in Vault, without the kv engine mount pathsecret- to write at path
-
deleteSecret
public io.smallrye.mutiny.Uni<Void> deleteSecret(String path)
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:
path- to delete
-
listSecrets
public io.smallrye.mutiny.Uni<List<String>> listSecrets(String path)
Description copied from interface:VaultKVSecretReactiveEngineList all paths under the specified path.- Specified by:
listSecretsin interfaceVaultKVSecretReactiveEngine- Parameters:
path- to list- Returns:
- list of subpaths
-
-