credstash
Module for reading credstash secrets
Last updated 3 years ago by roylines .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install credstash 
SYNC missed versions from official npm registry.

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]);
});

Current Tags

  • 1.0.44                                ...           latest (3 years ago)

22 Versions

  • 1.0.44                                ...           3 years ago
  • 1.0.43                                ...           3 years ago
  • 1.0.42                                ...           4 years ago
  • 1.0.41                                ...           4 years ago
  • 1.0.39                                ...           4 years ago
  • 1.0.36                                ...           4 years ago
  • 1.0.34                                ...           4 years ago
  • 1.0.32                                ...           4 years ago
  • 1.0.31                                ...           4 years ago
  • 1.0.30                                ...           4 years ago
  • 1.0.27                                ...           4 years ago
  • 1.0.26                                ...           4 years ago
  • 1.0.20                                ...           4 years ago
  • 1.0.18                                ...           4 years ago
  • 1.0.17                                ...           4 years ago
  • 1.0.13                                ...           4 years ago
  • 1.0.12                                ...           4 years ago
  • 1.0.11                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (6)

Copyright 2014 - 2017 © taobao.org |