Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sheinbergon/governator-vault
Netflix's Governator integration with Hashicorp's Vault
https://github.com/sheinbergon/governator-vault
guice hashicorp java netflix netflix-oss vault
Last synced: 18 days ago
JSON representation
Netflix's Governator integration with Hashicorp's Vault
- Host: GitHub
- URL: https://github.com/sheinbergon/governator-vault
- Owner: sheinbergon
- License: apache-2.0
- Created: 2017-09-03T21:37:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T15:01:26.000Z (about 7 years ago)
- Last Synced: 2024-11-17T19:45:30.438Z (3 months ago)
- Topics: guice, hashicorp, java, netflix, netflix-oss, vault
- Language: Java
- Homepage:
- Size: 68.4 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# governator-vault
[![Build Status](https://travis-ci.org/sheinbergon/governator-vault.svg?branch=master)](https://travis-ci.org/sheinbergon/governator-vault) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sheinbergon/governator-vault/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sheinbergon/governator-vault) [![GitHub release](https://img.shields.io/github/release/sheinbergon/governator-vault.svg)](https://img.shields.io/github/release/sheinbergon/governator-vault)This library provides smooth integration between Hashicorp's Vault and Netflix's Governator (Guice), allowing
you to store and retrieve your application configuration transparently from the vault.Up ahead on the roadmap :
- More tests
- More examples
- Better support for token renewals
- Multiple secrets/namespaces support
- Different auth-backends support (currently, only App-Role is supported).
- Nested data-structures (???)## Usage
#### Dependency configuration
Artifacts are available in maven central.
##### Maven:
```xml
org.sheinbergon
governator-vault
1.17.4```
##### Gradle:
```groovy
compile "org.sheinbergon:governator-vault:1.17.4"
```#### Simple setup:
```java
BootstrapModule bootstrapModule = new VaultConfigurationProviderBoostrapModule(
SECRET_PATH,VARIABLE_VALUES,
VaultConfigBuilder
.start()
.token(VAULT_TOKEN)
.address(VAULT_URL)
.build();
vaultConfig());
```
Where :- `SECRET_PATH` - Path to the vault secret stroing all of the configuration parameters ( WITHOUT leading '/')
- `VARIABLE_VALUES` - A `Map` of dynamic configuration variables as described [here](https://github.com/Netflix/governator/wiki/Configuration-Mapping)
- `VAULT_TOKEN` - Vault access token (GUID), as provided/generated by the vault overseer
- `VAULT_URL` - Vault access url.#### Governator/Guice integration:
```java
LifeCycleInjector injector = LifecycleInjector.builder().
withBootstrapModule(bootstrapModule).
withModules(...).
requiringExplicitBindings().
build().
createInjector();LifecycleManager manager = injector.getInstance(LifecycleManager.class);
manager.start();
```