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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mind_castle-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 7a2c94babc4ecd128ba7a8c8e08617b296e0d55eab6149b219807cf13d134c82
MD5 9771be8814f0eedebc8e7c49abfb8beb
BLAKE2b-256 927ec4031c3ab4273be66420b22a8956930578b740f6061326ee552d6e961ab2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mind_castle-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0035efabc99be5909df7d49b166c1a37f329d1250dc55b8bd6e4834a7959fc5b
MD5 c0f17b1860ae1c1aeb9a0f13f6dee9f4
BLAKE2b-256 bb385eccb0406c9617b463b3ff64123b35db7e9f1a5fd3eb2402887be009179f

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