Client-side envelope encryption for files using AWS KMS, with DynamoDB state tracking
Project description
envault
Client-side envelope encryption for files using AWS KMS, with DynamoDB state tracking and a full audit trail.
Beta Software — This project is under active development and is not yet recommended for production use. APIs, CLI flags, and storage formats may change between releases. Use at your own risk.
How it works
- Files are encrypted locally using AES-256-GCM via the AWS Encryption SDK
- The data encryption key (DEK) is wrapped by your KMS customer-managed key (CMK) — plaintext never leaves your machine
- Encrypted files are stored in S3; state and audit events are tracked in DynamoDB
- Decryption requires AWS credentials with
kms:Decrypton the CMK
Installation
pip install envault-cli
Requires Python 3.10+.
Quick start
# Set required environment variables
export ENVAULT_KEY_ID=alias/my-kms-key
export ENVAULT_BUCKET=my-encrypted-files-bucket
export ENVAULT_TABLE=envault-state
# Encrypt a file
envault encrypt ./secret.txt --tag project=finance
# Check state
envault dashboard
# Decrypt by filename (or SHA256 hash)
envault decrypt secret.txt -o ./
Configuration
All config via environment variables — no config files with secrets.
| Variable | Required | Default | Description |
|---|---|---|---|
ENVAULT_KEY_ID |
Yes | — | KMS key alias (e.g. alias/my-key) |
ENVAULT_BUCKET |
Yes | — | S3 bucket for encrypted files |
ENVAULT_TABLE |
Yes | — | DynamoDB table name |
ENVAULT_REGION |
No | us-east-1 |
AWS region |
ENVAULT_AUDIT_TTL_DAYS |
No | 365 |
Days to retain audit events |
CLI reference
# Encrypt a file (or directory) and store in S3
envault encrypt INPUT_PATH [--tag KEY=VALUE]... [--force]
# Decrypt by filename or SHA256 hash
envault decrypt IDENTIFIER [-o OUTPUT_DIR] [--version N]
# List all encrypted/decrypted files
envault status [--state encrypted|decrypted|all]
# Show state for a specific file
envault status --file SHA256
# View audit events
envault audit [--since YYYY-MM-DD] [--file SHA256]
# Summary dashboard
envault dashboard
# Re-encrypt all files with a new KMS key
envault rotate-key --new-key-id alias/new-key [--dry-run]
# Migrate from legacy output.json (NDJSON format)
envault migrate FROM_PATH [--dry-run]
AWS infrastructure (CDK)
The infra/cdk/ directory contains a CDK Python stack that provisions:
- KMS CMK with automatic annual key rotation
- S3 bucket — versioned, SSE-KMS, block-public-access enforced
- DynamoDB table — on-demand billing, KMS encryption, PITR, all GSIs
- IAM managed policy — least-privilege, ready to attach to users/roles
cd infra/cdk
pip install -r requirements.txt
cdk synth
cdk deploy
Development
# Install with dev dependencies
python -m venv .venv
source .venv/bin/activate
PIP_USER=false pip install -e ".[dev]"
# Run unit tests (no AWS credentials required)
pytest tests/unit/ -v
# Lint and type check
ruff check src/ tests/
mypy src/envault/
Security
- KMS alias only in config — ARN is never stored or committed
detect-secretspre-commit hook prevents credential leaks- SHA256 checksum verified before encrypt and after decrypt
- DynamoDB events are append-only (never updated)
- S3 bucket policy enforces SSE-KMS on all objects
License
Apache 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file envault_cli-0.1.2.tar.gz.
File metadata
- Download URL: envault_cli-0.1.2.tar.gz
- Upload date:
- Size: 79.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
558396a701584947746ff3ec39e58a88d055aa24c3eb7ee8d0699d49bcf145f7
|
|
| MD5 |
f9c5634f402fef6bad294a4a4e4cd46c
|
|
| BLAKE2b-256 |
f8574599bc622c2f3cb81b0f5138d270d95d75c05f14f42f08500e5e42cea3ba
|
Provenance
The following attestation bundles were made for envault_cli-0.1.2.tar.gz:
Publisher:
publish.yml on Specter099/envault-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
envault_cli-0.1.2.tar.gz -
Subject digest:
558396a701584947746ff3ec39e58a88d055aa24c3eb7ee8d0699d49bcf145f7 - Sigstore transparency entry: 1033155610
- Sigstore integration time:
-
Permalink:
Specter099/envault-cli@e5183424647f51f524885aa4b6877eef0a093ac1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Specter099
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e5183424647f51f524885aa4b6877eef0a093ac1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file envault_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: envault_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
268d3a2406dcea98570a8e7ad06cfdcfb93d4a8c6b6bd1c9c53ec385ab1e6162
|
|
| MD5 |
94878bce6e94cc33cd3595b0fd35044c
|
|
| BLAKE2b-256 |
43b125b93ead25c5ab893cf047397211d7d560e8a1661d05dd60d5ae1830eac4
|
Provenance
The following attestation bundles were made for envault_cli-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Specter099/envault-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
envault_cli-0.1.2-py3-none-any.whl -
Subject digest:
268d3a2406dcea98570a8e7ad06cfdcfb93d4a8c6b6bd1c9c53ec385ab1e6162 - Sigstore transparency entry: 1033155675
- Sigstore integration time:
-
Permalink:
Specter099/envault-cli@e5183424647f51f524885aa4b6877eef0a093ac1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Specter099
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e5183424647f51f524885aa4b6877eef0a093ac1 -
Trigger Event:
push
-
Statement type: