Security for Engineers/Data Privacy & Compliance

PII Classification & Handling

PII vs sensitive PII, minimization, tokenization, column-level access, and logging redaction.

3/5Overview: 30m

PII categories

TierExamplesHandling
PIIName, email, IPEncrypt, access control, audit
SensitiveSSN, health, financialStronger encryption, fewer eyes
Non-PIIAggregated metricsStandard controls

Minimization — collect only what you need; delete when done.

Tokenization vs encryption

  • Tokenization — replace PAN with token; vault holds mapping (payments)
  • Encryption — reversible with key; you manage rotation

Column-level access

Warehouse: mask email for analysts; full for support role.

Data Engineering → Governance — lineage and contracts; this topic — what to classify.

Logging redaction

Never log: passwords, tokens, full credit card, session cookies.

Structured logs with explicit allowlist of fields.

DE pipeline concerns

  • Bronze may have raw PII; gold anonymized for analytics
  • Data minimization in exports to partners
  • Access logs on who queried PII tables

Backend API concerns

  • Don't return PII in list endpoints if UI doesn't need it
  • Pagination leaks — same AuthZ on every page

Cross-reference: Databases — encryption at rest; Observability — log pipeline PII scrubbing.

Further Reading

Hands-On Tasks (Optional)

Security design drills — threat modeling, auth flows, and incident playbooks. Assumes Networking (TLS) fundamentals.

  • Audit logs for PII leakage

    Application logs request bodies on error. List fields to redact, structured logging pattern, and who can access raw logs.

    15m