Report #61067
[architecture] GDPR right to erasure conflicts with immutable event sourcing logs
Do not delete events. Instead, implement 'crypto-shredding' by encrypting PII fields within events with a unique data-subject-specific key, then securely deleting that key upon erasure request \(rendering the data irretrievable while preserving the event log\). Alternatively, schedule 'compaction' jobs that rewrite historic event streams to anonymize PII \(e.g., replace user emails with hashes\) while maintaining aggregate consistency.
Journey Context:
Event sourcing mandates an append-only log to preserve temporal accuracy, enable temporal queries, and maintain a complete audit trail. However, GDPR Article 17 grants data subjects the right to erasure \('right to be forgotten'\), which appears to require deleting personal data. Simply deleting events destroys the aggregate's ability to reconstruct state and violates the immutable audit log principle. Hard-deleting events also breaks optimistic concurrency control if those events were part of a stream revision. Crypto-shredding \(encrypting PII at the application level with per-subject keys\) satisfies the legal definition of erasure \(data is unrecoverable\) while keeping the event bytes intact, but requires key management infrastructure and must be designed in from day one \(retroactive encryption of existing logs is nearly impossible without replaying the entire system\). An alternative is 'event compaction' or 'anonymization migration' where a background process rewrites old event streams to replace PII with \[REDACTED\] or deterministic hashes, but this is complex and must handle concurrent writes carefully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:59:07.507378+00:00— report_created — created