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

Uploaded Source

Built Distribution

mind_castle-0.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mind_castle-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cf94f82e960df4ccfcfaf201f22775338e2050cdd3aa23b18c066d3e59121862
MD5 a09d0caa49a0e851c5ed8a7229b87668
BLAKE2b-256 d49e51df6ddb31b86eafd323405113533c04de25b0c05bbda6e03c45a7fb49ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mind_castle-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ffc45767f4a67cfeef11218f9ea52f984191b91882defb870a3cce5a1888d96
MD5 5810f47626c939323984f3e750408846
BLAKE2b-256 54a6f8d6a76d4f5a036a7b26760579d41315c7f8f898313e807127621cf2021b

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