Skip to content

Auth and Groups ​

Do not duplicate

  • Secret values
  • Full auth setup runbooks
  • Endpoint-by-endpoint authorization tables
  • Keycloak configuration dumps

The platform supports interactive authentication through Keycloak/OIDC and programmatic access through API keys. Groups provide the main resource ownership and scoping boundary for many user-facing workflows.

Source Map ​

  • Authentication details live in docs-md/auth/AUTHENTICATION.md.
  • Group-scoped authorization behavior lives in docs-md/auth/GROUP_RESOURCE_AUTHORIZATION.md, including how the Temporal worker enforces the run's group (Workflow Worker section).
  • Which pages and sidebar entries each role sees lives in docs-md/auth/FRONTEND_ROUTE_PERMISSIONS.md (code: apps/frontend/src/routes.config.tsx).
  • Group UI and workflow context docs live under docs-md/groups/.
  • Backend auth implementation, including API key guards, lives in apps/backend-services/src/auth/.
  • API key management (controller, service, DB) lives in apps/backend-services/src/actor/.
  • Group backend behavior lives in apps/backend-services/src/group/.
  • Frontend auth context lives in apps/frontend/src/auth/.

Design Notes ​

  • Do not expose or copy secret values into wiki pages.
  • Treat group authorization docs as the stable policy reference before changing access checks.
  • API keys and OIDC users have different entrypoints but must converge on clear actor and authorization behavior.

Common Drift Risks ​

  • Frontend group context can drift from backend group membership and authorization checks. In particular, the frontend keeps its own copy of the Permission enum (apps/frontend/src/auth/permissions.ts) and /api/auth/me sends permissions by position, so the two enums must stay in the same order.
  • Documentation for group management pages can become endpoint-level; keep detailed API behavior in canonical docs or Swagger/OpenAPI.
  • Local development auth shortcuts should not leak into production-oriented guidance.
  • A new worker activity that takes a document id or template id from its input must scope the query to the injected groupId ({ id, group_id }); ctx and node parameters are not a group boundary. Blob access goes through getGroupBlobStorage / readGroupBlob, which a lint rule enforces; database queries have no such guard.
  • Azure Document Intelligence model ids and Content Understanding analyzer ids live on resources shared by every group. A new code path that runs, trains or deploys one must check it against the caller's or run's group, and a training records its model id's group in model_owners (Template model ids row and Workflow Worker section of GROUP_RESOURCE_AUTHORIZATION.md).