0.4.1 • Published 6 years ago

mumba-microservice-vault v0.4.1

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
6 years ago

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.

PropertyTypeDescription
vaultobjectA dictionary of options required for a GenericSecret object (see VaultOptions interface).
vault:hoststringThe hostname for the Vault server.

DI Container

This module adds the following container artifacts if they don't already exist.

NameTypeDescription
vaultGenericSecretAn instance of a mumba-vault object.
vaultOptionsVaultOptions interfaceA 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.

0.4.1

6 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago