Overview
Cerbos authorization revolves around answering one key question:Can this PRINCIPAL perform this ACTION on this RESOURCE?
Principal
A principal is the entity attempting to perform an action. Most commonly a user, but can represent:- Users (authenticated humans)
- Service accounts
- Applications
- Bots or automated systems
- IoT devices
- Any identifiable actor
Principal Attributes
Principals have three key properties:ID
ID
A unique identifier for the principal.
Roles
Roles
Static roles assigned to the principal (e.g., from your identity provider).
Attributes
Attributes
Contextual information about the principal used in policy conditions.
Example Principal
Bring Your Own Identity: Cerbos doesn’t manage authentication. Use any identity provider (Auth0, Okta, AWS Cognito, custom JWT, etc.) and pass the principal information to Cerbos.
Action
An action is a specific operation a principal wants to perform. Actions are defined by you based on your application’s domain.Common Action Patterns
CRUD Operations
Custom Operations
Namespaced Actions
Wildcards
Actions in Requests
Check multiple actions in a single request:Resource
A resource is the object or entity being accessed. Resources are organized by kind (type) and have individual instances with unique IDs.Resource Structure
Example Resource
Policies
Policies are YAML files that define authorization rules. They specify which principals can perform which actions on resources.Policy Types
Cerbos supports three types of policies:- Resource Policies
- Derived Roles
- Principal Policies
Define rules for a specific resource kind. This is the primary policy type.
Use for: Standard authorization rules that apply to all instances of a resource type
Policy Rules
Rules within policies have several components:Actions
Actions
Which actions this rule applies to.
Effect
Effect
Whether to allow or deny the action.
Roles or Derived Roles
Roles or Derived Roles
Which roles this rule applies to.
Condition (Optional)
Condition (Optional)
Additional attribute-based conditions for the rule.
Policy Decision Point (PDP)
The Policy Decision Point (PDP) is the Cerbos service that evaluates policies and makes authorization decisions.How the PDP Works
Load Policies
The PDP continuously monitors your policy storage location (disk, S3, Git, database) and loads policies into memory.
Evaluate Policies
The PDP matches the request against the appropriate policies, evaluates conditions, and determines the outcome.
PDP Characteristics
Stateless
No session state. Each request is independent. Scale horizontally.
Fast
In-memory evaluation. Sub-millisecond policy decisions.
Hot Reload
Detects policy changes automatically. No restart required.
Audit Logs
Optional decision logging for compliance and debugging.
Primary APIs
The PDP exposes two main APIs:- CheckResources
- PlanResources
Check if a principal can perform actions on specific resources.Use case: “Can Alice delete document #123?”
Request
Response
RBAC vs ABAC
Cerbos supports both Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC).Role-Based Access Control (RBAC)
Simple role-based rules:RBAC Example
Attribute-Based Access Control (ABAC)
Add conditions for fine-grained control:ABAC Example
Evolution Path
Layer on Conditions
Add attribute-based conditions for granular control without creating role explosion.
Policy Storage
Cerbos supports multiple storage backends for policies:Disk
Local filesystem. Great for development and small deployments.
Git
Pull policies from Git repositories. Ideal for GitOps workflows.
Cloud Storage
S3, GCS, Azure Blob. Scalable policy distribution.
Database
SQLite, PostgreSQL, MySQL. Dynamic policy management.
Putting It All Together
Here’s how all the concepts work together:Define Your Model
Identify your principals (users, services), resources (documents, albums), and actions (read, write, share).
Write Policies
Create resource policies defining who can do what. Add derived roles for dynamic role assignment.
Deploy the PDP
Run Cerbos with your policies. Choose your deployment model (sidecar, service, Lambda).
Make Authorization Calls
From your application, call CheckResources to verify permissions or PlanResources to filter queries.
Next Steps
Try the Quickstart
See these concepts in action with a working example
Explore Policies
Learn policy authoring patterns and best practices
Deploy Cerbos
Choose the right deployment model for your infrastructure
Integration Guide
Integrate Cerbos into your application with SDKs
Questions? Join the Cerbos Slack community or check the full documentation.