GitXplorerGitXplorer
r

node-credstash

public
20 stars
25 forks
4 issues

Commits

List of commits on branch master.
Verified
1d1da98eda52bd1c4359326bc7d05f5b6c439f9e

Merge pull request #34 from egdelwonk/patch-1

rroylines committed 7 years ago
Verified
4b45587bcb3b397e79a51fcc650e3a15c5166d39

Merge pull request #37 from MasteryConnect/master

rroylines committed 7 years ago
Unverified
46cb4a526b900e086b921439ba640bb19cdf8847

Fixes the issue introduced by credstash fugue/credstash#154, where the hmac value in dynamodb is binary instead of the expected string type

committed 7 years ago
Verified
30a78cd27d2c591be560e276e77373f769155a8d

added examples

rroylines committed 8 years ago
Verified
38eaa4c595bde66396a8ad0e21a04f330c38435f

reduced coverage threshold slightly

rroylines committed 8 years ago
Unverified
f0589f00cb38d72a85a8a0e46b1c466e4f27ffbe

Merge pull request #33 from one20inc/fix-version-check

rroylines committed 8 years ago

README

The README file for this repository.

node-credstash

Circle CI

Node.js module for reading credstash secrets without needing snakes

const Credstash = require('credstash');
const credstash = new Credstash();

// .get method for one key (table query)
credstash.get('secret', (e, secret) => {
  console.log('do not share the secret', secret);
});

// .list method for multiple keys (table scan)
credstash.list((e, secrets) => {
  console.log('do not share the secrets', secrets);
});

Installation

Ensure you have AWS credentials configured. The credentials should be set up as a secret reader

$ npm install credstash

What is credstash?

Credstash is a little utility for managing credentials in the cloud

Who this module for?

This module is for environments where you are using credstash to store secrets, and you want to read secrets within node without installing python. The module could be used within your node module to retrieve, for instance, database connection credentials from credstash.

Retrieving the last N versions of a secret

Credstash support versioning of secrets which allows to easily rotate secrets.

By default node-credstash will return the latest (most recent version of a secret). You can also retrieve the latest N versions of a secret as follows:

const Credstash = require('credstash');
const credstash = new Credstash();

credstash.get('secret', {limit: 3}, (e, secrets) => {
  console.log('this is the last version', secrets[0]);
  console.log('this is the second-last', secrets[1]);
  console.log('this is the third-last', secrets[2]);
});