add AWS Secrets Manager related libraries for use in application configuration #329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
spring-cloud-aws-starter-secrets-manager
which allows referencing secrets maintained in AWS Secrets Manager as part of normal Spring Boot application configuration as config importsaws-secretsmanager-jdbc
which allows using credentials maintained in Secrets Manager as database connection parametersMotivation:
In short, our AWS environment configuration relies on these libraries to keep secrets secret without inclusion in plaintext to project metafiles and also allow for keeping the configuration short :-)
Both of these libraries are visible in configuration only. As a pseudo example, these are utilized like so:
Both of these libraries utilize AWS' automatic identity management based on where the code is running, meaning the runtime environment itself has automatically access to specific resources without need to carry e.g. secret key as part of the deployment, only the references to where such key would be found.
On more nifty thing is that this also allows for rotating credentials without redeployment, as
AWSSecretsManagerPostgreSQLDriver
will re-resolve the credentials on authentication errors.