Inspectable security

Fail-closed boundaries at every layer.

Security is enforced in the API boundary, database triggers, Convex auth config, and CSP headers — never left to UI conventions.

Tenant & Role Isolation

Every operational query and mutation is scoped by organization_id and gated by a centralized RBAC guard covering every versioned route and Convex function.

  • Clerk default session token (sid + aud=convex) with passkeys + email code; WorkOS SSO/SCIM ready
  • No anonymous fallback in production_live mode
  • Idempotency-Key replay protection with HTTP 409 payload-mismatch detection

Immutable Audit & Cloudflare R2 Evidence

Every mutation writes an append-only audit_events row guarded by a PostgreSQL trigger blocking UPDATE/DELETE. Dispatched payroll packets, documents, and audit snapshots archive to Cloudflare R2 with conditional If-None-Match: * writes.