AWS Secrets Manager 后端
Spring Cloud Config Server 支持将 AWS Secrets Manager 作为配置属性的后端。您可以通过添加对 AWS Java SDK for Secrets Manager 的依赖来启用此功能。
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>secretsmanager</artifactId>
</dependency>
以下配置使用 AWS Secrets Manager 客户端来访问密钥。
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 凭证通过 默认凭证提供链 确定。
备注
-
当未指定应用时,默认使用
application;当未指定配置文件时,默认使用default。 -
当
ignoreLabel设置为true时,label和defaultLabel属性将被忽略。