Security overview
The Pushizo security model — authentication, RBAC, tenant isolation (RLS), secret encryption, application security (SSRF, CSP, signatures), observability and audit logging; ASVS checklist.
Pushizo is a multi-tenant platform; every query is scoped by org_id/app_id, and Postgres row-level security (RLS) is the second line of defense. This page summarizes the model; for an evidence-backed list of controls, see the OWASP ASVS checklist.
Authentication
| Surface | Method |
|---|---|
| Dashboard | Password (Argon2id, at least 10 characters, breached-password check), opaque session cookie (HttpOnly; Secure; SameSite=Lax, 14-day sliding / 90-day absolute), TOTP MFA + recovery codes (can be enforced at the org level), Google/GitHub OAuth, SAML/OIDC SSO, login lockout (5 failures → 15 min), new-device email, optional Turnstile |
| Public API | Authorization: Bearer hs_live_… API key: stored as SHA-256, scoped, app/org scope, IP allowlist, expiry date, revocation ≤ 5 s |
| SDK endpoints | No API key; proof of ownership via token_hash and identity verification (identity_hash HMAC or ES256 JWT) |
| Platform admin | Separate role, mandatory MFA (ADMIN_MFA_REQUIRED), actions that require a justification, read-only/write-enabled support sessions |
Path canonicalization and credential-type separation by route pattern are enforced: API keys are only valid on /v1 routes, sessions only on /internal and /admin routes; Origin and content type are checked on /internal//admin mutations (CSRF).
Authorization (RBAC)
Roles: owner, admin, developer, marketer, composer, analyst, billing, viewer. The permission table comes from a single source (packages/tenancy) and is used both in API guards and in the dashboard menu; membership can be restricted to specific apps with app_scopes. API key scopes cannot exceed the permissions of the member who created the key (privilege escalation prevention). When the approval flow is on, a marketer cannot send; they submit for approval.
Tenant isolation
- Every repository call takes a
TenantContext; once the tenant context is resolved, the request runs in a single transaction withSET LOCAL app.current_org_id / app.current_app_id; in production the application role isNOSUPERUSER NOBYPASSRLS(Postgres roles). - Another tenant's resource returns
404 HS_NOT_FOUND(existence is not leaked). - An automatic isolation test for every endpoint (tenant A's key against tenant B's resource) is derived from the OpenAPI spec.
- Storage keys are prefixed with
org/{org_id}/app/{app_id}/…; signed URLs last 24 hours. - Data residency: a request outside the cell (EU/TR) returns
421 HS_WRONG_CELL; network policy blocks cross-cell access to the data layer (data residency).
Secret management
- Envelope encryption:
MASTER_KEY→ wrapped data encryption keys (DEKs); a nonce per record, libsodiumsecretbox. Rotation command andMASTER_KEYreplacement: key rotation. - Provider credentials (APNs p8/p12, FCM service account, SMTP password, Twilio token), the VAPID private key, webhook secrets, the SDK secret and custom webhook headers are stored encrypted; they can never be read back from the API/UI.
- Redaction in logs (tokens, email, phone, OAuth/MFA parameters); body scrubbing with Sentry
beforeSend; secret scanning in CI.
Application security
- Zod schema validation at every boundary; JSON depth/size limits (1 MB, 5 MB for event batches).
- SSRF: webhook, Data Feed, media and tenant SMTP addresses are checked against private IP ranges after DNS resolution, and the connection is pinned to the IP; redirects are not followed; allowlists for Web Push endpoints and FCM
token_uri. - Output: email/in-app HTML sanitization, Liquid sandbox, linear-time HTML processing against ReDoS; CSP, HSTS,
X-Content-Type-Options,Referrer-Policy,Permissions-Policy,X-Frame-Options. - Signatures: outgoing webhooks carry
Pushizo-Signature(HMAC-SHA256, 5-minute tolerance, 24-hour rotation window); incoming provider webhooks (SNS, Svix/Resend, Twilio) are signature-verified; email tracking links are HMAC-signed (no open redirect). - Rate limiting and abuse: plan-based API rate limits and nginx IP limits (rate limits); 1,000 messages per day for the first 24 hours of a new org; channel suspension when complaint/bounce thresholds are exceeded; disposable email domain list; platform admin review queue.
- Dependencies:
npm audit, Dependabot, lockfile; secret scanning in CI (gitleaks).
Observability and audit
- Every response carries
x-request-id; logs can be matched with therequest_idin the error envelope. - Audit log: who did what, when, and to which resource; at the org level via
GET /v1/organization/audit-logs, a daily NDJSON SIEM stream and theaudit.createdwebhook (integrations). - Prometheus metrics, Loki logs, Alertmanager alerts and blackbox probes (status and monitoring).
Compliance
- KVKK (Turkish data protection law) / GDPR: data processor role, self-service rights for users and accounts, retention periods, DPA and subprocessor list (KVKK/GDPR compliance).
- Enterprise identity: SAML 2.0 / OIDC SSO, "SSO only", SCIM 2.0 user/group provisioning (SSO, SCIM).
- White-label and resellers: custom domain, branding, reseller accounts (white-label).
- Vulnerability disclosure:
https://pushizo.com/.well-known/security.txt.