当 spring.cloud.vault.config.lifecycle.enabled 设置为 false 时,无法从保管库加载机密
我正在使用版本 2.2.5.RELEASE 的 Spring Cloud StarterVault 配置来连接到我的安全保管库服务器,该服务器正在使用 approle 身份验证机制,我观察到,如果我将 spring.cloud.vault.config.lifecycle 属性的值设置为 false .enabled spring 无法从保管库加载机密,其失败并出现以下错误:
17:27:05.823 DEBUG [ main] o.s.v.a.AppRoleAuthentication - - Login successful using AppRole authentication
17:27:06.121 WARN [ main] o.s.c.v.config.VaultConfigTemplate - - Could not locate PropertySource: Status 403 Forbidden [/*/local]: 1 error occurred:
* permission denied
below is my bootstrap.properties configuration:
#Project Details
info.app.name = ****
info.app.version = @project.version@
spring.application.name = ***
logging.level.org.springframework.vault = TRACE
spring.cloud.vault.app-role.auth-path=approle
spring.cloud.vault.app-role.role-id=****
spring.cloud.vault.app-role.secret-id=****
spring.cloud.vault.authentication=APPROLE
spring.cloud.vault.generic.application-name=****
spring.cloud.vault.generic.backend=***
spring.cloud.vault.generic.enabled=false
spring.cloud.vault.host=****
spring.cloud.vault.kv.application-name=****
spring.cloud.vault.kv.backend=****
spring.cloud.vault.kv.enabled=true
spring.cloud.vault.kv.profile-separator=/
spring.cloud.vault.port=8200
spring.cloud.vault.scheme=https
spring.cloud.vault.ssl.trust-store=*****.jks
spring.cloud.vault.ssl.trust-store-password=***
management.health.vault.enabled = false
spring.cloud.vault.config.lifecycle.enabled=false
Note if spring.cloud.vault.config.lifecycle.enabled is set to true then it is able to load secrets from vault. my goal for setting this property is to load secrets from vault only during application startup time and reduce further secret renew calls to vault once application is started.
以下是当属性设置为 true 时对保管库的请求序列
https://:/v1/sys/internal/ui/mounts///local
https://:/v1/auth/approle/login
https://:/v1//data//本地
https://:/v1/sys/internal/ui/mounts//
https://:/v1 //data/
下面是属性设置为 false 时对保管库的请求 https://:/v1///本地
I am using spring cloud starter vault config of version 2.2.5.RELEASE for connecting to my secured vault server which is working on approle authentication mechanism, i observed that if i setup value to false for property spring.cloud.vault.config.lifecycle.enabled spring is unable to load secrets from vault its failing with below error:
17:27:05.823 DEBUG [ main] o.s.v.a.AppRoleAuthentication - - Login successful using AppRole authentication
17:27:06.121 WARN [ main] o.s.c.v.config.VaultConfigTemplate - - Could not locate PropertySource: Status 403 Forbidden [/*/local]: 1 error occurred:
* permission denied
below is my bootstrap.properties configuration:
#Project Details
info.app.name = ****
info.app.version = @project.version@
spring.application.name = ***
logging.level.org.springframework.vault = TRACE
spring.cloud.vault.app-role.auth-path=approle
spring.cloud.vault.app-role.role-id=****
spring.cloud.vault.app-role.secret-id=****
spring.cloud.vault.authentication=APPROLE
spring.cloud.vault.generic.application-name=****
spring.cloud.vault.generic.backend=***
spring.cloud.vault.generic.enabled=false
spring.cloud.vault.host=****
spring.cloud.vault.kv.application-name=****
spring.cloud.vault.kv.backend=****
spring.cloud.vault.kv.enabled=true
spring.cloud.vault.kv.profile-separator=/
spring.cloud.vault.port=8200
spring.cloud.vault.scheme=https
spring.cloud.vault.ssl.trust-store=*****.jks
spring.cloud.vault.ssl.trust-store-password=***
management.health.vault.enabled = false
spring.cloud.vault.config.lifecycle.enabled=false
Note if spring.cloud.vault.config.lifecycle.enabled is set to true then it is able to load secrets from vault. my goal for setting this property is to load secrets from vault only during application startup time and reduce further secret renew calls to vault once application is started.
below are the sequence of requests to vault when property is set to true
https://:/v1/sys/internal/ui/mounts///local
https://:/v1/auth/approle/login
https://:/v1//data//local
https://:/v1/sys/internal/ui/mounts//
https://:/v1//data/
below are requests to vault when property is set to false
https://:/v1///local
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论