PII controls: encryption, column masking, RBAC, audit trails for GDPR/CCPA.
system-designpiisecuritygovernancecompliance
Start here
The problem in plain words
An analyst is debugging a problem and pastes a screenshot of a table into a team chat. The table shows customer email addresses. The company's disks are encrypted, and it did not help at all, because the leak did not come from a stolen disk. It came from someone who could see more than they needed to, and a copy that escaped.
Personal data, called PII, needs a few simple habits: know where it is, keep fewer copies, let only the right people see the real values, record who looked, and be able to delete it when asked. Laws such as GDPR and CCPA give people those rights.
In a data platform the common pattern is to restrict the raw data tightly, replace sensitive values with tokens in the next layer, and show masked values in the layer most people use.
Words you will meet
PII
Personally identifiable information, such as names, emails, phone numbers and addresses.
GDPR and CCPA
Privacy laws that give people rights over their data, including the right to see it and have it deleted.
Encryption
Scrambling data so that only someone with the key can read it. TLS protects it in transit, and a key service (KMS) manages keys for data at rest.
Masking
Showing a hidden form of a value, such as a***@example.com, to people who do not need the real one.
Tokenization
Replacing a real value with a stand-in token. The real value is kept elsewhere, under tighter control.
RBAC and least privilege
Giving each role only the access it needs. Default deny means nothing is allowed until explicitly granted.
Audit trail
A record of who accessed what and when.
Break-glass access
Emergency access to restricted data, granted with a reason or ticket and logged.
Data minimization
Collecting and keeping only the personal data you really need.
Erasure
Deleting or anonymising a person's data everywhere on request.
Encrypted disks, and still a leak
Press Play to watch it move
Each arrow is one thing happening. Play it step by step, or read the list below.
1.Many people can query the raw table, so the analyst sees real emails they never needed.
2.A screenshot is pasted into a chat. The data is now outside every control the platform had.
The numbers, as things you can picture
Many consumers on a shared platformThe more people and tools touch the data, the more important it is to limit who sees real values.
What the interviewer wants
Design the technical and process controls for personal data across the lake and warehouse: classification, access, encryption, masking, audit and erasure.
Field inventory, retention overrides, ML needs. Out of scope: full legal opinion.
Scoring lens: Handle PII Data Securely
Interviewers reward incident-first teaching, a clear control loop, and named owners. Tool logos without that loop score poorly.
Weak vs strong answers on Handle PII Data Securely
Weak: list products. Strong: tell the failure story, define the mechanism, draw the path, state rollout and monitors.
Scope control
Say what is out of scope for v1. Come back only if follow-ups demand it. This is a seniority signal for Handle PII Data Securely.
Clarifying then committing
Ask a few high-use questions about SLAs, owners, and scale, then sketch. Endless questions without a diagram look evasive.
Tokenization service sketch
A small privileged service maps email to token. Silver stores tokens. Support UI resolves after break-glass. Analytics never needs raw email for ordinary joins.
Access review cadence
Quarterly remove stale restricted grants. Phished accounts with ancient grants are common breach paths. Schedule reviews like you schedule compaction.
Erasure residual risk
Backups and cold storage may retain PII until TTL. Document residual risk honestly with counsel. Overpromising global instant delete destroys trust later.
Interview framing detail 1
For lb-sd-28, spend the first minutes making the problem concrete: who gets hurt when this fails, what SLA is implied, and what is explicitly out of scope. Then teach the prerequisite concept before proposing boxes. A candidate who names vendors first usually loses the plot. Write two clarifying questions on the board and answer them with assumptions if the interviewer shrugs. Keep the first diagram small enough to redraw when a follow-up changes a constraint.