secstache
Fill mustache template(s) with secrets from secret store(s).
Installation
pip install secstache
Usage
$ secstache -h
usage: secstache [-h] [--asm key] [--strict] [file1.mustache ...]
Fill mustache template(s) with secrets from secret store(s).
positional arguments:
file1.mustache mustache files to process
optional arguments:
-h, --help show this help message and exit
--asm key AWS Secret Manager key
--strict fail if a tag key is not found
EXAMPLE:
Create db.conf from db.conf.mustache using secrets in AWS Secret Manager under "prod/db"
secstache --asm prod/db db.conf.mustache
Example
Say, you have a secret stored in secrets manager under the name of prod/db with the SecretString set to:
{
"DB_USER": "foo_user",
"DB_PASS": "foo_pass"
}
You can create a mustache file like this:
$ cat db.conf.mustache
DB_NAME = foo_db
DB_USER = {{DB_USER}}
DB_PASS = {{DB_PASS}}
and run secstache this way:
$ secstache --asm prod/db db.conf.mustache
Rendered db.conf.mustache to db.conf
This creates the db.conf file that looks like this:
$ cat db.conf
DB_NAME = foo_db
DB_USER = foo_user
DB_PASS = foo_pass
Supported secret stores
AWS Secrets Manager
Load secrets from AWS Secrets Manager via --asm key option. Note that your environment must be configured so as to support boto3. (I.e., you must be able to run aws successfully in your environment.)
Other secret stores
PR's welcome! 😁
Metadata
Release files for secstache 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| secstache-0.3.7.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secstache-0.3.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / secstache-0.3.7.tar.gz
| Download URL | secstache-0.3.7.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cbfc55be2cee1d6e54a5c4e695f347d42a95c900f9b1ed261ff66a3cecb77b2
|
|
BLAKE2b-256 checksum How to use checksums |
9f7c2ff644ccbfd982ad4b2fd6a700bbb9eb77e1529373f8424c8267355ead52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0
|
Release files / secstache-0.3.7-py3-none-any.whl
| Download URL | secstache-0.3.7-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2ae1b2b7aa5d37f7952329fbbe9eda06a2c376fa55a2d34797d0fee11b6906f
|
|
BLAKE2b-256 checksum How to use checksums |
380bb9a9fbd171a7e141c017d8a30b5331ca462d50fa65110d1c3ec5553755a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0
|