Skip to main content

Actor model & identity

Every request that hits the platform is performed by an actor. The actor model is how identity, audit, and access control work together.

What you'll learn​

  • The four actor types and when each is used
  • How the gateway authenticates and how services trust headers
  • How delegation works (one actor acting on behalf of another)

The four actor types​

TypeWho it isHow they auth
userA human signed in to the appPassword + session cookie, SSO, or MFA
appA registered applicationOAuth client credentials or API key
serviceA platform service calling internallyService-to-service token (issued by the gateway)
super_adminAn operator with cross-tenant scopeMFA-required, audit-logged

Every audit log row records the actor that performed the action.

How auth flows​

  1. A request hits the API gateway with a credential (cookie, bearer, OAuth).
  2. The gateway validates the credential and resolves the actor.
  3. The gateway calls the relevant service module (federated GraphQL) with HTTP headers:
  • x-actor-id: <uuid>
  • x-actor-type: user | app | service | super_admin
  • x-workspace-id: <uuid> (workspace-layer requests only)
  1. The service module trusts those headers. Services never validate tokens. That's the gateway's job.

Why? Centralizing token validation means new auth methods (passkeys, SCIM, mTLS) only need to be added in one place, and every services automatically benefits.

Delegation​

An app actor can act on behalf of a user via delegation. When a user grants the app delegated scope, the gateway forwards extra headers:

  • x-consent-granted-by: <user-id>
  • x-consent-scope: read:files,write:notes
  • x-consent-granted-at: <iso8601>
  • x-consent-expires-at: <iso8601>

The audit log records both the app and the on-behalf-of user.

→ User-facing guide: App delegations

What changes when?​

You changeWhere
How users sign inGateway (centralized)
What an actor can doRBAC directives on service schemas
Who can delegate to whomThe app's delegation scope at registration

Next steps​