Skip to main content

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


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.4.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

mind_castle-0.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file mind_castle-0.1.4.tar.gz.

File metadata

  • Download URL: mind_castle-0.1.4.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.29

File hashes

Hashes for mind_castle-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a3f65ce01a440bdedcea0a56074e754a765246e0cc681bad20793d9e5ba737a6
MD5 de2546c7717d2669d40659404320c735
BLAKE2b-256 9120a07065a46cf2e2b329cb6dd83c24c84a2a1c771555dc8c2dea9f4af19d53

See more details on using hashes here.

File details

Details for the file mind_castle-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mind_castle-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e2564b8a3911011af8d86e7aa3e4c39aa60ab113bf6c3e3d9fc70ea14d5bb972
MD5 1bac30e8007713cdeeb31037e9da33e6
BLAKE2b-256 fbbf83a8b6fb47479ff98219c4d20e347e6c90861631a3837e06157d28c63ea9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page