A scope is a container that defines an authorization boundary. Scopes form a hierarchy—like folders in a file system—where permissions can be inherited from parent scopes and optionally overridden at child scopes.Every authorization decision in Bedrock happens within a scope context.
# Get children of a scopecurl -X GET 'https://api.example.com/scopes/scope_acme/children'# Get parents of a scopecurl -X GET 'https://api.example.com/scopes/scope_engineering/parents'
When a subject has a role in a parent scope, they inherit that role’s permissions in all child scopes:
Copy
Organization ─── Subject has "Editor" role here │ ├── Team A ─── Subject inherits "Editor" permissions │ │ │ └── Project X ─── Subject inherits "Editor" permissions │ └── Team B ─── Subject inherits "Editor" permissions
Inheritance flows downward only. Having a role in a child scope does not grant access to parent scopes.
Roles are defined at a specific scope and can be used in that scope and its descendants:
Copy
# Create a role at the organization levelcurl -X POST 'https://api.example.com/roles' \ -H 'Content-Type: application/json' \ -d '{ "name": "Editor", "description": "Can read and write documents", "scopeId": "scope_acme" }'
This “Editor” role can now be assigned to memberships in:
scope_acme (where it’s defined)
Any descendant scope (teams, projects, environments)