Privacy by Design and Default Questions
Embedding privacy into architecture and the development lifecycle: the privacy-by-design principles, privacy-protective defaults, and on-device or edge processing to minimize data exposure. Covers integrating privacy controls into product and program design and into engineering workflows rather than bolting them on. Includes designing privacy-first solutions and reference architectures.
Design a privacy-preserving machine learning pipeline for personalization: compare federated learning, central training with differential privacy, and on-device models with feature hashing. For each approach describe data collection, model update mechanism, validation, deployment, and how to demonstrate privacy compliance to an auditor.
You are tasked with leading a cross-functional program to integrate privacy controls into the CI/CD pipeline (e.g., automated checks for PII in commits, redaction in logs, policy gates on deployments). Propose a 6–12 month roadmap, required engineering and compliance resources, pilot plan, KPIs to measure success, and strategies to gain executive and engineering buy-in.
Write a Python function sanitize_input(s: str) -> str that removes leading/trailing whitespace, collapses internal multiple spaces into one, removes control characters, and allows only characters from a safe whitelist (letters, digits, space, - _ @ .). The function should run in O(n) time, avoid double-encoding, and handle Unicode normalization. Also explain where in a web service pipeline (client, API gateway, backend, or all) you would apply this sanitization and why. Include brief test cases you would run.
Explain the difference between symmetric and asymmetric encryption and provide three concrete product examples where each technique is appropriate (e.g., symmetric for data-at-rest, asymmetric for key exchange and signing). Briefly discuss secure key storage options (HSM/KMS, secrets manager) and why storing keys in code is dangerous.
Your product has users around the world including EU residents. Describe concrete design patterns to ensure GDPR compliance for data residency, lawful basis for processing, cross-border transfers, and efficient handling of data subject requests (SARs, deletion). Explain how to implement these patterns while minimizing user friction and operational overhead.
Unlock Full Question Bank
Get access to all 34 Privacy by Design and Default interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.