Skip to content

Identity & access

Partial

Product and workload checks are implemented; production identity provisioning and integration management remain incomplete.

Code and tests

Clerk establishes the browser user’s identity. Resource authorization then occurs in the Next app’s server paths and in Product API, with product PostgreSQL RLS as an additional enforcement boundary.

flowchart LR
  Session["Clerk session"] --> App["Next server routes and repositories"]
  App --> API["Product API authorization"]
  App --> DB["Product PostgreSQL with scoped roles"]
  API --> DB
  Worker["Product worker"] --> Token["Workload JWT"]
  Token --> Core["Legal Core authentication and content policy"]

Organization membership alone does not grant access to every private conversation; product requests check the tenant and resource scope. The worker checks authorization again immediately before a model call, because permission may change while the call waits for capacity. Legal Core verifies workload tokens, and its readable views prevent a saved source ID from bypassing withdrawal or content policy.

For example, a user removed from a project while synthesis is queued must fail the dispatch authorization check. A saved source ID is an identifier, not a grant of access.

Cross-service revocation delivery and production identity provisioning still require environment validation. External integrations distinguishes the preview public gateway from its target policy. Storage & indexes owns deletion behavior.