What is a Scope?
A scope is a container that defines an authorization boundary. Scopes form a hierarchy—like folders in a file system. Whether a subject’s grants flow down that hierarchy is controlled by each scope type’spermissionMode: under the default override mode a membership is evaluated at exactly the scope you ask about, while inherit and additive compose grants up the ancestor chain. The hierarchy is also used for cascading scope overrides and for resource inheritance.
Every authorization decision in Bedrock happens within a scope context.
Scope Properties
Scope Hierarchy
Scopes connect to form a tree structure via hierarchy edges:Creating Hierarchy Edges
Querying the Hierarchy
Membership and permissionMode
How a subject’s memberships combine across the hierarchy is governed by the request scope’s permissionMode.
override (the default). Bedrock looks up the subject’s memberships at exactly the requested scope—it does not walk up the hierarchy. A role granted at a parent scope does not apply at child scopes:
override, to grant a subject access across multiple scopes you create a membership (and role assignment) at each scope where access is needed—granular, per-location control, so holding a role at an organization does not silently grant the same power beneath it.
inherit / additive. Scopes whose type uses these modes do draw on ancestor grants: inherit falls back to the nearest ancestor that has grants, and additive unions the scope’s grants with all ancestors. A role held at a parent scope then reaches descendants of that type. Choose the mode per scope type—see Scope Types.
Membership composition is one axis. Resource hierarchy (
cascade: 'inherit') and scope overrides traverse ancestors independently of permissionMode. See Evaluation and Scope Overrides.Scope-Specific Roles
Roles are defined at a specific scope and can be used in that scope and its descendants:scope_acme(where it’s defined)- Any descendant scope (teams, projects, environments)
Scope-Specific Permissions
Permissions are also scoped. A permission defined at a parent scope is available to roles in that scope and all descendants:External IDs
UseexternalId to map Bedrock scopes to entities in your system:
Scope Metadata
Store custom data on scopes using themeta field:
Common Patterns
Pattern 1: Multi-Tenant Isolation
Each tenant gets its own scope tree:Pattern 2: Environment Separation
Separate permissions by environment:Pattern 3: Department-Based Access
Organize by organizational structure:API Reference
Create Scope
Create a new scope
Get Scope Children
Get child scopes
Create Hierarchy Edge
Link scopes in hierarchy
All Scope Endpoints
View all scope operations
Next Steps
Scope Types
Learn how scope types define the rules for your hierarchy