Copied
ADR-006 · monorepo · Ratified

ADR-006: Class A–D Data Classification & Idempotency Replay Sanitization

Prevent Class A (Secrets) and Class B (Sensitive PII) fields from ever persisting in idempotency caches or structured logs.

← All ADRs · Gate: Zero-PII Pino log sanitizer + DTO mapper unit tests

Context

Under Kenya’s Data Protection Act (2019) and GDPR, caching full API responses for idempotency or logging payloads can inadvertently leak National IDs, KRA PINs, or phone numbers into Redis and log aggregators.

Decision

Classify all schema fields into Class A (Restricted), Class B (Sensitive PII), Class C (Operational UUIDs/Enums), and Class D (Public). Only Class C and D fields may enter idempotency replay stores or NDJSON logs.

Consequences

Provable compliance with ODPC regulations and zero PII exposure in telemetry pipelines.