Package org.springframework.vault.config
Class AbstractReactiveVaultConfiguration
java.lang.Object
org.springframework.vault.config.AbstractVaultConfiguration
org.springframework.vault.config.AbstractReactiveVaultConfiguration
- All Implemented Interfaces:
Aware
,ApplicationContextAware
@Configuration(proxyBeanMethods=false)
public abstract class AbstractReactiveVaultConfiguration
extends AbstractVaultConfiguration
Base class for Spring Vault configuration using JavaConfig for a reactive
infrastructure.
Reactive Vault support creates a ReactiveSessionManager
(for the session token)
from the configured AbstractVaultConfiguration.clientAuthentication()
via vaultTokenSupplier()
.
The authentication object must implement AuthenticationStepsFactory
exposing
AuthenticationSteps
to obtain
authentication using reactive infrastructure.
This configuration class provides configuration for imperative and reactive usage.
Using this configuration creates an imperative SessionManager
adapter by
wrapping reactiveSessionManager()
.
Subclasses may override methods to customize configuration.
- Since:
- 2.0
- Author:
- Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.vault.config.AbstractVaultConfiguration
AbstractVaultConfiguration.ClientFactoryWrapper, AbstractVaultConfiguration.TaskSchedulerWrapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ClientHttpConnector
protected WebClientFactory
Return theWebClientFactory
.Construct aReactiveSessionManager
usingvaultTokenSupplier()
.Create aReactiveVaultTemplate
.Construct a session manager adapter wrappingreactiveSessionManager()
and exposing imperativeSessionManager
on top of a reactive API.protected VaultTokenSupplier
Construct aVaultTokenSupplier
usingAbstractVaultConfiguration.clientAuthentication()
.protected WebClientBuilder
webClientBuilder
(ReactiveVaultEndpointProvider endpointProvider, ClientHttpConnector httpConnector) protected WebClientBuilder
webClientBuilder
(VaultEndpointProvider endpointProvider, ClientHttpConnector httpConnector) Create aWebClientFactory
bean that is used to produce aWebClient
.Methods inherited from class org.springframework.vault.config.AbstractVaultConfiguration
clientAuthentication, clientHttpRequestFactoryWrapper, clientOptions, getBeanFactory, getEnvironment, getRestTemplateFactory, getVaultThreadPoolTaskScheduler, restOperations, restTemplateBuilder, restTemplateFactory, secretLeaseContainer, setApplicationContext, sslConfiguration, threadPoolTaskScheduler, vaultEndpoint, vaultEndpointProvider, vaultTemplate
-
Constructor Details
-
AbstractReactiveVaultConfiguration
public AbstractReactiveVaultConfiguration()
-
-
Method Details
-
reactiveVaultEndpointProvider
- Returns:
- a
ReactiveVaultEndpointProvider
returning the value ofAbstractVaultConfiguration.vaultEndpointProvider()
. - Since:
- 2.3
- See Also:
-
webClientBuilder
protected WebClientBuilder webClientBuilder(VaultEndpointProvider endpointProvider, ClientHttpConnector httpConnector) Create aWebClientBuilder
initialized withVaultEndpointProvider
andClientHttpConnector
. May be overridden by subclasses.- Returns:
- the
WebClientBuilder
. - Since:
- 2.2
- See Also:
-
webClientBuilder
protected WebClientBuilder webClientBuilder(ReactiveVaultEndpointProvider endpointProvider, ClientHttpConnector httpConnector) Create aWebClientBuilder
initialized withVaultEndpointProvider
andClientHttpConnector
. May be overridden by subclasses.- Returns:
- the
WebClientBuilder
. - Since:
- 2.3
- See Also:
-
webClientFactory
Create aWebClientFactory
bean that is used to produce aWebClient
.- Returns:
- the
WebClientFactory
. - Since:
- 2.3
- See Also:
-
reactiveVaultTemplate
Create aReactiveVaultTemplate
. -
sessionManager
Construct a session manager adapter wrappingreactiveSessionManager()
and exposing imperativeSessionManager
on top of a reactive API.- Overrides:
sessionManager
in classAbstractVaultConfiguration
- Returns:
- the
SessionManager
adapter. - See Also:
-
reactiveSessionManager
Construct aReactiveSessionManager
usingvaultTokenSupplier()
. ThisReactiveSessionManager
usesAbstractVaultConfiguration.threadPoolTaskScheduler()
.- Returns:
- the
VaultTokenSupplier
for Vault session token management. - See Also:
-
vaultTokenSupplier
Construct aVaultTokenSupplier
usingAbstractVaultConfiguration.clientAuthentication()
.- Returns:
- the
VaultTokenSupplier
for Vault session token management. - See Also:
-
clientHttpConnector
- Returns:
- the
ClientHttpConnector
instance. - See Also:
-
getWebClientFactory
Return theWebClientFactory
.- Returns:
- the
WebClientFactory
bean. - Since:
- 2.3
-