Encrypt client documents with a key per client
Context
The platform stores documents for many clients. With one shared storage key, a single mistake could expose everything, and clients can ask for their data to be deleted.
Decision
Each client gets its own data key, wrapped by a managed key service. A key is released only after the user's access to that client has been checked.
Consequences
- +A breach is contained to one client.
- +Destroying a client's key makes its documents unreadable, which supports deletion requests.
- −Key lookups add latency, so keys are cached for the session.
- −Search indexes must respect the same per-client boundary.