Security model
Browser session
-
OIDC authorization code + PKCE S256.
-
Server-side encrypted tokens.
-
HttpOnly, SameSite session cookie.
-
CSRF token on every state-changing form.
-
Origin check on form posts.
-
Rate limits for login, invite, reset, signup and admin actions.
Admin API
The browser never receives:
-
the service-account secret;
-
Keycloak Admin API tokens;
-
SMTP credentials;
-
database credentials.
MFA
-
TOTP/WebAuthn credentials are managed by Keycloak.
-
Admin policy can require MFA for admins or all members.
-
Reset MFA is admin-only and audited.
-
Last-owner and self-change guards prevent lockout.
Workspace isolation
One deployment is one workspace/realm/database.
-
list queries are scoped by
workspace_id;
-
admin actions reject targets outside the workspace;
-
cross-workspace access returns 403;
-
audit is workspace-scoped.
Production checklist
-
TLS and HSTS.
-
Real SMTP with SPF/DKIM/DMARC.
-
Admin MFA enabled.
-
Two owners.
-
Break-glass runbook tested.
-
/manage and /api/admin/* IP-restricted.
-
Backups encrypted and restore tested.
-
Metrics token protected.