We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Data Governance Compliance
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Data Governance Compliance
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
You call your bank. The agent says: "I see your account ending in 4589. Can you verify your identity?" They didn't read your full account number. They saw a masked version: XXXX-XXXX-XXXX-4589. Enough to confirm they're looking at the right account. Not enough to steal it.
This is data masking: replacing sensitive data with realistic but non-sensitive substitutes while preserving the data's format and usability. The masked data looks real, works for testing and development, and satisfies business needs, without exposing actual personal information.
Data masking is everywhere: the last 4 digits of a credit card on a receipt, starred-out passwords in password managers, redacted names in court documents, partial phone numbers in two-factor authentication prompts. In engineering, it's critical for three use cases: protecting production data displayed to support agents, creating safe test environments from production data, and sharing datasets with third parties who need realistic formats but not real values.
Salesforce masks 30+ field types dynamically based on user profile. Snowflake supports column-level dynamic masking policies that apply different rules per role, all transparent to the querying application.
| Technique | How It Works | Example | Reversibility |
|---|---|---|---|
| Substitution | Replace with a realistic fake value from a dictionary | "John Smith" to "James Wilson" | Irreversible (no mapping) |
| Shuffling | Rearrange values between records | Swap salaries between employees. Totals stay the same, individual values are wrong | Irreversible |
| Character masking | Replace characters with a mask symbol | "4532-7891-2345-6789" to "XXXX-XXXX-XXXX-6789" | Partially reversible if last N digits shown |
| Nulling | Replace with null or empty | SSN to null (when the field isn't needed at all) | Irreversible |
| Number variance | Add random noise to numeric values | Salary $95,000 to $92,340 (within +/-5%) | Irreversible |
| Date shifting | Shift dates by a random but consistent offset | 1990-03-15 to 1990-07-22 (preserves age range, breaks exact match) | Irreversible |
| Format-preserving encryption (FPE) | Encrypt while maintaining the original format | "555-123-4567" to "843-679-1023" (still looks like a phone number) | Reversible with key |
Choosing the right technique: Substitution and shuffling are best for dev/test databases where you need realistic data. Character masking is best for display (support dashboards, receipts). FPE is best when you need both protection and the ability to decrypt (PCI DSS tokenization alternative).
It is easy and good
“It is really nice and good Please join the course”