Interface VaultKvAccessStrategy
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface VaultKvAccessStrategy
Strategy interface to obtain secrets from Vault's key-value secret backend.- Since:
- 2.0
- Author:
- Haroun Pacquee, Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classVaultKvAccessStrategy.VaultResponseVault response POJO.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetData(org.springframework.http.HttpHeaders headers, String backend, String key)Return secrets from Vault.
-
-
-
Method Detail
-
getData
String getData(org.springframework.http.HttpHeaders headers, String backend, String key) throws org.springframework.web.client.RestClientException
Return secrets from Vault. The response is represented as JSON object marshaled toString.- Parameters:
headers- must not be null.backend- secret backend mount path, must not be null.key- key within the key-value secret backend, must not be null.- Returns:
- the marshaled JSON object or null if the key was not found.
- Throws:
org.springframework.web.client.RestClientException- in case of a transport/access failure.- See Also:
JsonRawValue
-
-