$ npm install nconf$ npm install nconf-credstash
Adding the store
nconf-credstash to the
nconf hierarchy, just import
nconf-credstash and use the
.use() method, the following way:
The store provided by
nconf-credstash supports two ways of fetching secrets:
.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.
.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.
key- The key that will be used the project's secrets within credstash
table- The table in DynamoDB. The default is credential-store. Optional.
region- AWS region. Optional.
context- CredStash context object. Optional.
The tests are written in Jasmine.
$ npm test