Secret distribution tool, written as a wrapper on credstash
Project description
Razorpay’s Secret Credential management system.
Installation
alohomora is distributed via PyPi:
pip install razorpay.alohomora
What?
Alohomora is an opinionated project that relies on our conventions to intelligently fetch secrets at run-time.
We don’t do our own crypto. We rely on these libraries instead:
This is how the template file looks in our app repository:
# {{ alohomora_managed }}
DB_PASSWORD = {{ lookup('db_password') }}
APP_ENV = {{ env }}
ENV_DEBUG = {{ ENV['DEBUG'] }}
APP_NAME = {{ app }}
This repo runs directly on the same template and generates the equivalent file as the output.
The steps it follows are the following:
Figure out the tables from which to read. All secrets are stored in a credstash-env-app table structure in dynamoDB.
Fetch all secrets from that table using credstash
Render the template with the secrets using jinja
How it Works?
Alohomora expects the secrets for any application to be stored in a table called credstash-{env}-{app}. The IAM roles for this table must be configured by you. Once you try to render a template, alohomora will do the following:
Read the entire table and decrypt all secrets and cache them locally.
Render the template with these files and 3 extra variables: env, app, and ENV variables.
ENV is same as os.environ inside the jinja template.
Configuration?
Alohomora is designed to be a zero-config solution.
We perform a few transforms on the arguments that are passed:
Change both app and env to lowercase
Replace production with prod in the env name
Ignore anything after - in the environment. So beta-birdie becomes beta
Usage
Please see the wiki regarding alohomora binary usage.
LICENSE
alohomora is released under the same license as credstash.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file razorpay.alohomora-0.4.7.tar.gz
.
File metadata
- Download URL: razorpay.alohomora-0.4.7.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c8539c21749f27a74e39d287a24b0c9e5391a01d0ca939cb3c0157a6d9cf459 |
|
MD5 | f4e6484bdd38bec1104d0af2098a0c75 |
|
BLAKE2b-256 | 6050060e8e157e1eb7fbf21413d43d56f4e0221123105492c3d111fef88fa452 |