Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Architecture Leadership
Lesson 19 of 32

Privacy and compliance

Translate GDPR, PCI DSS, SOC 2 and data residency rules into concrete architectural constraints.

18 min read

Compliance is a set of requirements

Regulations and certifications sound like legal problems, but most land as architectural requirements: where data may be stored, who may access it, how long it is kept and what must be logged. Bring compliance in at the requirements stage. Retrofitting data residency or deletion into a system designed without them can take a year; designing them in takes weeks. Work with your legal and security teams to turn each obligation into a testable requirement. Keep a mapping from each control to the code, pipeline or policy that implements it, so audits become a query rather than a scramble.

GDPR and privacy by design

The EU's GDPR (and similar laws such as the UK GDPR and California's CCPA) give individuals rights over their personal data and require privacy by design. Architecturally, that means:

  • Data minimisation: collect only what the purpose requires
  • A data inventory: know every store that holds personal data
  • Right of access and erasure: one workflow that finds and exports or deletes a user's data across all services, typically within 30 days
  • Retention limits enforced automatically, not by memory
  • Pseudonymisation for analytics; separate identifiers from behaviour data
  • Breach notification to regulators within 72 hours, which needs good audit logs

PCI DSS and scope reduction

If you store, process or transmit card numbers, PCI DSS applies to every system in that path, plus everything connected to it. The cheapest compliance strategy is scope reduction: never let raw card numbers touch your servers. Use the payment provider's hosted fields or redirect so the browser sends card data directly to the provider and you receive only a token. That can shrink your assessment from hundreds of requirements to a short self-assessment questionnaire. Tokenisation also limits the damage of any breach, because tokens are useless outside your account with the provider.

SOC 2 and data residency

SOC 2 is an audit of your controls against trust criteria (security, availability, confidentiality and others). A Type II report covers how controls operated over 6-12 months, so you need evidence: access reviews, change approvals, encrypted backups, incident records. Automate evidence collection from your pipelines and cloud accounts. Data residency rules require some customers' data to stay in a region such as the EU; design with a region-aware tenant directory and separate regional stacks, and watch for leaks through logs, backups, analytics and third-party processors.

Key takeaways

  • Treat regulations as architectural requirements and capture them early.
  • GDPR needs a data inventory, minimisation, automated retention and a cross-service access and erasure workflow.
  • Reduce PCI scope by never letting raw card numbers reach your systems.
  • SOC 2 needs continuous evidence; data residency needs region-aware routing and watchfulness about logs and backups.

Sign in to track lessons and earn badges.

Secrets and key managementAudit and tamper evidence

Coming up

Course: 0/32 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 5/10Design a Secrets ManagerDesign secret storage with envelope encryption, rotation, caching clients and an audit trail of every access.Medium
  2. 6/10Design an Audit Log PipelineBuild a lossless, tamper-evident audit trail that stays searchable for seven years.
Medium
All 10 challenges →