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
    • 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 to String.
        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