mumba-microservice-vault
v0.4.1
Published
A Mumba Microservice module that provides WAMP (via Autobahn) support.
Downloads
2
Readme
Mumba Microservice Vault
Provide HashiCorp Vault support for a Microservice.
Configuration
This module requires that a Config
object has been registered as config
.
Property | Type | Description
--- | :---: | ---
vault
| object
| A dictionary of options required for a GenericSecret
object (see VaultOptions
interface).
vault:host
| string
| The hostname for the Vault server.
DI Container
This module adds the following container artifacts if they don't already exist.
Name | Type | Description
--- | :---: | ---
vault
| GenericSecret
| An instance of a mumba-vault
object.
vaultOptions
| VaultOptions
interface | A dictionary options for vault.
Installation
$ npm install --save mumba-microservice-vault
$ typings install --save dicontainer=npm:mumba-typedef-dicontainer
Examples
const Sandal = require("sandal");
import {DiContainer} from "mumba-typedef-dicontainer";
import {Config} from "mumba-config";
import {GenericSecret} from "mumba-vault";
import {MicroserviceVaultModule} from "mumba-microservice-vault";
let container: DiContainer = new Sandal();
// Set the configuration for the logger.
// (or include the Microservice Config Module and set `defaultConfig`)
container.object('config', new Config({
vault: {
}
}));
// Register the module.
MicroserviceVaultModule.register(container);
container.resolve((err: Error, vault: GenericSecret) => {
if (err) {
throw err;
}
// Connect to Vault
});
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm run docker:up
$ npm install
$ npm test
$ npm docker:down
People
The original author of Mumba Microservice Vault is Andrew Eddie.
License
© 2016 Mumba Pty Ltd. All rights reserved.