π₯ Burn-After-Read Technology
Automatically destroy secrets after they've been accessed, ensuring sensitive data can only be viewed once and is permanently deleted from all systems.
What is Burn-After-Read?
Burn-after-read is a security feature that automatically and permanently deletes secrets once they've been accessed the specified number of times. This ensures that sensitive data has a limited lifespan and cannot be accessed indefinitely.
Key Features
- β’ Automatic deletion after viewing
- β’ Configurable view limits (1-10 views)
- β’ Time-based expiration backup
- β’ Atomic database operations
- β’ Anti-link-preview protection
- β’ True data destruction
Why Use Burn-After-Read?
How Burn-After-Read Works
The Burning Process
Secret Created
Secret stored with view counter (default: 1 view)
Access Request
User clicks "Reveal Secret" button
Atomic Update
Database decrements counter and returns data
Auto-Deletion
When counter reaches 0, secret is permanently deleted
Database Transaction Details
SafeMonk uses PostgreSQL's atomic transactions to ensure burn-after-read operations are safe even under high concurrency and system failures.
SET views_remaining = views_remaining - 1,
Β Β Β Β last_accessed = NOW()
WHERE id = $1 AND views_remaining > 0
RETURNING encrypted_data, views_remaining;
Anti-Link-Preview Protection
The Problem
Many messaging apps and social platforms automatically fetch link previews, which could accidentally "burn" a secret before the intended recipient sees it.
β οΈ Vulnerable Platforms
- β’ WhatsApp link previews
- β’ Slack unfurling
- β’ Discord embeds
- β’ Twitter/X cards
- β’ Facebook previews
- β’ Email client previews
- β’ Security scanners
SafeMonk's Solution
We use a "safe reveal" mechanism that requires explicit human interaction to trigger the burn-after-read process.
β Safe Landing Page
Initial page load shows only metadata, not the secret
β User Action Required
Must click "Reveal Secret" button to trigger fetch
β Bot Protection
Automated systems cannot trigger the reveal mechanism
Deletion Triggers
View-Based Deletion
The primary deletion mechanism. Secrets are destroyed once they've been viewed the specified number of times (1-10 views, default is 1).
Time-Based Deletion
Backup deletion mechanism. Secrets are automatically deleted after their expiration time, regardless of view count. Acts as a safety net.
Manual Deletion
Secret creators can access a deletion link to manually destroy secrets before they've been viewed or expired.
Technical Implementation
Race Condition Prevention
High-traffic scenarios could cause race conditions where multiple users simultaneously access a secret. SafeMonk prevents this with database locks.
Database Schema
Each secret includes metadata that controls the burn-after-read behavior.
encrypted_data: BYTEA
views_remaining: INTEGER
expires_at: TIMESTAMP
created_at: TIMESTAMP
last_accessed: TIMESTAMP
deletion_token: UUID
expires_at: Automatic cleanup timestamp
File Burn-After-Read
Multi-Layer Cleanup
File secrets require cleanup of both database records and storage objects. SafeMonk ensures complete deletion across all systems.
Chunked File Handling
Large files (>100MB) are split into encrypted chunks. All chunks must be deleted when the secret burns.
Cleanup Process
- 1. Mark secret as burned in database
- 2. Queue chunk deletion job
- 3. Delete each encrypted chunk
- 4. Remove database references
- 5. Log successful cleanup
Security Benefits
Limited Lifespan
Secrets exist only as long as needed, reducing the window for potential attacks or exposure.
Data Minimization
Automatic deletion ensures only necessary data is retained, supporting privacy regulations and best practices.
Breach Mitigation
Less data stored means smaller impact from potential security breaches or system compromises.
Burn-After-Read Best Practices
When to Use 1 View
- β
Highly Sensitive SecretsPasswords, API keys, personal information
- β
One-Time Passwords2FA codes, temporary access tokens
- β
Legal DocumentsContracts, agreements, sensitive PDFs
When to Use Multiple Views
- πΌTeam SecretsShared passwords, team API keys (2-5 views)
- πReference InformationConfiguration, non-critical data (5-10 views)
- πBackup AccessAllow for mistakes or multiple downloads (3-5 views)
β οΈ Important Reminder
Once a secret is burned (deleted), it cannot be recovered by anyone - not even SafeMonk. Make sure the recipient has successfully accessed the secret before the burn limit is reached.
Related Technologies
Burn-after-read works alongside other security technologies to provide comprehensive protection.