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.7.tar.gz
(49.5 kB
view details)
Built Distribution
File details
Details for the file mind_castle-0.1.7.tar.gz
.
File metadata
- Download URL: mind_castle-0.1.7.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 | 42b28ec6f36600ecf6d6b2eacd0af2f5b8fe186ea14308bdd2af3bc55eca0dd1 |
|
MD5 | b60fd31135ffa5e7817d67fc8ce32830 |
|
BLAKE2b-256 | d8ff6af5f73061152154d3e94c16e3b439633a011b002413362676e8f121d74b |
File details
Details for the file mind_castle-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: mind_castle-0.1.7-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 | 51831d766f2a37e0925d8639db829ed2a16950879a092f1f6283e6fba84d376b |
|
MD5 | 68f1afebd98db7ba36ccd4fc1353145b |
|
BLAKE2b-256 | b07c8039c1f8fd6189d60479b8ffc3d0bf8f116998e4c9b0696a9d3b9b0a9bd8 |