A highly secure secrets vault plugin for TiddlyWiki5 that uses the Web Crypto API and Shadow DOM for maximum security.
- AES-256-GCM encryption with authenticated encryption
- PBKDF2-SHA256 key derivation with 600,000 iterations (OWASP 2023)
- HMAC-SHA256 additional integrity verification
- Shadow DOM isolation for sensitive UI components
- Constant-time comparison to prevent timing attacks
- Rate limiting with lockout after failed attempts
- WikiText syntax:
Β§[secret:name]
to embed secrets - Click to reveal secrets in your tiddlers
- Copy button for quick copying when vault is unlocked
- Ctrl+Click (Cmd+Click on Mac) to copy without revealing
- Auto-hide secrets after configurable timeout (default 8 seconds)
- Auto-lock vault after inactivity (configurable, default 10 minutes)
- Editor toolbar integration for easy secret insertion
- Password visibility toggle for all password inputs
- Password change functionality without losing secrets
- Spaces allowed in secret names for better readability
- Automatically adapts to TiddlyWiki color palettes
- Works seamlessly with dark and light themes
- Responsive design for all screen sizes
- Drag and drop the plugin file to your TiddlyWiki
- Save and reload your wiki
- The plugin will be available immediately
- Go to Control Panel β Secrets Vault (or create a tiddler with
<$vault-manager/>
) - Set a strong master password (minimum 8 characters)
- Click "Initialize Vault"
- Unlock the vault with your master password
- Enter a name and value for your secret (spaces allowed in names)
- Use the eye button to toggle password visibility
- Click "Add Secret"
To reference a secret in your tiddlers:
Β§[secret:my-api-key]
Β§[secret:Database Password]
Β§[secret:GitHub Token]
This renders as a locked button:
- Click to reveal the secret
- Copy button appears when vault is unlocked
- Ctrl+Click (Cmd+Click on Mac) to copy directly to clipboard
- Secrets auto-hide after 8 seconds (configurable)
Use the π button in the editor toolbar to:
- Browse and insert existing secrets
- Access the vault manager
The vault manager provides:
- Password visibility toggle: Eye button on all password fields
- Secret management: View, Copy, and Delete buttons for each secret
- View button: Temporarily reveals secret value in place
- Copy button: Quick copy with visual feedback
- Auto-lock configuration: Set inactivity timeout
- Alphabetical sorting: Secrets listed by name
- Activity tracking: Auto-lock timer resets on any vault operation
- Algorithm: AES-256-GCM (Galois/Counter Mode)
- Key Derivation: PBKDF2-SHA256 with 600,000 iterations
- Salt: 256-bit cryptographically secure random
- IV: 128-bit random initialization vector per encryption
- Additional: HMAC-SHA256 for integrity verification
- Non-extractable keys: Crypto keys cannot be exported
- Memory clearing: Automatic sensitive data cleanup
- Input sanitization: Prevents injection attacks
- Replay protection: Timestamps in encrypted data
- Rate limiting: 5 attempts max, then 5-minute lockout
- Web Crypto API support (all modern browsers)
- Shadow DOM support (recommended, with fallback)
- Works in single-file wikis opened locally (
file://
protocol) - Also works on HTTPS sites and localhost
Configure how long secrets remain visible:
- Tiddler:
$:/config/SecretsVault/AutoHideTimeout
- Default: 8000 milliseconds (8 seconds)
Configure automatic vault locking after inactivity:
- Tiddler:
$:/config/SecretsVault/AutoLockTimeout
- Default: 10 minutes
- Set to 0 to disable auto-lock
- Configurable through vault manager UI
- Secrets stored in
$:/secrets/vault
tiddler fields - Field format:
secret-[name]
for encrypted data - Metadata:
secret-meta-[name]
for timestamps - Version tracking for future migrations
- Custom parser rule for
Β§[secret:name]
syntax - Generates secure widget for display
<$vault-manager/>
- Full vault management UI<$secret name="..."/>
- Display individual secret
plugins/BTC/secrets-vault/
βββ plugin.info # Plugin metadata
βββ readme.tid # TiddlyWiki documentation
βββ secrets-manager.js # Core encryption logic
βββ startup.js # Plugin initialization
βββ config/ # Configuration tiddlers
β βββ AutoHideTimeout.tid
β βββ AutoLockTimeout.tid
βββ parsers/
β βββ secretrule.js # WikiText parser
βββ widgets/
β βββ secret.js # Secret display widget
β βββ vault-manager.js # Management UI widget
β βββ action-vault.js # Action widget
βββ ui/ # UI components
βββ language/ # Translations
βββ styles.tid # CSS styles
This plugin follows standard TiddlyWiki plugin structure and can be built using TiddlyWiki's Node.js tools.
- β Chrome/Edge 79+
- β Firefox 69+
- β Safari 15+
- β Opera 66+
- β
Works with local files (
file://
) - β Works on HTTPS sites
- β Works on localhost
This plugin is part of TiddlyWiki5 and follows the same license terms.
- Author: Simon Huber
- Plugin Type: TiddlyWiki5 Plugin
- Version: 0.0.3
If you discover a security vulnerability, please report it to the TiddlyWiki security team.
For issues, questions, or contributions:
- Open an issue on GitHub
- Visit the TiddlyWiki community forums
- Check the TiddlyWiki documentation