Skip to content

Read most up-to-date secrets from AWS Secrets Manager #2347

@ojecborec

Description

@ojecborec

When reading properties from multiple sources (like Git and Secrets Manager) one might send the following request to Spring Cloud Config Server

GET /foo/test/foo-1.0.0 HTP/1.1

where

foo - application name
test - profile
foo-1.0.0 - version/label

I would like to have option to tag Git repository as foo-1.0.0 to fetch versioned properties from Git repository but at the same time to
fetch the most recent versions of secrets from the AWS Secrets Manager. The AwsSecretsManagerEnvironmentRepository is giving me only 2 options at the moment.

  1. Read version off the request (provided as findOne(String application, String profileList, String label) label parameter).
  2. Use the default one, that is environmentProperties.getDefaultLabel(), but only if label parameter is empty.

Would it be possible to overwrite/disable label by configuring the environmentProperties properties? Eventually turning

GetSecretValueRequest.builder()
                .secretId(path)
                .versionStage(label)
                .build()

into

GetSecretValueRequest.builder()
                .secretId(path)
                .build()

Having option to extend the AwsSecretsManagerEnvironmentRepository class and overwrite its functionality might work as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions