Authentication and RBAC
Session model
- Login creates a persisted session record in SQLite.
- API sets an
httpOnlycookie (SESSION_COOKIE_NAME). - Frontend uses
credentials: include.
Roles
adminbuilderoperatorviewer
Access model summary
- Workflow read: all authenticated roles
- Workflow create/update/delete:
builder,admin - Execute workflow/webhook API trigger:
builder,admin - Secrets list/create:
builder,admin - User registration:
- first-user bootstrap or public registration (as configured)
admincan create admin users
Endpoints
POST /api/auth/registerPOST /api/auth/loginPOST /api/auth/logoutGET /api/auth/me
Error contracts
401unauthenticated / invalid session403authenticated but unauthorized