Chatterfly was designed with security as a first principle: per-tenant key derivation, append-only audit trails, short-lived scoped tokens, and a system architecture that makes cross-tenant mistakes structurally hard.
Core security controls
AES-256-GCM encryption
Every integration credential is encrypted with AES-256-GCM using a random nonce. Plaintext never reaches the database.
Per-tenant key derivation
Encryption keys are derived via HKDF-SHA256 from a master key using tenant ID as context. A compromise of one tenant's data does not expose another's.
JWT with JTI revocation
Short-lived access tokens (15 min) paired with 7-day refresh tokens. Every token carries a JTI that can be individually revoked. Silent rotation keeps sessions seamless.
Four-tier RBAC
Owner → Admin → Member → Viewer. Every API endpoint enforces a minimum role at the middleware layer. Role checks also live at the query layer.
Native multi-tenancy
Every table carries a non-nullable tenant_id foreign key. All queries are scoped at code generation time — cross-tenant reads are structurally impossible.
Append-only audit trail
PostgreSQL RULE-level enforcement blocks DELETE and UPDATE on the run timeline — even a compromised application account can't erase history. SHA-256 hash chain provides tamper evidence.
Rate limiting on all entry points
Token-bucket rate limiting on auth endpoints (10 req/min/IP), management API (per-tenant RPM quota), and public survey endpoints (configurable per deployment).
Zero-downtime key rotation
JWT_SECRET_PREVIOUS enables rolling key rotation without session invalidation. A re-encryption tool handles credential key rotation.
Scoped participant tokens
Human-in-the-loop reviewers receive a short-lived JWT scoped to a single workflow run and single role. One-time WebSocket upgrade tickets expire in 30 seconds.
Enterprise feature set
Identity & Access
Data Protection
Audit & Compliance
Tenant Isolation
Operational Security