Install
openclaw skills install secrets-vaultSecure sensitive data management with AES-256-GCM encryption. Store API keys, database credentials, passwords, and certificates.
openclaw skills install secrets-vaultSecure storage and management for sensitive data including API keys, database credentials, passwords, and certificates.
pip install cryptography
python ~/.secrets-vault/scripts/secrets_manager.py init
# Unlock vault
python ~/.secrets-vault/scripts/secrets_manager.py unlock
# Add secret interactively
python ~/.secrets-vault/scripts/secrets_manager.py add
# List all secrets
python ~/.secrets-vault/scripts/secrets_manager.py list
# Get secret details
python ~/.secrets-vault/scripts/secrets_manager.py get api.openai --show
# Lock vault
python ~/.secrets-vault/scripts/secrets_manager.py lock
Store different types of sensitive data:
API Keys / Tokens
python scripts/secrets_manager.py add api.openai \
--type api_key \
--key sk-xxxxxxxx \
--tags openai,gpt
Database Credentials
python scripts/secrets_manager.py add db.production \
--type database \
--host db.example.com \
--port 5432 \
--database myapp \
--username admin \
--password secret123
Username/Password
python scripts/secrets_manager.py add github \
--type password \
--username myuser \
--password mypassword
Automatically inject secrets as environment variables:
# Export as shell variables
python scripts/inject_env.py --shell
# Generate .env file
python scripts/inject_env.py --file .env
# Run command with injected secrets
python scripts/inject_env.py --run "python app.py"
# Filter specific secrets
python scripts/inject_env.py --names api.openai,database --shell
# Add prefix
python scripts/inject_env.py --prefix APP_ --shell
Output format:
export API_OPENAI_KEY="sk-xxxxxxxx"
export DATABASE_HOST="db.example.com"
export DATABASE_USERNAME="admin"
Create time-limited, encrypted share links:
# Create share from vault secret
python scripts/share.py share api.openai --hours 24 --views 1
# Get shared content
python scripts/share.py get abc123 --code ABCD1234
# List active shares
python scripts/share.py list
# Revoke share
python scripts/share.py revoke abc123
Share features:
Audit password security:
# Audit all passwords in vault
python scripts/audit.py vault
# Check single password
python scripts/audit.py check
# Generate strong password
python scripts/audit.py generate --length 24
Audit report includes:
The vault file is stored at ~/.secrets-vault/vault.enc and can be synced:
# Example: Move to iCloud
mv ~/.secrets-vault ~/Library/Mobile\ Documents/com~apple~CloudDocs/
ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/.secrets-vault ~/.secrets-vault
| Script | Purpose |
|---|---|
secrets_manager.py | Main vault management (init, add, get, list, delete) |
inject_env.py | Environment variable injection |
share.py | Secure sharing functionality |
audit.py | Password security auditing |
crypto_utils.py | Encryption utilities |
┌─────────────────────────────────────────────────────────┐
│ Master Password │
└─────────────────────┬───────────────────────────────────┘
│ PBKDF2-HMAC-SHA256 (600k iterations)
▼
┌─────────────────────────────────────────────────────────┐
│ Encryption Key (256-bit) │
└─────────────────────┬───────────────────────────────────┘
│ AES-256-GCM
▼
┌─────────────────────────────────────────────────────────┐
│ Encrypted Vault (vault.enc) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │API Keys │ │ DB Creds│ │Passwords│ │ Certs │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
└─────────────────────────────────────────────────────────┘
Key Security Features:
~/.secrets-vault/
├── vault.enc # Encrypted secrets storage
├── config.json # Vault configuration
└── shares/ # Active share metadata
For automated environments, use environment variables:
# Set master password (for scripts)
export SECRETS_VAULT_PASSWORD="your-master-password"
# Or use password file
export SECRETS_VAULT_PASSWORD_FILE="/secure/path/password"
# Then run without prompts
python scripts/inject_env.py --file .env
Security Note: Only use this in secure CI/CD environments. Never commit password files to version control.
audit.py vault monthly"Cryptography library not installed"
pip install cryptography
"Vault not found"
# Initialize first
python scripts/secrets_manager.py init
"Decryption failed"
Environment variables not injected