Overview
User governance in Bedrock follows a hierarchical Role-Based Access Control (RBAC) model. Users are added to scopes via memberships, assigned roles, and inherit permissions from those roles. This guide covers common patterns for managing user access.Core Concepts
Subjects
Users are registered as subjects with
subjectType: "user"Memberships
Memberships connect users to scopes
Roles
Roles group permissions together
Permissions
Permissions define specific actions
Example: Enterprise Organization
Let’s set up a typical enterprise structure with organizations, departments, and teams.1. Define the Hierarchy
2. Create Scopes
3. Define Roles at Different Levels
Roles can be defined at any scope level and then assigned to memberships at that scope or any child scope (assignment is explicit—defining a role higher up does not grant it automatically lower down):4. Add Users with Different Access Levels
Inline Memberships: When creating subjects, you can include
memberships with roleIds to create the subject, membership, and role assignments in a single request.Common Patterns
Pattern 1: Multiple Team Membership
Users can belong to multiple teams with different roles:Pattern 2: Restricting Inherited Permissions
Use scope overrides to restrict permissions at child scopes:Pattern 3: Temporary Elevated Access
Assign additional roles for temporary access:Memberships and permissionMode
Whether access flows down the scope hierarchy depends on the request scope’s permissionMode. Under the default override mode, Bedrock evaluates a subject’s memberships at the exact scope of the request—a membership at an override scope does not grant access beneath it:
inherit or additive (like the Department and Team above) do draw on ancestor grants.
Under
override, to give a user access across several scopes, create a membership (and role
assignment) at each scope. Separately, resource hierarchies cascade via
cascade: 'inherit' regardless of permissionMode. See Scope Types,
Scopes, and Evaluation.Best Practices
Use descriptive role names
Use descriptive role names
Name roles based on their function, not the person. Use “Engineering Manager” instead of “Sarah’s Role”.
Define permissions at the highest applicable level
Define permissions at the highest applicable level
Create permissions at the organization level if they apply across the organization. This makes them available to all child scopes.
Use scope overrides sparingly
Use scope overrides sparingly
Overrides add complexity. Design your role structure to minimize the need for overrides.
Audit regularly
Audit regularly
Periodically review memberships and role assignments to ensure they’re still appropriate.
Next Steps
Agent Governance
Apply similar patterns to AI agents
Scope Overrides
Fine-tune inherited permissions