Add policy-based authorization to Nuxt server routes, middleware, and API endpoints using Cerbos. Enforce access control in your Nitro server layer without scattering permission logic across your application.
Enforce fine-grained permissions in Nitro server handlers and API routes without embedding authorization logic in each endpoint
Pass user identity, resource attributes, and request metadata from Nuxt server middleware to Cerbos for context-aware authorization decisions
Define authorization rules in YAML policies instead of spreading permission checks across server routes, middleware, and composables
Building authorization logic inside Nuxt 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 Nuxt 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 Cerbos PDP from your Nuxt server routes or middleware. Authorization checks run server-side in the Nitro engine, so you can gate API endpoints, server routes, and server-rendered pages before any response reaches the client.
Yes. You can create a Nuxt server middleware that calls Cerbos on every request, or use route-specific middleware to authorize access to protected pages and API routes. The Cerbos PDP responds in sub-millisecond time, so middleware checks add negligible latency.
Cerbos authorization runs server-side, so it works with SSR, ISR, and API routes. For statically generated pages, you can use Cerbos on the API endpoints that serve protected data, ensuring authorization is always enforced regardless of rendering strategy.


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.