Add policy-driven authorization to your React Router application with a single SDK call per loader or action.
Authorize data access in loaders before rendering, ensuring users only see data they are permitted to access
Authorize mutations in actions with fine-grained policies based on user identity, roles, and resource attributes
Works with React Router in both framework mode and library mode using the same SDK integration
Building authorization logic inside React Router quickly becomes a maintenance burden. Hard-coded role checks scatter across controllers and middleware, and every permission change requires a code deploy.
Cerbos replaces scattered authorization logic with a single API call. You define fine-grained policies in YAML, and the Cerbos PDP evaluates them at request time using roles, attributes, and any context you provide.
With Cerbos your React Router application stays focused on business logic while authorization policies evolve independently, managed by product or security teams without touching code.
Install the Cerbos JavaScript SDK and call the PDP from your loaders and actions. Each request sends the user's identity, the resource, and the action to Cerbos, which evaluates your policies and returns an allow or deny decision.
No. The Cerbos PDP runs alongside your application as a sidecar or service and delivers sub-millisecond authorization decisions. It adds negligible latency to request processing.
Yes. Cerbos integrates at the loader and action level, which works the same way in both React Router v7 framework mode and library mode.


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.