0

I set up a vault cluster with two vault servers. One server is active and other one is in standby mode at a time as an expected behaivour. I can access each of them from my spring boot application with configuration in bootstrap.properties as shown below:

spring.cloud.vault.authentication=token
spring.cloud.vault.token=xxxxxxxxxxxxxxxxxxx
spring.cloud.vault.scheme=http

spring.cloud.vault.generic.backend=my-config

spring.cloud.vault.host=ip_address_of_one of_the_vault_servers
spring.cloud.vault.port=8200

But if the vault service which is defined in bootstrap.properties is down, I cannot access vault. So it is meaningless to have more than one vault server and using vault in HA mode.

I just want to use two vault server for redundancy in my spring boot application. How can it be possible?

Note: I cannot define host like this: spring.cloud.vault.host= ip_addr1,ip_addr2

Note2: I use postgresql as secret backend in HA mode.

H.Ç.T
  • 3,335
  • 1
  • 18
  • 37

1 Answers1

0

It seeems there is no way to do that with just spring cloud according to this documentation.

The part about that is:

Important: The Spring Cloud Services Config Server supports only one Vault backend, so only one vault object is permitted in the configuration parameters.

H.Ç.T
  • 3,335
  • 1
  • 18
  • 37
  • Can't we use load balancer like nginx here – Viraj Nov 20 '20 at 17:17
  • @Viraj you can.. but you must read the side effect of that as mentioned in the Vault documentation https://www.vaultproject.io/docs/concepts/ha#behind-load-balancers Officially it is not recommended by them. – Priyam Apr 05 '22 at 07:13