commons-configuration2-vault

Hashicorp Vault integration for Apache Commons Configuration 2

License

License

Categories

Categories

Configuration Application Layer Libs config
GroupId

GroupId

com.nerdynick
ArtifactId

ArtifactId

commons-configuration2-vault
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

commons-configuration2-vault
Hashicorp Vault integration for Apache Commons Configuration 2
Project URL

Project URL

https://github.com/nerdynick/commons-configuration-vault

Download commons-configuration2-vault

How to add to project

<!-- https://jarcasting.com/artifacts/com.nerdynick/commons-configuration2-vault/ -->
<dependency>
    <groupId>com.nerdynick</groupId>
    <artifactId>commons-configuration2-vault</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.nerdynick/commons-configuration2-vault/
implementation 'com.nerdynick:commons-configuration2-vault:1.0'
// https://jarcasting.com/artifacts/com.nerdynick/commons-configuration2-vault/
implementation ("com.nerdynick:commons-configuration2-vault:1.0")
'com.nerdynick:commons-configuration2-vault:jar:1.0'
<dependency org="com.nerdynick" name="commons-configuration2-vault" rev="1.0">
  <artifact name="commons-configuration2-vault" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nerdynick', module='commons-configuration2-vault', version='1.0')
)
libraryDependencies += "com.nerdynick" % "commons-configuration2-vault" % "1.0"
[com.nerdynick/commons-configuration2-vault "1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.commons : commons-configuration2 jar 2.7
org.slf4j : slf4j-api jar 1.7.30
com.bettercloud : vault-java-driver jar 5.1.0

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 3.1.0
ch.qos.logback : logback-classic jar 1.2.3

Project Modules

There are no modules declared in this project.

commons-configuration-vault

Hashicorp Vault integration for Apache Commons Configuration.

Maintainability Travis CI: Build Status

Getting Started

Maven Dependency

<dependency>
    <groupId>com.nerdynick</groupId>
    <artifactId>commons-configuration2-vault</artifactId>
    <version>${version}</version>
</dependency>

Basic Usage

Example Config File:

credentials:
  username: "${vault:my/path:my.username}"
  password: "${vault:my/path:my.password}"

Example Java Usage:

final Vault myVault = new Vault(new VaultConfig()
    .address("http://vault.example.com")
    .token("my-token")
    .build());

final MapConfiguration configs = new MapConfiguration(new HashMap<>());
configs.getInterpolator().registerLookup("vault", new VaultLookup(vault));

See Vault Java Driver docs for more examples and details on how to create the Vault Client.

Packaged with this library is also a utility, VaultConfigUtils.java, to assist with creating VaultConfig and SslConfig instances using commons-configuration.

Versions

Version
1.0