-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
serverIssues related to the serverIssues related to the server🧐 analysisTask that needs research and investigationTask that needs research and investigation
Description
We will use envelope encryption to store per-subscription secrets safely while keeping the system lightweight.
Keys
Data Encryption Key (DEK)
- One DEK generated per subscription.
- Used to encrypt the subscription’s secret with AES-256-GCM.
- The encrypted secret (ciphertext + auth tag + nonce) is stored in the database.
Key Encryption Key (KEK)
- A single long-lived server key stored locally (env var / file with permissions).
- Used to encrypt each DEK with AES-256-GCM.
- Only the wrapped DEK is stored in the database, never the plaintext DEK.
Nonces / IVs
We will use random 96-bit (12-byte) nonces, generated independently for both KEK and DEK encryption.
Schema / Payload
- Top-level
secretsfield on subscription input. Users pass secrets on creation only. - Secrets will never be returned, even encrypted to client requests. We can return a list of secret names only.
NOTE
We avoid external vault infrastructure, as it would introduce unnecessary complexity at this stage.
Metadata
Metadata
Assignees
Labels
serverIssues related to the serverIssues related to the server🧐 analysisTask that needs research and investigationTask that needs research and investigation