RBAC built-in
Four roles. Project routes gated. UI mirrors server.
Admin / Operator / Auditor / Viewer, scoped per project. The backend is authoritative, while the useCan(slug, action) hook mirrors the policy in the dashboard so users do not see controls their role cannot use. Admins own schedule-definition CRUD; operators can run commands and control existing schedules; auditors read the audit log and change nothing; viewers read ordinary project data. The audit log is open to auditors and admins only, so the people who review the record are not the people who produce it.
The related dashboard view, captured with sample project data. Open the live demo to try it.
Ships with
- Backend as source of truth
- UI gates match server policy
- Debounced 'Permission denied' toast on any 403
- Per-project membership + last-admin protection
Multi-user invitations
Mint a link. Email it automatically. Accept in one click.
Admin mints an invitation token; if the project has an email channel configured, z4j sends the accept link via SMTP. HMAC-hashed tokens, single-use, TOCTOU-safe accept, accepted_by_user_id stamped on consumption.
- HMAC-SHA256 token storage, plaintext never persisted
- Auto-email via configured SMTP channel
- Preview and accept share a 30/min budget per source IP per brain worker
- Single-use with atomic accept transaction
Password reset flow
Constant-shape response, single-use token, session revocation.
Request + confirm endpoints. Known and unknown addresses receive the same accepted response shape, email dispatch happens after the response, and a configured response floor reduces account-existence timing signal. Token and audit database work still differs for a known user, so this is not a whole-request constant-time guarantee. Prior unconsumed tokens are invalidated on successful reset, and all sessions are revoked.
- Constant-shape response: accepted=true for known + unknown emails
- Background email dispatch plus a uniform response floor reduce timing differences without claiming constant time
- Atomic session revoke on successful confirm
- Prior tokens invalidated so a held earlier token cannot second-reset
Defense-in-depth rate limits
Local defense in depth for public endpoints.
In-process IP buckets throttle /auth/login (20/min), invitation preview plus accept (30/min shared), and password-reset request plus confirm (10/min shared). Each budget applies per source IP per brain worker, so multi-worker and multi-replica deployments multiply the effective fleet ceiling. Use a shared reverse-proxy limit when one fleet-wide ceiling is required. Inline pruning bounds each process's limiter memory, and per-account login lockout remains a second line.
- Per-IP, per-brain-worker sliding-window buckets
- Inline prune every 500 hits, no background task needed
- 120-char IP key cap defeats 10KB XFF memory attack
- Composes with per-account lockout; a reverse proxy supplies fleet-wide enforcement
Related
More capabilities
Secure-by-default redaction
Built-in and configurable patterns scrub recognized secrets from task arguments before transport.
Learn moreHMAC-chained audit log
Privileged actions, signed and chained.
Learn moreGrafana templates
Five drop-in Grafana dashboards keyed to z4j's metric names.
Learn more