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.2.1.tar.gz
(49.5 kB
view details)
Built Distribution
File details
Details for the file mind_castle-0.2.1.tar.gz
.
File metadata
- Download URL: mind_castle-0.2.1.tar.gz
- Upload date:
- Size: 49.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b21e92fa5f45daaa21fe506e646f8d46570974140a05eb144a1aaed8734b43 |
|
MD5 | 06073b71b57ad2549fba2bfc2686b3bd |
|
BLAKE2b-256 | be13b150524ad9e06c2550a32f07ae26c7086657052878aa13a237ed46573c33 |
File details
Details for the file mind_castle-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: mind_castle-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75507e23a6cec3627334dd6b9d7c0dc95bc654088b94ba18f51054f3166f21f |
|
MD5 | 9767323a104b2e1c562ee0d8b9b8d366 |
|
BLAKE2b-256 | 16825d2eeb515e7449168ab13f8f9a8f4aa092076a52d112945718d7af208fa1 |