Skip to main content

Overview

Bedrock is an authorization engine built around a few core primitives that compose together to create flexible, hierarchical access control. Understanding these concepts is essential before diving into implementation.

The Bedrock Model

At its core, Bedrock answers one question:
Can this subject perform this action on this resource in this scope?
To answer this, Bedrock evaluates in order:
  1. Resource Policies — Are there explicit allow/deny policies on this resource?
  2. Resource Hierarchy — Does a parent resource grant access (with cascade)?
  3. Role-Based Permissions — Does the subject’s role grant the action?
  4. Conditions — Do JSON Logic conditions on permissions/policies pass?
                    ┌─────────────────────┐
                    │  Resource Policies  │ ◀── Highest priority
                    └──────────┬──────────┘

                    ┌──────────▼──────────┐
                    │ Resource Hierarchy  │ ◀── Inherit from parents
                    └──────────┬──────────┘

                    ┌──────────▼──────────┐
Subject ──membership──▶ Scope ──▶ Role ──▶ Permission
                    └─────────────────────┘

Key Relationships

RelationshipDescription
Subject → ScopeA subject joins a scope via a Membership
Membership → RoleA membership is assigned one or more Roles via Role Assignments
Role → PermissionA role contains one or more Permissions via Role Permissions
Scope → ScopeScopes form a hierarchy via Scope Hierarchy Edges
Scope Type → Scope TypeScope types define valid parent-child relationships

Permission Inheritance

Permissions flow down the scope hierarchy:
Organization (defines: Admin, Editor, Viewer roles)

    ├── Team A (inherits roles, can override)
    │       │
    │       └── Project X (inherits from Team A)

    └── Team B (inherits roles, can override)

            └── Project Y (inherits from Team B)
A subject with the “Editor” role at the Organization level has Editor permissions in all child scopes—unless an override modifies that behavior.

Overrides

Bedrock supports three types of overrides to fine-tune inherited permissions:
Override TypeWhat it Controls
Role OverrideEnable/disable an entire role at a child scope
Permission OverrideEnable/disable a specific permission at a child scope
Role-Permission OverrideEnable/disable a specific permission for a specific role

Learn about Scope Overrides

See how to use overrides for fine-grained control

Next Steps