Clerk provides drop-in authentication with session management, Organizations, and custom session claims. Cerbos uses Clerk's session data to make fine-grained authorization decisions, so your Next.js or React app gets real access control without hardcoded permission checks.
Map Clerk's custom session claims directly to Cerbos principal attributes for use in authorization policies
Use Clerk Organization memberships and roles to drive multi-tenant authorization policies in Cerbos
Works with Clerk's Next.js, React, and Remix SDKs, call Cerbos from middleware, server components, or API routes
Clerk handles authentication, confirming who a user is. Cerbos handles authorization, deciding what that user can do. Together they give you a complete access control stack without coupling identity logic to business rules.
Cerbos lets you write fine-grained, context-aware authorization policies in human-readable YAML. Policies are decoupled from application code so product and security teams can update permissions without a release cycle.
Because Cerbos runs as a stateless Policy Decision Point (PDP) next to your application, authorization checks are sub-millisecond and scale horizontally with your infrastructure.
auth() in server components, getAuth() in API routes, or useAuth() client-side. This gives you the user ID, active organization, roles, and custom claims.Clerk lets you add custom claims to session tokens via the session token customization feature. These claims, such as role, team, or subscription plan, are available to your application on every request. Pass them to Cerbos as principal attributes, and your policies can use them for fine-grained authorization decisions.
Yes. Clerk Organizations provide multi-tenancy with per-organization roles and membership management. Pass the active organization ID and the user's organization role to Cerbos, and your policies can enforce organization-scoped access rules like "admins of organization X can manage billing, members can only view."
Yes. Clerk's Next.js SDK provides session data in middleware, server components, and API routes. You can call Cerbos from any of these contexts using the Clerk session data as the principal, keeping authorization checks close to your route handlers or server components.



What is Cerbos?
Cerbos is an end-to-end enterprise authorization software for Zero Trust environments and AI-powered systems. It enforces fine-grained, contextual, and continuous authorization across apps, APIs, AI agents, MCP servers, services, and workloads.
Cerbos consists of an open-source Policy Decision Point, Enforcement Point integrations, and a centrally managed Policy Administration Plane (Cerbos Hub) that coordinates unified policy-based authorization across your architecture. Enforce least privilege & maintain full visibility into access decisions with Cerbos authorization.