@Configuration public abstract class AbstractVaultConfiguration extends Object implements org.springframework.context.ApplicationContextAware
Modifier and Type | Class and Description |
---|---|
static class |
AbstractVaultConfiguration.ClientFactoryWrapper
Wrapper for
ClientHttpRequestFactory to not expose the bean globally. |
Constructor and Description |
---|
AbstractVaultConfiguration() |
Modifier and Type | Method and Description |
---|---|
abstract ClientAuthentication |
clientAuthentication()
Annotate with
Bean in case you want to expose a
ClientAuthentication instance to the
ApplicationContext . |
AbstractVaultConfiguration.ClientFactoryWrapper |
clientHttpRequestFactoryWrapper()
Create a
AbstractVaultConfiguration.ClientFactoryWrapper containing a ClientHttpRequestFactory
. |
ClientOptions |
clientOptions() |
protected org.springframework.core.env.Environment |
getEnvironment()
Return the
Environment to access property sources during Spring Vault
bootstrapping. |
org.springframework.web.client.RestOperations |
restOperations()
Construct a
RestOperations object configured for Vault usage. |
SecretLeaseContainer |
secretLeaseContainer()
|
SessionManager |
sessionManager()
Construct a
LifecycleAwareSessionManager using
clientAuthentication() . |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
SslConfiguration |
sslConfiguration() |
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler |
threadPoolTaskScheduler()
|
abstract VaultEndpoint |
vaultEndpoint() |
VaultEndpointProvider |
vaultEndpointProvider() |
VaultTemplate |
vaultTemplate()
Create a
VaultTemplate . |
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
SessionManager
for Vault session management.Exception
vaultTemplate()
,
threadPoolTaskScheduler()
@Bean public org.springframework.scheduling.concurrent.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 org.springframework.web.client.RestOperations restOperations()
RestOperations
object configured for Vault 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.NONE
.SslConfiguration
,
SslConfiguration.NONE
protected org.springframework.core.env.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(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.