Questions tagged [spring-vault]

Spring Vault provides familiar Spring abstractions and client-side support for accessing, storing and revoking secrets from HashiCorp Vault.

Spring Vault provides familiar Spring abstractions and client-side support for accessing, storing and revoking secrets. It offers both low-level and high-level abstractions for interacting with Vault, freeing the user from infrastructural concerns.

With HashiCorp’s Vault you have a central place to manage external secret data for applications across all environments. Vault can manage static and dynamic secrets such as application data, username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, Consul, AWS and more.

Features

  • Spring configuration support using Java based @Configuration classes.
  • VaultTemplate and ReactiveVaultTemplate helper classes that increase productivity performing common Vault operations.
  • Exporting Vault secrets as PropertySource through @VaultPropertySource.
  • Support multiple authentication methods.
  • Rotation of secrets for databases and messaging services.
  • Feature Rich Object Mapping integrated with Spring Data Repositories.
  • Annotation based mapping metadata but extensible to support other metadata formats.

Online Resources:

125 questions
2
votes
2 answers

Spring Cloud Vault - Missing required header: X-Config-Token

I was following the getting started guides for spring config server and vault when I run into a issue related to vault I am unable to resolve. The config server is however working fine with GIT but not with Vault. Below is the code and config I am…
2
votes
1 answer

What policy required to renew database lease?

I run a local vault dev server (v0.10.1) and use Approle as auth method. I create a renewable MongoDB secret engine, and then assign a policy to created Approle which grants all capabilities to path secret/bootstrap, secret/application,…
Tonny Tc
  • 852
  • 1
  • 12
  • 37
2
votes
2 answers

Accessing Docker Vault secrets using Spring Cloud Starter Vault Config Could Not Resolve

I am running a Docker Vault container in dev mode, and I can't read a secret located at /secret/mobsters/ called password. Here are Spring logs. Running vault kv get secret/mobsters returns the password key value pair. I can also access the vault…
2
votes
1 answer

Fallback to local config if Spring Vault config is disabled

For the development environment, I have configured bootstrap.properties to disable vault configuration. spring.cloud.vault.enabled=false If it is disabled then the application should read the properties from local config application.properties…
sidgate
  • 14,650
  • 11
  • 68
  • 119
1
vote
0 answers

Replace Env Variables Placeholder in spring config server native mode with vault secret

I am currently working in a scenario where I need to use spring cloud config server for centralised config management. Previously we were using the "native" mode to store the configurations in the local filesystem. And the sensitive information like…
animo3991
  • 181
  • 2
  • 9
1
vote
0 answers

spring.cloud.vault.config.lifecycle.enabled not working

Spring cloud vault keeps trying to renew token but I want to forbid it from doing so. When I was using spring 2.3.x I could just set spring.cloud.vault.config.lifecycle.enabled=false but it does not seem to work in 2.4.x, how can I solve this…
Shuyang Ji
  • 11
  • 1
1
vote
0 answers

Secrets are not read from the vault after migrating to Spring Boot 3 - Getting an error

We are in process of migrating spring boot 3 from 2.7.7(We did an incremental upgrade from 2.6.8 to 2.7.7 and then to 3.0.0). We have almost got our application working except for the secrets are not read from the vault after migrating to Spring…
Arun
  • 11
  • 3
1
vote
1 answer

Spring Vault can't validate self-signed cert signed by self-signed CA after upgrading from Spring Boot 2.7.x -> Spring Boot 3.0.0

I am running Spring Boot app using a self-signed CA cert to verify Vault certificate that is signed by the self-signed CA. This setup has worked with Spring Vault until upgrading from Spring Boot 2.7.x -> 3.0.0. Since Spring Boot 3.0.0 required…
Laurenzo
  • 505
  • 3
  • 20
1
vote
0 answers

Spring Cloud Vault Config Secretes Backend AWS SocketTimeoutException

I have a Spring Boot + Kotlin microservice that gets the AWS credentials to connect to DynamoDB from Vault. But randomly the Vault implementation is throwing a SocketTimeoutException while renewing the session token, see the stack…
1
vote
1 answer

Unable to instantiate VaultConfigDataLoader

I'm trying to configure Spring Cloud Vault in my Spring Boot application (v. 2.4.2). I'm using Spring Cloud v. 2020.0.5 (which, according to the Release train, should be fine). C:\Tools\jdk1.8.0_92\bin\java.exe -Dspring.profiles.active=DEV,local…
Ionut
  • 103
  • 9
1
vote
0 answers

In Spring vault is it possible to get events when the database credentials are rotataed with static role type through hashicorp vault

I'm using Spring vault to fetch the database credentials from hashicorp vault. Using SecretLeaseContainer and LeaseListener i'm able to get the events when the credentials are rotated for Dynamic secrets. Following is my code to get the events for…
Pitchu
  • 27
  • 4
1
vote
1 answer

Config server with Vault backend - fetch secrets from multiple paths

We are using config server with Vault backend to fetch application secrets. Config server project is using spring-vault-core dependency and spring-vault-dependencies dependency management for Vault. Vault related config in application yml file is as…
1
vote
1 answer

How to disable SSL verification in Spring Vault

I'm trying to configure Spring vault, and for some reason, I need to disable SSL verification. Is there any known way to configure Spring Vault to ignore SSL?
meldevep
  • 501
  • 1
  • 4
  • 4
1
vote
1 answer

Adding keys to Spring Boot vault

I am implementing Spring Boot vault. Whenever I try to add more than one key, only the last one is saved. For example, at this page, https://www.javainuse.com/spring/cloud-vault, they have this example But when I then query the vault, I…
1
vote
0 answers

actuator/refresh path not updating @value variables when use spring cloud vault

When I update a property in the vault and call actuator / refresh, it still shows an older value. I use spring boot and spring…
1 2
3
8 9