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.Scopes
Hierarchical containers that define authorization boundaries
Scope Types
Templates that define how scopes behave and inherit permissions
Subjects
Entities that can be granted permissions (users, agents, services)
Roles
Named collections of permissions assigned to subjects
Permissions
Fine-grained access rights for actions on resources
Conditional Permissions
Dynamic access control with JSON Logic expressions
Scope Overrides
Fine-tune inherited permissions at child scopes
Evaluation
How Bedrock decides if an action is allowed
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:
- Resource Policies — Are there explicit allow/deny policies on this resource?
- Resource Hierarchy — Does a parent resource grant access (with cascade)?
- Role-Based Permissions — Does the subject’s role grant the action?
- Conditions — Do JSON Logic conditions on permissions/policies pass?
Key Relationships
| Relationship | Description |
|---|---|
| Subject → Scope | A subject joins a scope via a Membership |
| Membership → Role | A membership is assigned one or more Roles via Role Assignments |
| Role → Permission | A role contains one or more Permissions via Role Permissions |
| Scope → Scope | Scopes form a hierarchy via Scope Hierarchy Edges |
| Scope Type → Scope Type | Scope types define valid parent-child relationships |
Permission Inheritance
Permissions flow down the scope hierarchy:Overrides
Bedrock supports three types of overrides to fine-tune inherited permissions:| Override Type | What it Controls |
|---|---|
| Role Override | Enable/disable an entire role at a child scope |
| Permission Override | Enable/disable a specific permission at a child scope |
| Role-Permission Override | Enable/disable a specific permission for a specific role |
Learn about Scope Overrides
See how to use overrides for fine-grained control