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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mind_castle-0.1.10.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.1.10.tar.gz
Algorithm Hash digest
SHA256 de6f794bd524dff1e168936113a9fe3f17c4dfceae8e109b3f7f44837ba91ba4
MD5 a3536a9d7e87131dd362640b9309dfe2
BLAKE2b-256 b05d548a71c071db83b6ea9c5313a66dcfa82bd21b049131aa3ff504bbf78af1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mind_castle-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9c8c3164c602055d100f457ddadb4dcccd67fcac2ecf5b1b692f7ef643182caa
MD5 c9afeab5103829ecd8980656df889d4f
BLAKE2b-256 ad3c061133153c839c1384be2deb6c43f269ea2dfb7cc5f3d381c8c189356614

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