Skip to main content

Security & Auth Flows

CAIPE security is enforced in layers: the BFF owns the browser session, Dynamic Agents validates bearer tokens, AgentGateway is the single MCP Policy Enforcement Point, and OpenFGA handles all relationship-based authorization decisions.

Overview

Controls

ControlPurpose
NextAuth / OIDCBrowser session authentication
KeycloakIdentity provider, service accounts, token exchange
OpenFGARelationship and scope authorization (ReBAC)
AgentGatewayMCP route enforcement — jwtAuth + extAuthz
Agent Context HMACPer-agent tool policy via signed request headers
Audit serviceCentral audit log ingestion and querying

Flows

FlowWhere
Login and session (OIDC, NextAuth, token refresh)Auth Flow
AgentGateway jwtAuth + extAuthz + MCP proxyAgentGateway
Agent identity HMAC — end to end with OpenFGA checksAgent Context HMAC
RBAC role assignment and permission workflowsRBAC Workflows
Enterprise identity federation (Keycloak + external IdP)Enterprise Identity Federation
Slack bot authorization flowsSlack Bot Authorization
Service accounts (bot credentials, create/rotate/revoke)RBAC Architecture — Service Accounts

RBAC

See the RBAC section for the OpenFGA policy model, role definitions, deployment guidance, and per-component authorization details.