Skip to content

A Maven plugin that extracts secrets from Vault and populate Maven properties.

License

Notifications You must be signed in to change notification settings

HomeOfTheWizard/vault-maven-plugin

 
 

Repository files navigation

vault-maven-plugin

CircleCI codecov Sonatype Nexus (Snapshots) Maven Central Vault Version Reproducible Builds

This Maven plugin supports pull and pushing Maven project properties from secrets stored in HashiCorp Vault.

Forked project from dechiphernow/vault-maven-plugin 👍

Added new features 🚀 :

  • Written with Java 11
  • Upgraded vault driver to use KV2 engine
  • Added vault authentication methods (see below for details).
  • Added Enterprise 🏭 features like Namespace

Usage

To include the vault-maven-plugin in your project add the following plugin to your pom.xml file:
You need to setup an execution phase and configuration.

<build>
    <plugins>
        <plugin>
            <groupId>com.homeofthewizard</groupId>
            <artifactId>vault-maven-plugin</artifactId>
            <version>1.1.7</version>
            <executions>
                ...
                <configuration>
                    ...
                </configuration>
            </executions>
        </plugin>
    </plugins>
</build>

The documentation here is where we explain how to do it in detail.

Building

This build uses standard Maven build commands but assumes that the following are installed and configured locally:

  1. Java (11 or greater)
  2. Maven (3.0 or greater)
  3. Docker

⚠️ The package produced by the project is compatible with Java 8 as runtime,
But you do need JDK 11 or higher to modify or build the source code of this library itself.

⚠️ You also need to create a GitHub PAT,
pass it as an environment variable in your pom.xml ${env.MY_GITHUB_PAT_FOR_VAULT_LOGIN}. This is needed for integration tests related to authentication features.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

A Maven plugin that extracts secrets from Vault and populate Maven properties.

Resources

License

Stars

Watchers

Forks

Languages

  • Java 99.3%
  • Other 0.7%