Policy.schema.json

Cerbos Policy Schema

This document describes the schema for defining policies in Cerbos.

Definitions

Condition

Conditions are used to specify the rules for access decisions.

Constants

Constants are variables that can be reused within the policy.

Derived Roles

Defines a role that can derive permissions from other roles.

Principal Policy

Defines a policy for a specific principal (user/group).

Resource Policy

Defines a policy for a specific resource.

Role Policy

Defines permission rules for a specific role.

Metadata

Additional information about the policy.

Rule Structure

Each rule in the policies can have:

Conditions Example

The following is an example of a matching condition:

These rules and structures can be combined to create comprehensive access control policies in Cerbos.