A universal secrets manager
Project description
Mind-Castle - Build a wall around your secrets
A universal secret store for sqlalchemy.
Currently supports:
- HashiCorp Vault
- AWS Secrets Manager
- In-memory and JSON stores that should only be used for testing
Install
pip install mind-castle
Configure
You can configure mind-castle by setting environment variables for your chosen secret store. To see what configuration options are required for each store:
$ python -m mind_castle
Mind-Castle - Shhhhh
====================
Available secret stores:
memory - Required env vars: []
awssecretsmanager - Required env vars: ['MIND_CASTLE_AWS_REGION', 'MIND_CASTLE_AWS_ACCESS_KEY_ID', 'MIND_CASTLE_AWS_SECRET_ACCESS_KEY']
hashicorpvault - Required env vars: ['MIND_CASTLE_VAULT_HOST', 'MIND_CASTLE_VAULT_PORT', 'MIND_CASTLE_VAULT_TOKEN']
json - Required env vars: []
Use
In your model file:
from mind_castle.sqlalchemy import SecretData
class MyDBModel(Base):
name = Column(String, nullable=False)
created_at = Column(DateTime, default=datetime.datetime.now)
secret_data = Column(SecretData("hashicorpvault"))
Your secrets are now safely stored in Vault (or AWS, or anywhere else)!
TODO
- Create migration script (must work for json and non-json columns)
- Add precommit
- Support deleting secrets when row is deleted
- Delete secrets after test and/or mock cloud clients for unit tests
- Implement prefixes/folders for secrets
- Explain how secrets are stored in the readme
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
mind_castle-0.1.8.tar.gz
(49.5 kB
view details)
Built Distribution
File details
Details for the file mind_castle-0.1.8.tar.gz
.
File metadata
- Download URL: mind_castle-0.1.8.tar.gz
- Upload date:
- Size: 49.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7607fe9baa7e48b9ff0242ef7222e7465a49fb1ad3798fb777830cee862b025 |
|
MD5 | 0590eb882ea7a8ce33e37e7396b5f100 |
|
BLAKE2b-256 | 5daedfee8c813fcf367df02500b428ddce076ce27578b4592e6bfa7a46a00497 |
File details
Details for the file mind_castle-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: mind_castle-0.1.8-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 547c77fb5dca7bf70070c9dff95e0c1d63a9aaa7880f90bab21ed6537f74a1dd |
|
MD5 | ecc1e22f367fdf9335d9a9391d297290 |
|
BLAKE2b-256 | f2e5a652d109396b1460b1970c511d172da8a4d4d37ac68217483cfcd3ba5d00 |