aws-secretsmanager


License

License

Categories

Categories

AWS Container PaaS Providers
GroupId

GroupId

io.github.eduardohl
ArtifactId

ArtifactId

aws-secretsmanager
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

aws-secretsmanager
aws-secretsmanager
Project URL

Project URL

https://github.com/eduardohl/aws-secretsmanager
Project Organization

Project Organization

io.github.eduardohl
Source Code Management

Source Code Management

https://github.com/eduardohl/aws-secretsmanager

Download aws-secretsmanager

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.eduardohl/aws-secretsmanager/ -->
<dependency>
    <groupId>io.github.eduardohl</groupId>
    <artifactId>aws-secretsmanager</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.eduardohl/aws-secretsmanager/
implementation 'io.github.eduardohl:aws-secretsmanager:0.0.5'
// https://jarcasting.com/artifacts/io.github.eduardohl/aws-secretsmanager/
implementation ("io.github.eduardohl:aws-secretsmanager:0.0.5")
'io.github.eduardohl:aws-secretsmanager:jar:0.0.5'
<dependency org="io.github.eduardohl" name="aws-secretsmanager" rev="0.0.5">
  <artifact name="aws-secretsmanager" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.eduardohl', module='aws-secretsmanager', version='0.0.5')
)
libraryDependencies += "io.github.eduardohl" % "aws-secretsmanager" % "0.0.5"
[io.github.eduardohl/aws-secretsmanager "0.0.5"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.4
io.monix : monix_2.13 jar 3.3.0
com.amazonaws : aws-java-sdk jar 1.11.927
org.json4s : json4s-native_2.13 jar 3.6.10

test (3)

Group / Artifact Type Version
com.dimafeng : testcontainers-scala-scalatest_2.13 jar 0.38.8
com.dimafeng : testcontainers-scala-localstack_2.13 jar 0.38.8
org.scalatest : scalatest_2.13 jar 3.2.2

Project Modules

There are no modules declared in this project.

Scala CI

Description

This is a simple Scala wrapper intended to assist using the AWS Secrets Manager API. The wrapper is by no means exhaustive, and implements essentially just a way to retrieve secret key values.

Configuration

Import it from Maven Central by adding to dependencies

libraryDependencies ++= Seq(
  "io.github.eduardohl" %% "aws-secretsmanager" % "0.0.x"
)

Usage

This code will return a Task[Secret] from which the resulting key values can be extracted

SecretManager(Regions.AP_EAST_1).retrieveSecretValue("mysecret")

Credentials

This lib uses the aws sdk, so the credentials can be set using one of the secured ways below:

  • From environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)
  • From Java system properties (aws.accessKeyId and aws.secretKey)
  • From a custom Credentials Provider using:
val buildSecretsManager: Task[AWSSecretsManager] = Task(AWSSecretsManagerClientBuilder
         .standard
         .withRegion(region)
         .withCredentials(mycredentials)
         .build)
         
new SecretManager(buildSecretsManager).retrieveSecretValue("nonexistingsecret")

Versions

Version
0.0.5