@Configuration public abstract class AbstractVaultConfiguration extends Object implements ApplicationContextAware
Modifier and Type | Class and Description |
---|---|
static class |
AbstractVaultConfiguration.ClientFactoryWrapper
Wrapper for
ClientHttpRequestFactory to not expose the bean globally. |
Constructor and Description |
---|
AbstractVaultConfiguration() |
public abstract VaultEndpoint vaultEndpoint()
public VaultEndpointProvider vaultEndpointProvider()
VaultEndpointProvider
returning the value of
vaultEndpoint()
.public abstract ClientAuthentication clientAuthentication()
Bean
in case you want to expose a
ClientAuthentication
instance to the
ApplicationContext
.ClientAuthentication
to use. Must not be null.@Bean public VaultTemplate vaultTemplate()
VaultTemplate
.VaultTemplate
.vaultEndpointProvider()
,
clientHttpRequestFactoryWrapper()
,
sessionManager()
@Bean public SessionManager sessionManager()
LifecycleAwareSessionManager
using
clientAuthentication()
. This SessionManager
uses
threadPoolTaskScheduler()
.SessionManager
for Vault session management.SessionManager
,
LifecycleAwareSessionManager
,
restOperations()
,
clientAuthentication()
,
()
@Bean public SecretLeaseContainer secretLeaseContainer() throws Exception
SecretLeaseContainer
to allocate, renew and rotate secrets and
their leases.Exception
vaultTemplate()
,
threadPoolTaskScheduler()
@Bean(value="vaultThreadPoolTaskScheduler") public ThreadPoolTaskScheduler threadPoolTaskScheduler()
ThreadPoolTaskScheduler
used by
LifecycleAwareSessionManager
and
SecretLeaseContainer
. Annotate with
Bean
in case you want to expose a ThreadPoolTaskScheduler
instance
to the ApplicationContext
. This might be useful
to supply managed executor instances or ThreadPoolTaskScheduler
s using a
queue/pooled threads.ThreadPoolTaskScheduler
to use. Must not be null.public RestOperations restOperations()
RestOperations
object configured for Vault session management
and authentication usage.RestOperations
to be used for Vault access.vaultEndpointProvider()
,
clientHttpRequestFactoryWrapper()
@Bean public AbstractVaultConfiguration.ClientFactoryWrapper clientHttpRequestFactoryWrapper()
AbstractVaultConfiguration.ClientFactoryWrapper
containing a ClientHttpRequestFactory
. ClientHttpRequestFactory
is not exposed as root bean because
ClientHttpRequestFactory
is configured with ClientOptions
and
SslConfiguration
which are not necessarily applicable for the whole
application.AbstractVaultConfiguration.ClientFactoryWrapper
to wrap a ClientHttpRequestFactory
instance.clientOptions()
,
sslConfiguration()
public ClientOptions clientOptions()
ClientOptions
to configure communication parameters.ClientOptions
public SslConfiguration sslConfiguration()
SslConfiguration.unconfigured()
.SslConfiguration
,
SslConfiguration.unconfigured()
protected Environment getEnvironment()
Environment
to access property sources during Spring Vault
bootstrapping. Requires ApplicationContext
to be set.Environment
to access property sources during Spring Vault
bootstrapping.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.