Spring 更新到版本 3.0.3 后,引导云保管库不再加载属性
Spring boot cloud vault does not load properties anymore after update to version 3.0.3
我遇到了与 相同的问题。
我更新了 spring boot cloud 到版本 3.0.3。我的配置是:
spring:
config:
import: vault://
cloud:
vault:
enabled: true
uri: ${uri}
authentication: APPROLE
kv:
enabled: true
backend: secrets
application-name: ${path}
generic:
enabled: false
app-role:
role-id: ${role_id}
secret-id: ${secret_id}
连接设置似乎没问题,因为有一些 'permission denied' 日志条目(此保管库的路径无效)
Vault location [secrets/application/develop] not resolvable: Status
403 Forbidden [secrets/data/application/develop]: 1 error occurred: *
permission denied ; nested exception is
org.springframework.web.client.HttpClientErrorException$Forbidden: 403
Forbidden: [{"errors":["1 error occurred:\n\t* permission
denied\n\n"]}
有什么问题的提示吗?
我发现了问题。当 application-name 定义在 spring.cloud.vault.kv.application-name 时,它不起作用。它必须被定义为 spring.cloud.vault.application-name 但根据 https://github.com/spring-cloud/spring-cloud-vault/blob/main/docs/src/main/asciidoc/secret-backends.adoc 它也应该适用于 spring.cloud.vault.kv.application-name....
spring:
config:
import: vault://
cloud:
vault:
enabled: true
uri: ${uri}
authentication: APPROLE
application-name: ${path}
kv:
enabled: true
backend: secrets
generic:
enabled: false
app-role:
role-id: ${role_id}
secret-id: ${secret_id}
我遇到了与
spring:
config:
import: vault://
cloud:
vault:
enabled: true
uri: ${uri}
authentication: APPROLE
kv:
enabled: true
backend: secrets
application-name: ${path}
generic:
enabled: false
app-role:
role-id: ${role_id}
secret-id: ${secret_id}
连接设置似乎没问题,因为有一些 'permission denied' 日志条目(此保管库的路径无效)
Vault location [secrets/application/develop] not resolvable: Status 403 Forbidden [secrets/data/application/develop]: 1 error occurred: * permission denied ; nested exception is org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden: [{"errors":["1 error occurred:\n\t* permission denied\n\n"]}
有什么问题的提示吗?
我发现了问题。当 application-name 定义在 spring.cloud.vault.kv.application-name 时,它不起作用。它必须被定义为 spring.cloud.vault.application-name 但根据 https://github.com/spring-cloud/spring-cloud-vault/blob/main/docs/src/main/asciidoc/secret-backends.adoc 它也应该适用于 spring.cloud.vault.kv.application-name....
spring:
config:
import: vault://
cloud:
vault:
enabled: true
uri: ${uri}
authentication: APPROLE
application-name: ${path}
kv:
enabled: true
backend: secrets
generic:
enabled: false
app-role:
role-id: ${role_id}
secret-id: ${secret_id}