Skip to content
Roadmap0/111
stage S55h

PII, Privacy & Cryptographic Guardrails

Classify and minimize data. Use `D4` to swap sensitive entities with tenant/session-scoped opaque UUIDs before model calls and restore only in authorized fields. Never log raw credentials, secrets, or unredacted PII.

Stage detail

When: Privacy basics during Project 1; revisit logging/data handling Weeks 7--8.

  • Data classification, minimization, retention, deletion, access logging, encryption in transit/at rest, and secret management.
  • PII detection and deterministic masking/token substitution.
  • Random-token substitution with a protected mapping store, scoped by user/session and expired appropriately.
  • Pre-flight masking and post-flight restoration, including the risk that output may expose or transform sensitive values.
  • Differential privacy: understand its purpose and limits conceptually; it is not generic prompt redaction.
  • Avoid logging raw prompts, documents, tokens, or PII by default.

Extra practice: build middleware using synthetic SSNs/card numbers. Replace them with random placeholders, store the mapping securely for the request, and restore only in authorized output paths. Test partial matches, repeated values, collisions, malformed output, cross-session leakage, and errors.

Do not learn yet: claim a proxy makes a system compliant or regex catches all PII. Production privacy needs classification, robust detection, retention controls, vendor review, access controls, and appropriate compliance input.