1.0.15 • Published 4 years ago

swint-secret v1.0.15

Weekly downloads
115
License
MIT
Repository
github
Last release
4 years ago

swint-secret

Greenkeeper badge Secret string manager for Swint. Save your secret strings in Amazon S3 and avoid accidental commitment of secret strings!

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-secret

Preparation

  • You may save your secret credentials at $HOME/.swint/aws.json in the format below:
{
	"id": "ADJFNAIAMYAWSID",
	"secret": "DEJNARGMKAJENVADMMYAWSSECRET"
}
  • Or, you can set variables with key SWINT_SECRET_KEY, SWINT_SECRET_SECRET pair.

Testing

You may save your secret credentials for the test at $HOME/.swint/swint-secret-test.json in the format below:

{
	"id": "ADJFNAIAMYAWSID",
	"secret": "DEJNARGMKAJENVADMMYAWSSECRET",
	"bucket": "swint-secret"
}

Options

  • bucket : String, default: ''
  • credPath : String, default: path.join(process.env.HOME, '.swint', 'aws.json')
  • paths : Object, default: {}

Usage

var ss = new swintSecret({
	bucket: 'myBucketForSecret',
	paths: {
		a: 'aaa.txt',
		b: 'bbb.txt',
		c: {
			d: ['ddd1.txt', 'ddd2.txt', 'ddd3.txt'],
			e: 'eee.txt'
		}
	}
});

ss.ready(function(err, res) {
	if(err) {
		print(4, err);
		return;
	}

	// res will be the fetched string of your secret credentials
});
1.0.15

4 years ago

1.0.14

5 years ago

1.0.13

6 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago