Privacy by Design and Default Questions
Designing privacy into products, architectures and the software development lifecycle instead of bolting it on afterward. Covers the privacy-by-design principles and privacy-protective defaults, data minimization and purpose limitation at design time, personal-data flow mapping and PII inventory for a feature, consent and preference design including consent storage, enforcement across web and mobile and region-specific consent flows, retention and deletion design including legal holds, deletion across backups and immutable logs, provable deletion, and data-subject access, export and erasure flows, PII-safe logging, telemetry and session replay, on-device processing to limit data exposure, privacy-versus-personalization trade-offs, privacy in ML training data, feature stores and erasure from trained models, and privacy review gates, checklists, CI/CD checks, release readiness and requirements traceability inside engineering workflows. Includes designing privacy-first features, reference architectures, remediating privacy design flaws and rollout programs across product teams, and working with product, legal and security partners. Cryptographic and statistical privacy techniques, formal impact assessments, data-protection law, cross-border transfer rules, vendor risk, and encryption or access-control mechanics are covered elsewhere.
Your teams ship features that handle personal data, and privacy review happens only just before launch. Where would you add privacy checkpoints across the lifecycle, and what does each one require and automate?
Sample Answer
Direct answer
Move privacy from a single late review to a short checkpoint at each stage, each with a defined input, a decision, an owner and as much automation as is safe. The aim is that the final pre-launch step confirms what was decided earlier and finds nothing new. Humans decide judgement calls (is this purpose acceptable?); automation checks facts (is the field classified, is the retention set, is the scan clean?).
Checkpoints across the lifecycle
| Stage | Requires | Automated | Human decision (owner) |
|---|---|---|---|
| 1. Idea or intake | A short form with five questions: what personal data, whose, why, where it flows, who else receives it | Form triggers criteria: sensitive categories, children, location, profiling, new third party, large scale | Triage by privacy reviewer: light, standard or deep review (product owner submits) |
| 2. Design | Data-flow diagram (a drawing of where personal data enters, moves and is stored), data classification (labelling each field as public, personal or sensitive), retention, lawful purpose (the legal reason for using the data), threat model (a structured list of how things could go wrong, with privacy harms such as unwanted tracking added) | Template completeness check; classification tags required on new schema fields | Architect and privacy reviewer approve design or ask changes |
| 3. Build | Story-level checklist (minimization, consent check, deletion hook, safe logging, a deletion test) in each story's definition of done (the team's agreed checklist that must be true before work counts as finished) | Lint and CI rules: no raw logging of identifiers, schema fields must carry a data class | Engineers self-attest (confirm in writing that they did the check); code reviewer checks |
| 4. Pre-launch verification | Evidence: test that defaults are as designed, deletion works, consent is honoured, data inventory updated | Scans for PII in logs and test data; dependency and SDK checks for unexpected data flows | Approver signs the evidence (engineering manager, privacy reviewer for deep reviews) |
| 5. Release and operate | Monitoring for new fields and new data flows; retention jobs running | Alerts on schema changes without classification; deletion job failures | Owner responds; periodic review on a set cadence |
When a formal impact assessment is needed
Use trigger criteria at stage 1, such as new sensitive data, precise location, children's data, large-scale profiling, automated decisions with significant effect or a new vendor receiving personal data. Automated risk scoring can add a simple points total from those answers and send high scores to the formal assessment. Illustrative scheme: sensitive category 3, children 3, profiling or automated decisions 3, precise location 2, new vendor receiving personal data 2, large scale (for example over 100,000 people) 2; a total of 5 or more, or any single 3-point item, means a formal assessment. A feature with precise location plus a new vendor scores 2 + 2 = 4 and gets a standard review; add large scale and it scores 6 and goes to the formal assessment. The formal data protection impact assessment (DPIA, a written risk assessment of a processing activity, listing the risks to people and how each is reduced) is its own process; here the checkpoint only decides that one is required.
Acceptable evidence at launch
A passing automated test (not a statement), a screenshot of default settings, a link to the retention job and its last successful run, and an updated record of what data the feature handles. "We reviewed it" without an artifact is not evidence.
Story checklist, owners and records
A sample story-level checklist: (1) every new field has a purpose and a data class; (2) retention is set and the delete job exists; (3) the consent check is called before use; (4) logs contain no raw identifiers; (5) a deletion test passes.
Name owners: product owner for the intake form, privacy reviewer for judgement calls, engineering manager for evidence. Record required documents per stage, and keep approvals in the same tracker as the work so they are auditable.
Embedding in agile
Run a short privacy threat-modelling session when a feature is designed (and again on major design changes), not every sprint. Put a few checklist lines in the story template, and review the checklist outcomes at sprint review.
Example: an ML dataset
A team wants to train a model on support chats. At intake the reviewer is triggered by free-text personal data. At design, the dataset gets an approved purpose, a redaction step and a retention limit. Dataset approval is human, because deciding that a purpose is acceptable is a judgement call. The automated parts are scanning for emails and phone numbers, recording the dataset version, and blocking training jobs that read an unapproved dataset. At launch the evidence is the scan report and the approval record.
Pitfall
Gates that block every team equally create queues and workarounds. Scale the review to the risk so low-risk changes pass in minutes and only the high-risk ones wait for people.
You support several product lines and want automated lifecycle management: how is data tagged with a retention class, who owns the tags, and how are archival and deletion enforced and evidenced across systems?
Sample Answer
Direct answer. Make retention a property of the data, not of each team's memory. Every dataset and field carries a retention class (a named rule such as "support tickets: 3 years"), set by an owner, enforced by platform automation such as storage lifecycle rules and scheduled deletion jobs, and proven by logs. Automation catches drift (new fields with no class) before it becomes a risk.
Tagging. A central catalogue stores the retention class per dataset, table and column. Tags are applied at creation by schema review (a new field cannot merge without a class) and carried by metadata on tables, buckets and topics. A small set of classes (for example transient 30 days, operational 1 year, financial 7 years, legal-hold-eligible) keeps it manageable; teams cannot invent classes.
Ownership. The data owner (a named person in the product line, not the platform team) chooses the class with input from legal and privacy. The platform team owns the enforcement mechanism. Privacy owns the class catalogue. A tag without an owner fails the check, and tags are reviewed annually.
Enforcement.
- Object storage: bucket lifecycle rules (storage settings such as "under prefix logs/, move to cheaper archive storage after 90 days and delete after 365") applied by prefix or tag transition data to the archive tier (cheap, slow storage for rarely read data) and then expire it.
- Warehouse and databases: time-partitioned tables (a table split into chunks by date, such as one chunk per day), so expiry drops a whole partition (one chunk) rather than deleting rows one by one (cheap and quick); row-level deletes for per-user records, in batches. A partition drop cannot spare individual rows, so before dropping a partition the job checks it against the hold registry: a partition that contains held rows is not dropped; the held rows are copied to the restricted hold store (or the partition is kept) and the rest is deleted by row.
- Soft-delete window: expired records are hidden first, then hard-deleted after a short window (for example 30 days) so mistakes are recoverable.
- Legal holds: a hold registry (a table of active legal holds, meaning lawyer-ordered instructions to keep specific records) is consulted at deletion time: delete only if expired and not held. Held data is retained in restricted storage and reviewed regularly.
- Scale: at 100 million users, a delete rate of 2,000 rows per second would take about 13.9 hours for a full table pass, so run in rate-limited, resumable batches off peak and prefer partition drops. These numbers are illustrative.
Detecting new personal-data fields (nightly job). A scheduled scan compares the live schemas and sampled column contents against the catalogue. It flags columns that look like personal data (by name patterns and value detectors, meaning checks on what the data looks like, such as an email-shaped string, rather than on the column name) and have no retention class, then opens a ticket for the table owner and notifies a channel; after a deadline it escalates to the owner's manager, and a rules engine (an automated policy check in the deployment pipeline) can block deployments for unclassified personal-data columns. Detectors produce false positives and misses, so a person confirms.
Evidence. Each run writes: dataset, class, cutoff date, records and partitions deleted, holds excluded, and a verification query result. Logs are retained for the audit period and hold counts and IDs, not content. A dashboard shows data older than its class, which should be zero.
Worked example. A new table chat_attachments appears with a user email column and no class. The nightly scan flags it; the owner picks "operational 1 year"; lifecycle rules apply; the next partition drop deletes data older than 365 days, logged. The catalogue row after classification:
| Dataset | Column | Class | Owner | Reviewed |
|---|---|---|---|---|
warehouse.chat_attachments | user_email | operational (1 year) | Messaging product lead | 2026-10-01 |
Trade-offs. Strict automation can delete something needed; the soft-delete window, holds, and shadow-mode dry runs (running the deletion job in report-only mode first) reduce that. Backups still hold data until their own retention ends.
Translate the GDPR right-to-erasure into product acceptance criteria for a ‘delete account’ flow. Include edge cases: accounts with active subscriptions, backup copies, analytics events, and logs. State SLA expectations and verification steps.
Sample Answer
Short answer. The law says erase without undue delay (no fixed number of days; any delay must be justifiable,) and tell the person what was done within one month of receipt of the request (extendable by two further months for complex cases, GDPR Art. 12(3)), unless an exception applies (Art. 17(3), for example legal obligations and legal claims). Product turns that into testable criteria in Given/When/Then form: Given a starting state, When the user or system acts, Then a result you can observe happens. For example: Given a deletion confirmed on 2026-03-02 and not cancelled by 2026-03-16, When 2026-03-23 arrives, Then a query for that user id in the primary database returns zero rows. Here the controller is the organisation that decides why and how the data is used, and a processor is a vendor that handles it on the controller's behalf.
Acceptance criteria
- Identity and confirmation. Given a logged-in user, when they choose Delete account, then they re-authenticate and see what will be deleted, what is kept and why, and the timeline.
- Immediate effect. When confirmed, the account is locked at once, hidden from other users, and marketing sends stop.
- Undo window. The user may cancel within 14 days. After that, deletion is final. The window counts toward the legal month, so it stays short.
- Purge SLA (internal targets). Primary data deleted by day 21 (14 plus 7). Downstream systems and processors (service providers) confirm by day 28. Both finish inside one month of the request, leaving a few days of buffer (three days for a 2 March request, but none for a request made on 2 February, whose month ends on 2 March, so keep the targets at or below day 28).
- Active subscription. Deletion cancels future billing first and shows the effect on the current paid period. Invoices and payment records needed for tax or accounting are kept, detached from profile data where possible, and the user is told.
- Backups. Backups are not edited. They expire within 35 days of the primary delete, which is later than the month (day 21 plus 35 is day 56), so the confirmation must say so. A restore must reapply the deletion list before serving data. This is stated in the user-facing notice. Counsel decides if that is acceptable in your market.
- Analytics events. User-level events are deleted or irreversibly de-identified (identifiers removed so the rows can no longer be linked back to the person). Aggregates already computed from many users may remain.
- Logs. Logs holding the user id expire on their normal retention, which the policy states as a number (for example 30 days, illustrative), and QA checks that no log older than that holds the id. New logs after deletion must not carry the old id.
- Third parties. Each processor gets a delete call, and the system records the acknowledgement (GDPR Art. 19 asks controllers to tell recipients, meaning the third parties the data was disclosed to, about erasure unless impossible or disproportionate).
- Confirmation. The user gets a final email, sent to the address on file and not kept afterwards for any other purpose, saying deletion is complete from the live service, with the backup expiry date stated.
Verification steps (QA)
- Seed a test account with data in every store: database, search index, cache, analytics, support tool, billing sandbox.
- Run the flow, then check each store at the SLA times above: zero rows for that id.
- Check a re-signup with the same email creates an empty account.
- Check the audit record exists and contains no personal data.
Edge cases to test: deletion requested while a refund is pending; a user with shared content (comments others replied to: anonymize author, keep thread); a minor account; duplicate requests.
A team is starting discovery on a payment feature that collects billing addresses. What privacy questions do you want answered before design starts, and who needs to be in the room?
Sample Answer
Direct answer
Before design starts I want the following answered: why we collect a billing address at all, what exactly we collect, where it goes and who can see it, how long we keep it, and what the user can do with it. The people in the room are the product manager, the engineer who will build it, a security or privacy reviewer, someone from the payments or finance side, a support lead (who will need access in practice), and (if the answers raise risk) legal. Asking early keeps the cheapest design option, which is collecting less.
Questions to answer
- Purpose and necessity. Why do we need the billing address? Common real reasons: the card network's address check (address verification: the card issuer compares the street number and postal code you typed with the address it holds for the card, to catch stolen cards), tax calculation, invoices. Does the payment provider already collect it, so we do not need to store a copy?
- Minimization (collect only what the purpose needs). Do we need the full address or only postal code and country? Do we need it on every purchase, or only for some regions?
- Data flow. Does the address go to our servers or straight to the payment provider (hosted fields: input boxes served by the provider and shown inside our page, so the typed value goes to the provider and never touches our servers)? Which services, logs and analytics tools would see it?
- Storage and retention. Where is it stored, for how long, and why that long (tax or accounting rules can set a minimum, which counsel or finance confirms)? What is deleted when a user closes their account?
- Access. Who can view it (support, finance, engineers), and is access logged?
- User rights. How will a user see, correct and delete it, and how does a deletion request reach every copy?
- Third parties. Which provider receives it and what do we know about their handling?
- Shared with other uses. Will marketing or analytics ever use it? If so, that is a separate purpose needing its own decision.
Who needs to be in the room
| Person | Why |
|---|---|
| Product manager | Owns the purpose and what the feature really needs |
| Engineer or tech lead | Knows where data will flow and be logged |
| Security or privacy reviewer | Raises risks and checks minimization |
| Payments or finance owner | Knows tax, invoice and fraud-check requirements |
| Support lead | Knows who will need access in practice |
| Legal or counsel | Joins when retention, cross-border (data stored or processed in a different country from the customer's) or unusual uses come up |
Worked example
Team says "we need the full address". Questions reveal the fraud check needs only street number and postal code, tax needs country and postal code (in many places the rate depends on where the buyer is, and finance confirms what each jurisdiction needs), and invoices are generated by the payment provider. Result: collect through the provider's hosted form (the provider's own input form embedded in our page), store only country and postal code (tax record) with a defined retention, and keep the full address out of our database and logs.
Handling unknowns
Purpose and minimization decide the design, and unknowns (such as retention minimums) get an owner and a date.
Product requests broad new data collection for analytics; privacy and engineering caution against it. Design a principled evaluation framework to score incoming data-collection requests by business value, privacy risk, engineering cost, and user trust, and describe governance to approve or deny requests.
Sample Answer
Direct answer. Treat every collection request as a small proposal that must name its purpose, the exact fields, a retention period and an owner. Score it on four dimensions with a published rubric, apply a hard veto when privacy risk is high, and route the decision by score band so most requests are approved fast and only the contested ones reach a senior forum.
Intake (the request form). No request is scored without: the business question it answers ("which step of onboarding loses users?"), fields and granularity, whether it is linked to an identified user, retention, who sees it, and a lower-cost alternative the requester considered (aggregate, sample, on-device, shorter retention). Data minimization means collecting only what the stated purpose needs; purpose limitation means using it only for that stated purpose.
Scoring rubric. Each dimension is 1 to 5 where 5 is good for the company and the user: business value (5 = decision-changing, measurable), privacy risk (5 = low: aggregate or non-identifying; 1 = precise location, contacts, sensitive categories), engineering cost (5 = cheap), user trust impact (5 = users would expect it and see the benefit; 1 = they would feel surveilled). Weights (illustrative, set by the governance body): value 0.35, privacy 0.30, cost 0.15, trust 0.20.
score = 0.35*value + 0.30*privacy + 0.15*cost + 0.20*trust
Decision rules: approve at 3.5 or higher; send to redesign between 2.5 and 3.5; deny below 2.5. Veto: any privacy score of 2 or lower cannot be approved as submitted, whatever the total.
| Request | Value | Privacy | Cost | Trust | Score | Outcome |
|---|---|---|---|---|---|---|
| Page-view funnel events | 4 | 4 | 5 | 5 | 4.35 | Approve |
| Year of birth for age gate | 3 | 4 | 5 | 4 | 3.80 | Approve |
| Contacts upload for suggestions | 4 | 2 | 3 | 2 | 2.85 | Redesign (score band; veto also applies) |
| Precise location for ad targeting | 5 | 2 | 5 | 4 | 3.90 | Redesign (veto overrides an approving score) |
| Continuous exact GPS trail | 3 | 1 | 2 | 1 | 1.85 | Deny |
The location row shows why the veto exists: its total of 3.90 clears the 3.5 approval line (0.355 + 0.302 + 0.155 + 0.204), yet a privacy score of 2 blocks approval until the design changes, for example by coarsening location to city level and re-scoring. The contacts request is redesigned, for example hashing and matching on-device and discarding unmatched entries, then re-scored.
Governance. Tier 1 (score 3.5+, no veto): the data steward (the person accountable for a dataset's correct use) and the engineering lead approve within a fixed turnaround. Tier 2 (redesign or veto): a privacy review including the privacy lead and security; product can appeal. Tier 3 (sensitive categories, children, large scale, or denied but escalated): a cross-functional data council (a standing panel from legal, security, product and engineering) with a named executive tie-breaker, decision recorded with rationale. If the processing is likely high risk, a formal impact assessment is triggered (that is a separate process; counsel decides when it is legally required). Approved fields enter a data inventory with owner and retention, and an approval expires after 12 months unless renewed.
Pitfalls. Weighted scores hide risk, so the veto matters; scores can be gamed, so audit a sample of approved requests against what actually shipped; and a process slower than the business will be bypassed, so publish a turnaround target and measure it.
Unlock Full Question Bank
Get access to all 39 Privacy by Design and Default interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.