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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionKeyValueDelegate(VaultOperations operations) KeyValueDelegate(VaultOperations operations, Supplier<Map<String, ?>> cacheSupplier) -
Method Summary
Modifier and TypeMethodDescriptiongetMountInfo(String path) Read a secret from a key-value backend.booleanisVersioned(String path) Determine whether thepathbelongs to a versioned Key-Value mount.
-
Constructor Details
-
KeyValueDelegate
-
KeyValueDelegate
-
-
Method Details
-
isVersioned
Determine whether thepathbelongs to a versioned Key-Value mount.- Parameters:
path- the path to inspect.- Returns:
- true if the
pathbelongs 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
-