0

我设置了一个带有两个保管库服务器的保管库集群。作为预期行为,一台服务器处于活动状态,另一台处于待机模式。我可以使用 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 服务器并在 HA 模式下使用 Vault 是没有意义的。

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

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

注意 2:我在 HA 模式下使用 postgresql 作为秘密后端。

4

1 回答 1

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.

于 2019-12-23T14:54:09.213 回答