What is a Permission?
A permission defines a specific access right: the ability to perform an action on a resource type matching a pattern. Permissions are the atomic units of access control in Bedrock.Permission Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
scopeId | string | Scope where this permission is defined |
action | string | The action being permitted (e.g., read, write, delete) |
resourceType | string | Type of resource (e.g., document, project, user) |
resourcePattern | string | Pattern matching specific resources (* for all) |
key | string | Derived unique key: {resourceType}:{action}:{resourcePattern} |
label | string? | Human-readable name |
description | string? | What this permission allows |
logic | Record<string, unknown>? | Conditional rules (JSON Logic) |
Creating Permissions
Permission Keys
Thekey field uniquely identifies a permission within a scope. The convention is:
document:read:*— Read any documentdocument:write:*— Write any documentdocument:delete:*— Delete any documentuser:manage:*— Manage any userreport:export:financial— Export financial reports
Actions
Actions describe what can be done. Common patterns:CRUD Actions
Domain-Specific Actions
Resource Types
Resource types categorize what the permission applies to:Resource Patterns
Patterns specify which resources the permission applies to:| Pattern | Meaning |
|---|---|
* | All resources of this type |
{id} | A specific resource by ID |
owned | Resources owned by the subject |
{category}/* | Resources in a category |
Conditional Permissions
Use thelogic field to add conditions using JSON Logic:
Based on Subject Metadata
Based on Resource Tags
Time-Based Conditions
Permission Inheritance
Permissions defined at a parent scope are available in all child scopes:Permission Overrides
You can disable a permission at a child scope:Connecting Permissions to Roles
Permissions are granted to subjects through roles:Common Permission Patterns
Tiered Access
Agent Restrictions
Feature Flags as Permissions
API Reference
Create Permission
Create a new permission
Get Permissions by Scope
List permissions in a scope
Create Role Permission
Add permission to a role
Permission Overrides
Override permissions at child scopes