Package Exports
- node-vault
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-vault) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-vault
A client for the HTTP API of HashiCorp's Vault written for Node.js.
Install
npm install node-vault
Usage
Init and unseal
vault = require("node-vault")()
vault.init { secret_shares: 1, secret_threshold: 1 }, (err, result)->
# in the result object you can find the keys and the root_token
{ keys, root_token } = result
vault.token = root_token # set token for any further requests to the server
vault.unseal { secret_shares: 1, key: keys[0] }, (err, result)->
Write, read and delete secrets
vault.write 'secret/hello', { value: 'world', lease: '1s' }, (err, result)->
vault.read 'secret/hello', (err, result)->
vault.delete 'secret/hello', (err, result)->
Please have a look at the example dir for a list of implemented features.