Package org.springframework.vault.core
Interface ReactiveVaultOperations
- All Known Implementing Classes:
ReactiveVaultTemplate
public interface ReactiveVaultOperations
Interface that specifies a basic set of Vault operations executed on a reactive
infrastructure, implemented by
ReactiveVaultTemplate. This is the main entry
point to interact with Vault in an authenticated and unauthenticated context.
ReactiveVaultOperations allows execution of callback methods. Callbacks can
execute requests within a session context and the
without a session.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDelete a path.<V,T extends org.reactivestreams.Publisher<V>>
TdoWithSession(Function<WebClient, ? extends T> sessionCallback) Executes a VaultRestOperationsCallback.<V,T extends org.reactivestreams.Publisher<V>>
TdoWithVault(Function<WebClient, ? extends T> clientCallback) Executes a VaultRestOperationsCallback.Enumerate keys from a Vault path.Read from a Vault path.<T> Mono<VaultResponseSupport<T>>Read from a Vault path.default Mono<VaultResponse>Write to a Vault path.Write to a Vault path.
-
Method Details
-
read
Read from a Vault path. Reading data using this method is suitable for API calls/secret backends that do not require a request body.- Parameters:
path- must not be null.- Returns:
- the data. May be empty if the path does not exist.
-
read
Read from a Vault path. Reading data using this method is suitable for API calls/secret backends that do not require a request body.- Parameters:
path- must not be null.responseType- must not be null.- Returns:
- the data. May be empty if the path does not exist.
-
list
Enumerate keys from a Vault path.- Parameters:
path- must not be null.- Returns:
- the data. May be empty if the path does not exist.
-
write
Write to a Vault path.- Parameters:
path- must not be null.- Returns:
- the response. May be empty if the response has no body.
-
write
Write to a Vault path.- Parameters:
path- must not be null.body- the body, may be null if absent.- Returns:
- the response. May be empty if the response has no body.
-
delete
Delete a path.- Parameters:
path- must not be null.
-
doWithVault
<V,T extends org.reactivestreams.Publisher<V>> T doWithVault(Function<WebClient, ? extends T> clientCallback) throws VaultException, WebClientExceptionExecutes a VaultRestOperationsCallback. Allows to interact with Vault usingRestOperationswithout requiring a session.- Parameters:
clientCallback- the request.- Returns:
- the
RestOperationsCallbackreturn value. - Throws:
VaultException- when aHttpStatusCodeExceptionoccurs.WebClientException- exceptions fromWebClient.
-
doWithSession
<V,T extends org.reactivestreams.Publisher<V>> T doWithSession(Function<WebClient, ? extends T> sessionCallback) throws VaultException, WebClientExceptionExecutes a VaultRestOperationsCallback. Allows to interact with Vault in an authenticated session.- Parameters:
sessionCallback- the request.- Returns:
- the
RestOperationsCallbackreturn value. - Throws:
VaultException- when aHttpStatusCodeExceptionoccurs.WebClientException- exceptions fromWebClient.
-