Lesson 12 of 13 · 14m
Deletion That Actually Deletes
Soft delete is a visibility flag; real erasure means purge jobs, bounded backups, crypto shredding, and vendor cascade.
Parler's deleted posts
In January 2021, a scraper pulled roughly 70TB out of Parler in days — including posts users had deleted. Parler's deletion was a visibility flag: mark the post invisible, keep the row, keep serving the media through public endpoints. Sequential post IDs meant the entire corpus could be enumerated, and the "deleted" content came down with it — along with the driver's-license photos users had uploaded for "verified citizen" status.
Ashley Madison ran the same failure as a paid feature: $19 for a "full delete" that deleted nothing. When the breach dumped everything in August 2015, the paid deletions were visible in the data.
A soft delete is a visibility control. GDPR Article 17's right to erasure is about the data existing, not about whether anyone can see it.
Enumerate the copies
A real deletion request propagates to every place the data replicated: the primary rows, replicas, caches, search indexes, analytics events, the warehouse, backups, support tickets, vendor systems. If you can't enumerate the copies, you can't delete them — which is itself a finding.
Backups. Restoring a 30-day-old backup restores the erased user. Two defensible answers:
- Bounded window + restore-time purge. Keep backups ≤30 days; document that re-exposure decays to zero, and run a post-restore purge job that re-applies pending erasures to any restored data. Regulators accept bounded residual copies that decay on a clock — the failure is keeping them forever or letting a restore resurrect them permanently.
- Crypto shredding. Encrypt each subject's data with a per-subject data-encryption key wrapped by a KEK. Erasure destroys the DEK: every ciphertext becomes unreadable everywhere it exists — tables, backups, logs, lakes — without enumerating copies. It's the same trick as iOS effaceable storage destroying keys on wipe, and NIST SP 800-88 recognizes cryptographic erase as a sanitization method. The cost: key management is now on your critical path, and the DEK store becomes the erasure plane — which is exactly what you want.
Event-sourced and append-only systems are the sharp case. An immutable event log cannot delete an event; the answer is per-subject keys again — encrypt the payloads keyed by subject, and erasure shreds the key so the history becomes ciphertext noise. If you designed the log without that layer, erasure means rebuilding the stream — which is why the crypto-shred design belongs in the architecture review, not the incident review.
Vendor cascade. Erasure must reach your subprocessors: the email provider's list, the support desk, the warehouse sync. CCPA and GDPR both expect propagation. The practical version is a deletion pipeline with per-vendor hooks and an audit table — subject → sinks → status — not a hope that support remembers.
Exceptions, honestly
Article 17(3) keeps data for legal claims, legal obligations, public interest, and free expression. Tax records under a seven-year statute don't get deleted; they get tombstoned — locked behind access control, excluded from operational queries, retained for the obligated window only. The exception narrows the use, not just the deletion.
Prove it with a fixture
The deletion test is an end-to-end pipeline test: create zzz-delete-canary@example.com, run the account through signup/analytics/support flows, submit the erasure request, then grep every sink — database, restored backup, warehouse, analytics console, Sentry, support desk — for the canary. Every hit is an unpropagated copy. Run it quarterly; the sink list drifts.
The practice
- Hard-delete or crypto-shred on erasure; a
deleted_atflag is not erasure. - Bound backup windows; purge on restore.
- Propagate deletions to subprocessors and log the propagation.
- Tombstone statutory exceptions behind access control with their own TTL.
Parler shipped soft-delete and learned what it meant in a scrape. Ship the pipeline test instead — you'll learn it on a Tuesday in CI.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Healthcare Ransomware: Why Hospitals Can't Patch Fast Enough
The criminals behind the attack claim to have shared 400GB of patient data. The NHS stated it is working swiftly to confirm the validity of these files. The ransomware attack on the UK's National Health Service (NHS) continues to disrupt health services in London, with a significant amount of…
RSA Is Simple. Deploying RSA Correctly Almost Never Is.
The capstone to our RSA series. The math checks out. Shipping it as written gets you breached. This is the nineteen-year-old attack that proves it, and what belongs in production instead.
RSA in JavaScript Part 2: The JWT Is Where You'll Actually Meet It
Most JavaScript developers never call an RSA function directly. They verify an RS256 token, and two classic attacks turn that into an authentication bypass — both demonstrated here, both fixed by one line.