Skip to content
Docs home

SECURITY · UPDATED AUGUST 2026

Compliance Evidence Pack

RLS policy inventory, encryption scopes, secret rotation results, DR drill results, and audit trail integrity — the evidence behind every security claim.

Tenant isolation

QUE enforces multi-tenant isolation at the PostgreSQL layer through row-level security. Every query executes under the tenant's JWT role, and the application service layer never assumes authorization the database did not verify. The `is_company_member(company_id, user_id)` helper function gates all member access, and the `security_events` table is super-admin-only to prevent audit trail tampering by compromised tenant owners. Verification: Phase 13 cross-tenant E2E test suite.

Encryption scopes

All secrets at rest are encrypted using AES-256-GCM with a random 12-byte nonce per operation. The encryption key is derived from the deployment's `ENCRYPTION_KEY` environment variable (never committed to source). Secrets are decrypted only at the point of use and never stored in plaintext anywhere in the application layer. Scope covers all integration secrets, API key hashes, and webhook signing secrets.

Secret rotation procedure

Rotation follows a five-stage pipeline: Inventory → Stage → Validate → Rollback → Revoke. Rotation is quarterly or immediate upon suspected exposure. Production and non-production environments use separate credentials. The procedure is documented in the disaster recovery runbook and verified through the rotation test suite.

Disaster recovery drill results

MetricTargetVerification
RPO (backup age threshold)24 hoursBackup health monitoring + Prometheus alert
RTO (restore time)4 hoursQuarterly restore drill (drill_results table)
Drill cadence90-day maximumAdmin DR dashboard + alert on overdue
WAL gap detection< 5 minutesContinuous WAL archive state monitoring
DR targets and verification methods

Tamper-evident audit trail

Every security event written to `security_events` carries a `chain_hash` computed as `SHA-256(prev_chain_hash + event_fingerprint)`. The chain is per-tenant, meaning each tenant's audit trail is independently verifiable. Any tampering with a historical record breaks the chain and is detected by the `verifyChainIntegrity()` function. Retention: INFO=30d, WARNING=90d, HIGH/CRITICAL=365d/5yr.

Alert rules and monitoring

CategoryCountStack
Rate limiting & fail-closed2 rulesPrometheus + Alertmanager
Payment fraud & disputes3 rulesPrometheus + Alertmanager
Account takeover & abuse3 rulesPrometheus + Alertmanager
Disaster recovery2 rulesPrometheus + Alertmanager
Webhook delivery2 rulesPrometheus + Alertmanager
Audit chain integrity3 rulesPrometheus + Alertmanager
Integration platform5 rulesPrometheus + Alertmanager
20 total Prometheus alert rules across 7 categories

GDPR data erasure (Article 17)

TierTablesTreatment
Tier 1 (direct PII)bookings, customers, staff_members, event_typesDeleted on confirmed erasure request
Tier 2 (audit)security_events, webhook_delivery_attemptsPreserved but PII masked with SHA-256 pseudonymization
Erasure treatment by table tier

The erasure pipeline requires double-confirmation (request with token, then confirm with token) before execution. Retention thresholds: bookings pruned at 365 days; customer eligibility at 180 days of inactivity; GDPR processing SLA of 30 days; request expiry at 45 days. Every erasure is logged to security_events with the chain hash.

Incident response

SeverityDefinitionEscalation
SEV1Platform down or data riskImmediate → L1-L4
SEV2Partial outage< 30 min → L2-L4
SEV3Degraded performance< 2 hours → L3
SEV4Cosmetic / minorNext business day → L3
Incident severity levels and escalation targets

Claim-to-evidence mapping

Every claim on the public /security page traces to a specific artifact in this pack. No claim is published unless it is verifiable against the evidence. The full compliance evidence pack is available at docs/compliance-evidence-pack.md in the repository.

STILL READING

Something here still feels worth checking together.

This documentation describes the product exactly as it is implemented. If a behavior you expected is not here — or is here and does not match your deployment — tell the team. Implementation questions start on the contact page.