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

Uploaded Source

Built Distribution

mind_castle-0.2.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mind_castle-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e30ec64f7406e9cd153d6f452a72e9aaf29d30614af21b1e8e3d83fc3ee322c7
MD5 f3db49cbc3f7eb33bc57ffbef20d7520
BLAKE2b-256 869dfa22d6b89033d936d4560bc44752b828e6122baf975d8e74987dc86cce1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mind_castle-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a80faab3dacb6d5c9978e355b3e39d9df8f2e6f2d54cb630e2d37fafd528e93c
MD5 6982c6927fe0a7bcf757f54e4370ae84
BLAKE2b-256 05e864fbfea08d7cf6eda5186a08d65998b044578fdd8aa4a848401811021da4

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