AWS Secrets Manager 後端
Spring Cloud Config Server 支援 AWS Secrets Manager 作為配置屬性的後端。您可以透過新增對 AWS Java SDK for Secrets Manager 的依賴來啟用此功能。
pom.xml
<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 憑證使用 預設憑證提供程式鏈 來確定。
|