此版本仍在开发中,目前尚不稳定。如需最新稳定版本,请使用 Spring Cloud Config 5.0.1spring-doc.cadn.net.cn

AWS 密钥管理服务后端

Spring Cloud Config Server 支持 AWS Secrets Manager 作为配置属性的后端存储。
您可以通过添加对 AWS Java SDK for Secrets Manager 的依赖来启用此功能。spring-doc.cadn.net.cn

pom.xml
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>secretsmanager</artifactId>
</dependency>

以下配置使用 AWS Secrets Manager 客户端来访问密钥。spring-doc.cadn.net.cn

spring:
  profiles:
  	active: awssecretsmanager
  cloud:
    config:
      server:
        aws-secretsmanager:
          region: us-east-1
          endpoint: https://us-east-1.console.aws.amazon.com/
          origin: aws:secrets:
          prefix: /secret/foo
          profileSeparator: _

AWS Secrets Manager API 凭据通过 默认凭证提供程序链 确定。spring-doc.cadn.net.cn

  • 当未指定应用程序时,application 是默认值;当未指定配置文件时,使用 defaultspring-doc.cadn.net.cn

  • ignoreLabel 设置为 true 时,labeldefaultLabel 属性均被忽略。spring-doc.cadn.net.cn