Add policy-based authorization to ASP.NET controllers and endpoints using the Cerbos .NET SDK. Enforce fine-grained access control via authorization handlers or middleware in the request pipeline.
Implement Cerbos as an ASP.NET authorization handler to enforce permissions through the standard [Authorize] attribute and policy system
Pass ClaimsPrincipal data, route values, and resource attributes from ASP.NET to Cerbos for attribute-based authorization decisions
Move authorization rules out of controllers and authorization handlers into versioned YAML policies that update without redeployment
Building authorization logic inside ASP.NET 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 ASP.NET application stays focused on business logic while authorization policies evolve independently, managed by product or security teams without touching code.
Use the Cerbos .NET SDK to create a client and call the Cerbos PDP from your ASP.NET controllers, authorization handlers, or middleware. Extract the authenticated user from the ClaimsPrincipal, build a Cerbos check request, and gate access based on the PDP response.
Yes. Implement a custom IAuthorizationHandler that calls the Cerbos PDP, and register it with ASP.NET's authorization services. Apply policies to controllers or endpoints using the [Authorize] attribute with your custom policy name.
Yes. Call the Cerbos PDP from endpoint handlers or register middleware in the request pipeline that evaluates Cerbos policies before the endpoint executes. The Cerbos PDP responds in sub-millisecond time.



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.