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.
Strategy interface to obtain secrets from Vault's key-value secret backend.
- Since:
- 2.0
- Author:
- Haroun Pacquee, Mark Paluch
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Vault response POJO. -
Method Summary
-
Method Details
-
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
-