Privacy by design
Building privacy into the product from the start.
Privacy by design means collecting less, keeping it shorter, and defaulting to private. It is cheaper than retrofitting and builds trust. It also reduces what can leak.
Why it matters for a product engineer
Every piece of personal data a product keeps is a risk: it can leak, be misused, or be demanded by someone else. Privacy by design means making the private choice the default: collect less, keep it for less time, and limit who can see it. It is much cheaper to do at the start than to add later, because data models, logs and analytics all depend on it. It also builds trust, and it reduces what any breach can expose.
How to do it
- For each field you plan to collect, write down why you need it and for how long.
- Collect the minimum, and prefer data that does not identify a person.
- Set deletion by default: logs, backups and analytics expire.
- Encrypt sensitive data, and limit who and what can read it.
- Make the private option the default, and let users choose to share more.
Common mistakes
- Collecting data “in case it is useful later”.
- Logging full request bodies, with personal data in them, to debug one problem.
- Deleting data from the database but keeping it for years in backups and analytics.
- Asking legal to review privacy after the feature is built.
Example
Signal publishes the legal requests it receives for user data. In 2021, a grand jury subpoena from California asked for, among other things, users’ names, addresses and correspondence. Signal could not provide any of it, because its servers never had it: messages, contacts, groups and profiles are end-to-end encrypted. Its answer was the same as in 2016: the time each account was created and the date it last connected. The response to the subpoena had been decided years earlier, in the design.
What Signal could give a court in 2021
| Does Signal have it? | Handed over | |
|---|---|---|
| Messages, contacts, groups | No | Nothing |
| Profile name and avatar | No | Nothing |
| Account creation time | Yes | Yes |
| Last connection date | Yes | Yes |
Data that is never collected cannot be handed over, sold or leaked. For each account, Signal could give two dates.
ReportedSignal, government requests, 27 Apr 2021
Sources: Grand jury subpoena for Signal user data, Central District of California (Signal) ↗ · Government requests (Signal) ↗
In practice
Real productsResources
2- docsStart here
Principles of the GDPR ↗
European Commission · 12 minLawfulness, purpose limitation, minimisation and the other principles every feature that touches personal data must respect.
- docsGo deeper
Guidelines 4/2019 on data protection by design and by default ↗
European Data Protection Board · 2020The official reading of Article 25 with examples of collecting less, keeping less and defaulting to private.