Auth

Organizations, agents, PATs, permission bitmaps, and tenant-scoped identity.
Implemented Ledger class: shipped-local
Verified 2026-10-21

The auth service is the identity plane. It issues and validates credentials, resolves the organization and permission bitmap, and owns provider-credential sealing. The proxy calls it over gRPC on every protected request.

Auth exposes HTTP /health, /ready, and /metrics. Token, agent, and provider-credential management is gRPC plus the management API. There is no public auth REST token API.

Pages

Permission model in one table

The bitmap is defined in packages/permissions/permissions.go. The proxy chat requirement is MemoryRead | SessionCreate | SessionRead | SecretUse.

SetIncludesUse
AgentDefaultMemory read/write, session create/read, trace readNormal agent token
ProxyChatCompletionMemory read, session create/read, secret useProxy chat admission
ReadOnlyMemory read, directive read, session read, trace readRead-only operator
AdminAgent default plus management bitsOrganization administration

Step-up/MFA is required for high-risk bits such as SecretUse, OperatorRawRead, and PolicyChange. A valid token without the required bit is authenticated but not authorized.

Credential rules

  • PATs are stored as Argon2id hashes; plaintext is returned once at creation.
  • ValidateToken has no caller bearer and must stay on a trusted/private network boundary.
  • ValidateAgent checks that the agent belongs to the token organization and is active.
  • Provider credentials are sealed at rest and returned as metadata only.
  • Revocation propagates through Redis when configured; the optional proxy auth cache is gated on a healthy revocation channel.