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
48
votes
3 answers

Vault Error, Server gave HTTP response to HTTPS client

I'm using Hashicorp vault as a secrets store and installed it via apt repository on Ubuntu 20.04. After that, I added the root key to access the UI and I'm able to add or delete secrets using UI. Whenever I'm trying to add or get a secret using the…
Saki Osive
  • 1,437
  • 1
  • 10
  • 21
8
votes
1 answer

Caused by: java.lang.IllegalArgumentException: Token (spring.cloud.vault.token) must not be empty - Hashicorp Vault

I'm following Vault Configuration example referring from: https://spring.io/guides/gs/vault-config/. When I am executing the code I am getting below error. Error: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean…
PAA
  • 1
  • 46
  • 174
  • 282
7
votes
2 answers

How to fix "Vault location [kv/my-client-service] not resolvable: Not found" when I am trying to connect HashiCorp Vault using AWS IAM role?

I have been using HashiCorp Vault for six months now where my all the secrets from the configuration service. I was connecting all my client services using spring.cloud.config.token but the problem came when the vault token expires every 30 days or…
7
votes
1 answer

Writing object with Spring Vault returns Status 400 : no data provided

I am investigating how I can use Vault 0.11.1 and Spring Vault 2.0.2.RELEASE. I have set up a dev Vault: vault server -dev and added some data vault kv put secret/certs/jan cert=ABCD which I can read with Spring Vault @Autowired …
Jan Larsen
  • 831
  • 6
  • 13
6
votes
1 answer

Spring Vault Harshicorp and Cyber-ark integration

I am trying to use Spring Vault to provide a centralized service which provides storing and retrieving credential information capability for our micro-service eco-system. However our organization currently using cyber-ark for centralizing…
4
votes
1 answer

How to know the validity of a vault token that is being used for connecting to vault?

Currently, I am connecting to a corporate vault service where I am using a vault token and passing it through below header in my spring cloud config service where properties of all microservices are kept. curl -X "GET"…
viveknaskar
  • 2,136
  • 1
  • 20
  • 35
4
votes
0 answers

Renew vault Postgres Backend credentials

How do I renew spring vault Postgres Backend credentials using SecretLeaseContainer ? @override public void afterPropertiesSet() throws Exception { final RequestedSecret secret =…
3
votes
2 answers

Spring boot cannot read Vault secret: IllegalArgumentException Could not resolve placeholder

Below is my bootstrap.yml file: spring.application.name: backend spring.cloud.vault: host: localhost port: 8200 scheme: http authentication: token token: root My secrets are located at secret/backend I am trying to read these secrets in…
3
votes
1 answer

maven package command return extension (5) should not be presented in certificate_request

I use the vault server in the spring project and when I wan to create a jar file with maven I got this error. . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)|…
farhad
  • 373
  • 2
  • 14
  • 28
3
votes
1 answer

spring Vault location [secret/my-application] not resolvable: Not found

I want to connect to the vault server and read my secret in the spring application vault config: spring: application: name: inquiry profiles: active: dev cloud: vault: kv: enabled: true backend: secret …
farhad
  • 373
  • 2
  • 14
  • 28
3
votes
2 answers

Spring boot to load list of packages from properties file

I have project setup using Spring boot that loads individual components on startup. Each individual packages contain its own datasource, processes, etc. I can simply use this and it works fine @SpringBootApplication(scanBasePackages = { …
pokken
  • 327
  • 1
  • 15
3
votes
2 answers

Spring Vault client - not able to connect to local dev Vault server

I installed Vault locally. I was able to start local dev server and write/read some secrets into Vault kv based on this official tutorial https://learn.hashicorp.com/vault/ Then I wanted to create some very basic Java/Spring Boot demo client that…
Oliver Eder
  • 85
  • 2
  • 10
3
votes
1 answer

When would I need to use Spring Cloud Config with Vault instead of just using Spring Cloud Vault?

I'm in a project where we're using Spring Cloud Config Server with Vault backend and I don't know why we need the cloud config server. Before I attempt to move this to a simpler implementation with Spring Cloud Vault, I want to know if there is a…
3
votes
1 answer

how to retrieve old versions of keys using spring-cloud-vault?

I'm using spring-cloud-vault to retrieve the versioned kv from the vault server. When I'm using the environemnt.getSecret("key1") then it returns only the latest versions of key for example world2. Is there any way to retrieve the old versions of…
3
votes
1 answer

How do you use Spring Retry with Spring Vault Configuration with VaultPropertySource?

I want spring-vault configuration marked with VaultPropertySource to be able to retry the requests to the vault if they fail. What should i mark as retryable ? I'm using Spring-Retry and i was looking over http://www.baeldung.com/spring-retry .…
Daniel Colceag
  • 190
  • 1
  • 3
  • 15
1
2 3
8 9