Current scenario
application.yaml
但是现在,想在AWS Secret Manager中存储所有Spring Boot应用程序的所有秘密,从配置服务器中获取并将其提供给相应的微服务。因此,从AWS Secret Manager中获取秘密的责任仍然仅保留在配置服务器上。
What we want to achieve
附录1:我们试图按照下面的春季文档中提到的AWS Secret Manager整合,但似乎并没有击中秘密经理以获取以下机构的秘密。
https://docs.spring.io/spring-cloud-config/reference/server/server/environment-repository/aws-secrets-manager.html, https://docs.spring.io/spring-cloud-config/reference/server/server/environment-repository/aws-secrets-manager-backend.html,
What we have tried so far
文件中删除了所有秘密属性,并在AWS Secret Manager中创建了以下命名约定的秘密(如上所述):application.yaml
/secret/<application name>
文件中的there propert在下面的文档中提到的配置:https://www.baeldung.com/spring-boot-integrate-aws-secrets-manager
在这种情况下,我们可以访问配置服务器中Secret Manager中提到的秘密,但无法将其传递到相应的Spring Boot应用程序。我们尝试直接在相应的Spring Boot应用程序的
spring.config.import
文件中直接提及秘密,但它无法正常工作:application.yaml
application.yaml
application-<application name>.yaml
,是AWS秘密经理中提到的秘密。当我们尝试在配置服务器本身中访问
spring:
datasource:
url: ${dbConnStr}
时,它就可以正常工作。
在我们的情况下,上述方法都无法使用。有人知道我们如何将AWS Secret Manager与Spring Cloud Config Server一起使用为其他多个Spring Boot应用程序提供属性?
我面临与您完全相同的问题。您是否设法找到了修复程序或解决方法?任何帮助将不胜感激!