我正在尝试将Spring Vault与领事作为后端集成。我正在使用App-role身份验证登录到Vault并生成ACL令牌以连接到领事。但是,我无法使用该令牌连接到领事。
这是我的日志:
{"request_id":"xxxxx","lease_id":"consul/creds/demo-readonly/xxxxxx","renewable":true,"lease_duration":3600,"data":{"token":"xxxxxxxxx"},"wrap_info":null,"warnings":null,"auth":null}
org.apache.http.wire : >> "GET /v1/kv/config/demo/?recurse&token= HTTP/1.1[\r][\n]"
org.apache.http.wire : >> "Connection: Keep-Alive[\r][\n]"
org.apache.http.wire : >> "[\r][\n]"
org.apache.http.wire : << "HTTP/1.1 404 Not Found[\r]
这是我的boostrap.properties文件:
spring.application.name=demo
spring.cloud.consul.host=xxx
spring.cloud.consul.port=xxx
spring.cloud.consul.config.format=PROPERTIES
spring.cloud.vault.application-name=xxx
spring.cloud.vault.host=xxx
spring.cloud.vault.port=xxx
spring.cloud.vault.scheme=https
spring.cloud.vault.authentication=APPROLE
spring.cloud.vault.app-role.role-id=xxx
spring.cloud.vault.app-role.secret-id=xxx
spring.cloud.vault.app-role.role=demo-readonly
spring.cloud.vault.app-role.app-role-path=approle
spring.cloud.vault.consul.enabled=true
spring.cloud.vault.consul.role=demo-readonly
spring.cloud.vault.consul.backend=consul
spring.cloud.vault.consul.token-property=spring.cloud.consul.token
我错过任何住宿吗?
我遵循spring.io文档中提供的相同步骤:
https://cloud.spring.io/spring-cloud-vault/multi/multi_vault.config.backends.html