Skip to content

A CredStash store for nconf configuration library

Notifications You must be signed in to change notification settings

bookmd/nconf-credstash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nconf-credstash

CircleCI

A CredStash store for nconf. Enabling managing secrets in CredStash and integrating them with nconf.

Installation

Setup CredStash

Install and setup CredStash.

Install nconf-credstash

  $ npm install nconf
  $ npm install nconf-credstash

Usage

Adding the store

To add nconf-credstash to the nconf hierarchy, just import nconf-credstash and use the .use() method, the following way:

require('nconf-credstash');

nconf.use('nconf-credstash', { key: 'KEY' });

Fetching secrets

The store provided by nconf-credstash supports two ways of fetching secrets:

  1. .get(key) to fetch a specific key. For every call to .get(key) the store searches it's inner cache and only if the key does not exist goes to CredStash to fetch it. Because of Credstash's performance issues, we fetch all of the secrets as one group.
  2. .get() to fetch the entire store from CredStash. The store is cached for subsequent calls.

All calls are synchronous, using node's ability to spawn child processes synchronously.

Other options

  1. key - The key that will be used the project's secrets within credstash
  2. table - The table in DynamoDB. The default is credential-store. Optional.
  3. region - AWS region. Optional.
  4. context - CredStash context object. Optional.
  5. profile - AWS role as defined in local credentials file

Running tests

The tests are written in Jasmine.

  $ npm test

About

A CredStash store for nconf configuration library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •