Cerbos is a free, open source application security project written in Go and released under Apache-2.0. It has 4,588 GitHub stars, 211 forks and 57 open issues, and was last pushed 8 hours ago. On this registry it ranks #7 of 16 tracked projects in Application Security, with 5 head-to-head comparisons available. It gained 5 stars over the last 6 tracked days.

What is Cerbos?

What it is

Cerbos is an open-core authorization management platform written in Go under the Apache-2.0 license. It provides an authorization layer for applications, gateways, workloads, and AI agents, and it operates as a Policy Decision Point that evaluates access rules and returns decisions. The project lives in the Go and cloud-native application security ecosystem, with Kubernetes, serverless, and edge deployment support reflected in its facts.

It solves the problem of placing fine-grained, context-aware access control outside application code. Instead of embedding authorization checks in each service, teams write YAML policies for resources, actions, and principals, then deploy and update those policies through Git-ops infrastructure. Cerbos exposes APIs that ask whether a principal may perform an action on a resource or which resources of a kind a principal may access, so applications can make dynamic decisions without owning the full policy engine.

Key capabilities

  • Defines access rules as YAML policies for principals, actions, and resources, with a structured resource-policy format.
  • Runs a stateless Policy Decision Point that executes policies and serves decision APIs.
  • Provides CheckResources and PlanResources APIs for single-resource authorization checks and resource-kind query planning.
  • Stores policies on disk, in cloud object stores, in Git repositories, or in supported databases, and monitors those sources.
  • Deploys as a Kubernetes service, Kubernetes sidecar, systemd service, or AWS Lambda function.
  • Offers client SDKs and query plan adapters that convert PlanResources responses into query instances.
  • Supports attribute-based rules through conditions and derived roles, extending simple RBAC with runtime contextual data.

Who uses it and how

  • Self-hosted teams run a Cerbos PDP and call it from application services to decide access before acting.
  • Git-ops teams store policies in repositories and update the PDP fleet through existing release workflows.
  • Kubernetes platform teams deploy Cerbos as a service or sidecar near application workloads.
  • Serverless and edge teams run Cerbos as an AWS Lambda function or integrate it into serverless deployments.
  • Product teams use Cerbos Hub to collaborate in private playgrounds, distribute policy updates, and build policy bundles for client-side or in-browser authorization.

Getting started

Teams can set up a self-hosted Policy Decision Point from this repository and deploy it as a Kubernetes service or sidecar, a systemd service, or an AWS Lambda function. They can also use a Cerbos Hub account to author, share, and distribute policies to self-hosted PDPs.

When to use it — and when not to

Use Cerbos when authorization needs to be centralized, policy-driven, and fine-grained across services, gateways, workloads, or AI agents, especially when RBAC must be extended with attributes. Avoid it when an application needs only simple role checks and cannot justify operating a separate PDP, policy storage, and deployment pipeline. The facts list zero contributors, 57 open issues, and a repo age of 0 years, so self-hosters should weigh those signals against running the service.

project readme (upstream, from github) — read inline

GitHub release (latest SemVer) Snapshots Go Report Card Contributor Covenant

Cerbos

What is Cerbos?

Cerbos is an authorization layer that evolves with your product. It enables you to define powerful, context-aware access control rules for your application resources in simple, intuitive YAML policies; managed and deployed via your Git-ops infrastructure. It provides highly available APIs to make simple requests to evaluate policies and make dynamic access decisions for your application.

This repo has everything you need to set up a self-hosted Cerbos Policy Decision Point (PDP). Sign up for a free Cerbos Hub account to streamline your policy authoring and distribution workflow to self-hosted PDPs.

With Cerbos Hub you can:

  • Collaborate with colleagues to author and share policies in fully-interactive private playgrounds
  • Quickly and efficiently distribute policy updates to your whole PDP fleet
  • Build special policy bundles for client-side or in-browser authorization
  • Easily integrate with Cerbos in serverless and edge deployments

Key concepts, at a glance 👀

PRINCIPAL: oftentimes just the "user", but can also represent: other applications, services, bots or anything you can think of. The "thing" that's trying to carry out an... ↙️

ACTION: a specific task. Whether to create, view, update, delete, acknowledge, approve... anything. The principal might have permission to do all actions or maybe just one or two. The actions are carried out on a... ↙️

RESOURCE: the thing you're controlling access to. It could be anything, e.g., in an expense management system; reports, receipts, card details, payment records, etc. You define resources in Cerbos by writing... ↙️

POLICIES: YAML files where you define the access rules for each resource, following a simple, structured format. Stored either: on disk, in cloud object stores, git repos, or dynamically in supported databases. These are continually monitored by the... ↙️

CERBOS PDP: the Policy Decision Point: the stateless service where policies are executed and decisions are made. This runs as a separate process in kube (as a service or a sidecar), directly as a systemd service or as an AWS Lambda function. Once deployed, the PDP provides two primary APIs...

  • CheckResources: "Can this principal access this resource?"
  • PlanResources: "Which of resource kind=X can this principal access?"

These APIs can be called via cURL, or in production via one of our many... ↙️

SDKs: you can see the list here. There are also a growing number of query plan adapters to convert the SDK PlanResources responses to a convenient query instance.

RBAC -> ABAC: If simple RBAC doesn't cut it, you can extend the decision-making by implementing attribute based rules. Implement conditions in your resource policies which are evaluated dynamically at runtime using contextual data, for much more granular control. Add conditions in derived roles to extend the RBAC roles dynamically. Or use principal policies for more particular overrides for a specific user.

CERBOS HUB: A cloud-hosted control plane to streamline your Cerbos PDP deployment. Includes a comprehensive CI/CD solution for testing and distributing policy updates securely and efficiently, collaborative private playgrounds for quick prototyping and experimentation, and an exclusive Embedded PDP solution for deploying your policies to browsers and serverless/edge applications.

How Cerbos PDP works with your application:

Cerbos

Learn more about how Cerbos PDP and Cerobs Hub work together to solve your authorization headaches here.

Learn more

Used by

Cerbos is popular among large and small organizations:

Cerbos

Using Cerbos? Let us know by emailing [email protected].

Installation

Examples

Resource policy

Write access rules for a resource.

---
apiVersion: api.cerbos.dev/v1
resourcePolicy:
  importDerivedRoles:
    - common_roles
  resource: "album:object"
  version: "default"
  rules:
    - actions: ['*']
      effect: EFFECT_ALLOW
      derivedRoles:
        - owner

    - actions: ['view', 'flag']
      effect: EFFECT_ALLOW
      roles:
        - user
      condition:
        match:
          expr: request.resource.attr.public == true

    - actions: ['view', 'delete']
      effect: EFFECT_ALLOW
      derivedRoles:
        - abuse_moderator
Derived roles

Dynamically assign new roles to users based on contextual data.

---
apiVersion: "api.cerbos.dev/v1"
derivedRoles:
  name: common_roles
  definitions:
    - name: owner
      parentRoles: ["user"]
      condition:
        match:
          expr: request.resource.attr.owner == request.principal.id

    - name: abuse_moderator
      parentRoles: ["moderator"]
      condition:
        match:
          expr: request.resource.attr.flagged == true
API request
cat <<EOF | curl --silent "http://localhost:3592/api/check/resources?pretty" -d @-
{
  "requestId": "test01",
  "includeMeta": true,
  "principal": {
    "id": "alicia",
    "roles": [
      "user"
    ]
  },
  "resources": [
    {
      "actions": [
        "view"
      ],
      "resource": {
        "id": "XX125",
        "kind": "album:object",
        "attr": {
          "owner": "alicia",
          "public": false,
          "flagged": false
        }
      }
    }
  ]
}
EOF
API response
{
  "requestId": "test01",
  "results": [
    {
      "resource": {
        "id": "XX125",
        "kind": "album:object",
        "policyVersion": "default"
      },
      "actions": {
        "view": "EFFECT_ALLOW"
      },
      "meta": {
        "actions": {
          "view": {
            "matchedPolicy": "resource.album_object.vdefault"
          }
        },
        "effectiveDerivedRoles": [
          "owner"
        ]
      }
    }
  ]
}

Client SDKs

Query plan

readme truncated — read the full docs on github

Frequently asked questions

Is Cerbos free to use?

Cerbos is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Cerbos do?

Secure, policy-based access control for modern applications

What is Cerbos written in?

Cerbos is primarily written in Go. Its source is publicly available at https://github.com/cerbos/cerbos, and it has 4,588 GitHub stars.