是否可以在Spring Boot应用程序中以冗余方式使用HashiCorp Vault?

问题描述 投票:0回答:1

我设置了具有两个保管库服务器的保管库集群。一台服务器处于活动状态,另一台服务器处于待机状态,这是预期的行为。我可以在bootstrap.properties中通过配置从Spring Boot应用程序访问它们,如下所示:

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

但是,如果bootstrap.properties中定义的Vault Service关闭,则无法访问Vault。因此,拥有多个保管库服务器并以HA模式使用保管库是没有意义的。

我只想在Spring Boot应用程序中使用两个保管库服务器来实现冗余。怎么可能?

注意:我不能这样定义主机:spring.cloud.vault.host = ip_addr1,ip_addr2

注2:在高可用性模式下,我将PostgreSQL用作秘密后端。

java spring spring-boot hashicorp-vault spring-vault
1个回答
0
投票

根据this文档,似乎只有弹簧云无法实现。

有关的部分是:

重要:Spring Cloud Services Config Server仅支持一个保管库后端,因此在其中仅允许一个保管库对象配置参数。

© www.soinside.com 2019 - 2024. All rights reserved.