mumba-microservice-vault
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

build status

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.

List of all contributors

License

Apache 2.0


© 2016 Mumba Pty Ltd. All rights reserved.

Package Sidebar

Install

npm i mumba-microservice-vault

Weekly Downloads

0

Version

0.4.1

License

Apache-2.0

Unpacked Size

24 kB

Total Files

15

Last publish

Collaborators

  • arvin.domingo
  • dennis.barbamumba
  • mumba.cloud
  • carl-oehme-mumba
  • kennbaker