Lion Cipher Lab

Make deleted customer data unrecoverable everywhere with per-tenant keys (crypto-shredding, built and measured)

Why it matters

Every SaaS company eventually gets the email: a customer is leaving and wants their data deleted. Deleting rows from the live database is easy. The hard part is everything else: 35 days of nightly backups you are not allowed to edit, an analytics export someone copied into a data warehouse, log lines with customer emails in them, and the database file itself, which keeps deleted rows on disk until something overwrites them. In this lab you count those copies on your own machine: deleting acme's 40 rows leaves 234 readable copies behind. Then you build the design serious platforms use, a…

What you'll learn

Steps in this lab

  1. The problem, and the words you need
  2. Set up: a terminal, Python, and one package
  3. The code: a toy SaaS, a toy KMS, and a way to count readable copies
  4. Run it: what row deletion leaves behind
  5. Crypto-shred acme safely: two approvers, a waiting period, and a mistake caught in time
  6. Why it works: you only have to destroy the small thing
  7. Measure the five leaks crypto-shredding does NOT close
  8. What each fix costs (so you can choose, not just copy)
  9. Does this satisfy an erasure request? GDPR Article 17 and backups
  10. Operational risk: destroying the wrong key is forever
  11. Honest limits: when crypto-shredding is not enough

Open the full interactive lab →