GPG-backed lockbox for secrets management
Project description
GPMaster
A GPG-backed lockbox for secure secrets management with a custom binary format.
Features
- Custom Binary Format (.gpb): Efficient storage with unencrypted metadata for fast operations
- GPG Encryption & Signing: All secrets encrypted with GPG, with optional signature verification
- TOTP Support: Store and generate TOTP codes for two-factor authentication
- Interactive TOTP Viewer: Real-time TOTP code viewer with countdown timer
- Multiple Export Formats: Dump secrets as list, JSON, or POSIX shell variables
- Minimal Dependencies: Only requires
python-gnupgandpyotp - Environment Configuration: Customize default paths via environment variables
- Retry Logic: Smart retry for GPG operations when hardware tokens are unreliable
- Quiet Mode: Minimal output for scripting
Installation
Arch Linux
makepkg -si
Debian/Ubuntu
dpkg-buildpackage -b -uc -us
sudo dpkg -i ../gpmaster_1.0.0-1_all.deb
From Source
pip install .
Quick Start
Create a Lockbox
# Create a new lockbox with your GPG key
gpmaster create YOUR_GPG_KEY_ID
# Or set default key and auto-create on first use
export GPMASTER_KEY_ID=YOUR_GPG_KEY_ID
gpmaster add mypassword --key-id YOUR_GPG_KEY_ID
Add Secrets
# Add a regular secret
gpmaster add github_token
# Enter secret: [type your secret]
# Add a TOTP secret
gpmaster add google_2fa --totp
# Enter secret: [paste your TOTP base32 secret]
Retrieve Secrets
# Get a secret
gpmaster get github_token
# Generate TOTP code
gpmaster get google_2fa --totp-code
# Monitor a TOTP code
gpmaster get -i google_2fa --totp-code
Dump Secrets
# Dump all secrets in list format
gpmaster dump
# Dump as JSON
gpmaster dump --format json
# Dump as POSIX shell variables (for eval)
gpmaster dump --format sh
Show Lockbox Info
# List all secrets and verify note signature
gpmaster info
Other Operations
# Rename a secret
gpmaster rename old_name new_name
# Delete a secret
gpmaster delete secret_name
# Edit notes document (opens $EDITOR and signs)
gpmaster note
# Validate lockbox integrity
gpmaster validate
# Change encryption key
gpmaster rekey NEW_KEY_ID
Environment Variables
GPMASTER_LOCKBOX_PATH: Default lockbox file path (default:~/.local/state/gpmaster.gpb)GPMASTER_KEY_ID: Default GPG key ID for auto-creating lockboxesGPMASTER_QUIET: Enable quiet mode globally
Command Reference
Global Options
-l, --lockbox PATH: Specify lockbox file path-q, --quiet: Minimal output mode
Commands
create KEY_ID: Create a new lockboxadd NAME [--totp] [--key-id KEY]: Add a secretget NAME [--totp-code] [-i]: Retrieve a secretrename OLD NEW: Rename a secretdelete NAME: Delete a secretinfo: Show lockbox info and verify note signaturenote: Edit notes document with $EDITOR (signed)validate: Validate lockbox integrity and signaturerekey NEW_KEY_ID: Change encryption keydump [--format {list,json,sh}]: Dump all secrets in various formats
Binary Format
The .gpb lockbox format contains:
- Magic header: "GPMASTER"
- Version number
- GPG key ID (unencrypted)
- Metadata JSON with titles and note content (unencrypted)
- Signature (optional)
- Note signature (for signed note content)
- SHA256 checksum for integrity
- Encrypted secrets data
This design allows listing contents and viewing metadata without decryption.
Security Considerations
- The lockbox format stores secret titles and note content unencrypted
- Note content is signed by the lockbox owner to ensure authenticity
- Secret values are always encrypted with GPG
- Signatures are verified on every access when present
- Checksums prevent corruption and tampering
- Always validate your lockbox with
gpmaster validate
Dependencies
- Python 3.8+
- python-gnupg
- pyotp
- GnuPG
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
gpmaster-1.1.1.tar.gz
(36.9 kB
view details)
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
gpmaster-1.1.1-py3-none-any.whl
(23.5 kB
view details)
File details
Details for the file gpmaster-1.1.1.tar.gz.
File metadata
- Download URL: gpmaster-1.1.1.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed99592897dd73f86ee251d47aaad3ae1304ebf3270bcabede8289ab6f6b2fa3
|
|
| MD5 |
0832b34f6f07fead783baea079e2a38e
|
|
| BLAKE2b-256 |
8ca457531704fa922882c4eecb3b7f7ccc34e8ea3ba650b886080841fd6c0488
|
File details
Details for the file gpmaster-1.1.1-py3-none-any.whl.
File metadata
- Download URL: gpmaster-1.1.1-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b6fc3b82c1c99281643481673e3dd08c94ce670910e5ff9c1e9f681b37078f1
|
|
| MD5 |
4106d1b438a36541bcf1f85b85c8fd60
|
|
| BLAKE2b-256 |
89714aebdc9e0b7af583d90407747d378c385fd8b314d0e86a4560a487718be5
|