Authentication and authorisation
How are users authenticated and authorised?
Configured pilot workspaces use signed `defencefile_session` cookies for authenticated routes. The cookie is HttpOnly, SameSite=Lax, path-scoped to `/`, and forced Secure when Postgres pilot persistence is configured.
Authenticated API contexts carry tenant, organisation, user, and role metadata. Mutating browser requests reject cross-origin submissions before workspace mutations are accepted.
Production pilot readiness requires generated session secrets and named pilot users with allowed roles; short or placeholder secrets keep `/api/health` from reporting ready.
Evidence mapped internally
- README auth/session notes
- docs/security-privacy.md
- src/server/auth/session-token.ts
- src/server/auth/api-context.ts
- src/server/ops/deployment-readiness.ts