Class KeyValueDelegate
java.lang.Object
org.springframework.vault.core.util.KeyValueDelegate
Key-Value utility to retrieve secrets from a versioned key-value backend. For internal
use within the framework.
Uses Vault's internal API
sys/internal/ui/mounts
to determine mount
information.- Since:
- 2.2
- Author:
- Mark Paluch
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionKeyValueDelegate
(VaultOperations operations) KeyValueDelegate
(VaultOperations operations, Supplier<Map<String, ?>> cacheSupplier) -
Method Summary
Modifier and TypeMethodDescriptiongetMountInfo
(String path) Read a secret from a key-value backend.boolean
isVersioned
(String path) Determine whether thepath
belongs to a versioned Key-Value mount.
-
Constructor Details
-
KeyValueDelegate
-
KeyValueDelegate
-
-
Method Details
-
isVersioned
Determine whether thepath
belongs to a versioned Key-Value mount.- Parameters:
path
- the path to inspect.- Returns:
- true if the
path
belongs to a versioned Key-Value mount.
-
getSecret
Read a secret from a key-value backend. Considers the backend type and whether the backend is a versioned key-value backend.- Parameters:
path
- the path to fetch the secret from.- Returns:
- the secret, can be null.
-
getMountInfo
-