Skip to content

ADR 006: No client notification mechanism for epoch key rotation #68

Closed

Description

@thiras

Category: Missing Specification

Severity: HIGH

File: adr/006-e2e-encryption.md (~lines 259-260)

When server_secret rotates, all outstanding epoch keys become invalid. The ADR states: "server_secret rotation invalidates all outstanding epoch keys and sealed envelopes, forcing all clients to re-request."

Problem:
Clients cache epoch keys in memory only. There's no broadcast notification mechanism — clients discover the rotation only when decryption fails. This means:

  1. Client receives a sealed envelope for epoch N
  2. Client tries to unseal with cached epoch key
  3. Decryption fails (key was derived from old server_secret)
  4. Client must re-request the epoch key from the app server
  5. All in-flight content delivery fails silently until the client catches up

Impact:
Every server_secret rotation causes a burst of decryption failures across all active clients, with no graceful degradation path.

Recommendation:
Specify a rotation signal mechanism:

  • App server pushes a KeyRotated { new_epoch_id } event via the existing WebSocket/SSE connection
  • Clients proactively re-request the epoch key upon receiving the signal
  • Define a grace period where both old and new epoch keys are valid (dual-key overlap)

ADRs affected

  • ADR 006 (E2E Encryption)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:missing-decision

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions