Skip to content

Encryption & Key Management Policy

Field Value
Owner Puneet Gupta (Co-Founder)
Classification Internal (shareable under NDA)
Version 1.0
Effective date 2026-06-11
Next review 2027-06-11

1. Purpose

Define how data is encrypted in transit and at rest, and how encryption keys are managed.

2. Encryption at rest

  • Customer data is stored in managed PostgreSQL (Supabase) encrypted at rest with AES-256.
  • Integration credentials (ERP/billing API keys, OAuth tokens) are additionally encrypted at the application layer using AES-256-GCM before storage, providing envelope-style protection above the database's own encryption.

3. Encryption in transit

  • All client-to-server and server-to-integration traffic uses HTTPS/TLS 1.2 or higher.
  • Plaintext protocols are not used for transmitting customer or credential data.

4. Key management

  • The application-layer encryption key (ERP_CREDENTIAL_ENCRYPTION_KEY) is a 256-bit key stored as a secret in environment configuration, never committed to source control.
  • Keys are environment-specific (separate keys for development and production).
  • The cipher fails closed: if the key is missing or invalid, credential operations fail rather than fall back to plaintext.
  • Key rotation requires re-encrypting existing data; a documented rotation procedure and a backfill helper exist for this purpose.

5. Data masking / pseudonymization

Field-level masking and pseudonymization are not currently applied; data is processed in identifiable form for reconciliation and protected by the encryption, tenant isolation, and access controls described here and in related policies.

Revision history

Version Date Author Change Approved by
1.0 2026-06-11 Puneet Gupta Initial draft Puneet Gupta (Co-Founder)