PII Encryption

EventSourcerer makes it easy to encrypt personally identifiable information (PII) so that you can satisfy data protection requirements (GDPR, CCPA, etc.) without losing the integrity of the event log.

How it works

  1. You flag specific event properties as PII when you register or update an event.
  2. EventSourcerer encrypts those properties with a per-subject key before storing them.
  3. Keys are stored separately and can be destroyed for a specific subject ("crypto-shredding").
  4. When events are read back, properties are decrypted transparently for authorised applications.

Marking a property as PII

  1. Edit your event in Events → (your event).
  2. Toggle the PII flag on each sensitive property.
  3. Save. Future writes will be encrypted automatically; you can optionally re-encrypt history.

Subject keys

Each PII property is encrypted with a key tied to a subject (typically a user id). To forget a user, destroy their key — the original payload becomes permanently unreadable, while the event stream itself remains intact for audit and projection purposes.

Crypto-shredding lets you honour "right to be forgotten" requests without breaking the append-only guarantee of event sourcing.