Spring Property AWS SSM Resolver

Spring add-on that fetches Spring properties with a certain prefix from the AWS SSM Parameter Store

License

License

Categories

Categories

AWS Container PaaS Providers
GroupId

GroupId

com.nitorcreations
ArtifactId

ArtifactId

spring-property-aws-ssm-resolver
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Property AWS SSM Resolver
Spring add-on that fetches Spring properties with a certain prefix from the AWS SSM Parameter Store
Project URL

Project URL

https://github.com/NitorCreations/spring-property-aws-ssm-resolver.git
Project Organization

Project Organization

Nitor
Source Code Management

Source Code Management

https://github.com/NitorCreations/spring-property-aws-ssm-resolver.git

Download spring-property-aws-ssm-resolver

How to add to project

<!-- https://jarcasting.com/artifacts/com.nitorcreations/spring-property-aws-ssm-resolver/ -->
<dependency>
    <groupId>com.nitorcreations</groupId>
    <artifactId>spring-property-aws-ssm-resolver</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.nitorcreations/spring-property-aws-ssm-resolver/
implementation 'com.nitorcreations:spring-property-aws-ssm-resolver:1.0.0'
// https://jarcasting.com/artifacts/com.nitorcreations/spring-property-aws-ssm-resolver/
implementation ("com.nitorcreations:spring-property-aws-ssm-resolver:1.0.0")
'com.nitorcreations:spring-property-aws-ssm-resolver:jar:1.0.0'
<dependency org="com.nitorcreations" name="spring-property-aws-ssm-resolver" rev="1.0.0">
  <artifact name="spring-property-aws-ssm-resolver" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nitorcreations', module='spring-property-aws-ssm-resolver', version='1.0.0')
)
libraryDependencies += "com.nitorcreations" % "spring-property-aws-ssm-resolver" % "1.0.0"
[com.nitorcreations/spring-property-aws-ssm-resolver "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter jar 1.5.8.RELEASE
com.amazonaws : aws-java-sdk-ssm jar 1.11.238

Project Modules

There are no modules declared in this project.

Spring Property AWS SSM Resolver

Introduction

AWS SSM Parameter Store enables easy storage of encrypted parameters, such as database passwords or API keys, and easy retrieval during runtime for applications running on AWS infrastructure.

spring-property-aws-ssm-resolver is a small Spring Boot plugin for resolving AWS SSM Parameters during startup simply by using prefixed regular Spring Boot properties.

Installation

Maven

<dependency>
    <groupId>com.nitorcreations</groupId>
    <artifactId>spring-property-aws-ssm-resolver</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

Put this plugin on your Spring Boot application classpath.

Make sure your application can find the correct AWS region through the AWS Default Region Provider Chain. The simplest universal way is through the AWS_REGION environment variable.

Set up your Spring Properties with the {ssmParameter} prefix.

Example application.yml:

my.regular.property: 'Foo'
my.secret.property: '{ssmParameter}/myproject/myapp/mysecret'

During startup, the plugin would look for properties with this prefix and replace the value by looking for a property called /myproject/myapp/mysecret on AWS SSM.

The AWS client initialization is lazy, so using this plugin does not require AWS access, provided that the environment contains no properties with this prefix.

The AWS client currently assumes all resolved properties are encrypted on SSM.

Technically the substitution is accomplished by constructing additional Spring property sources with intentionally conflicting property names, and adding them before the property sources in which the prefixed properties were found in.

com.nitorcreations

Nitor Creations

Versions

Version
1.0.0