Relationship-based access control (ReBAC): how permissions follow user–resource relationships
Learn how ReBAC evaluates direct and indirect relationships, when it complements roles or attributes, and what to verify when relationships change.
Relationship-based access control (ReBAC) decides whether to allow an action by following defined relationships among users, groups, and resources, rather than relying only on a job title or static permission list. A document owner, project member, or group shared with a parent folder might determine who can view a document. ReBAC can fit collaboration services where access varies by resource, but deep graphs or stale links can make it difficult to explain why access was granted and to revoke it.
Permissions are computed through relationships
A ReBAC system typically stores direct relationships between users and objects, as well as relationships among objects. A policy defines how those relationships combine. For example, a direct relationship may say that a user is a viewer of document 7. An indirect path may say that the user belongs to team A and document 7 belongs to team A’s project.
A simplified relationship-tuple notation might look like this:
document#viewer@user
team#member@user
document#parent@project
project#viewer@team#memberThese lines are illustrative: the exact notation and semantics vary by system. The Google Zanzibar paper describes a large-scale system that represents user-object and object-object relationships as tuples and supports nested links to groups and other access lists. Zanzibar is Google’s implementation, not a universal ReBAC specification or a performance guarantee for other systems.
How it differs from RBAC and ABAC
| Model | Core question | Example |
|---|---|---|
| RBAC (role-based) | Which role is assigned to the user? | An accounting reviewer role can read a report |
| ABAC (attribute-based) | Do user, resource, and environment attributes satisfy policy conditions? | Department and data classification match, and a managed device is present |
| ReBAC (relationship-based) | Which relationship path connects the user to the resource? | A project member can read documents belonging to that project |
These models are not mutually exclusive. Roles can express baseline job permissions, attributes can express request-time conditions, and relationships can express user-to-resource connections. Systems may combine them or migrate existing ACLs into a relationship model. Check the actual permission-combination rules and audit evidence rather than assuming capabilities from a model name.
What to decide before adopting ReBAC
**Define relationship types and owners.** Examples include owner, editor, commenter, project member, and parent folder. Decide who may create or change each relationship, and define only relationships with clear business meaning.
**Write down the allow rules.** Specify how direct relationships, inheritance, nested groups, and unions or intersections of relationship sets grant access. If more than one path allows access, removing one relationship may leave another.
**Connect relationship lifecycle to business changes.** Decide how to update relationship tuples, caches, and search indexes when someone leaves a team, sharing is removed, a folder moves, or a project ends.
**Enforce decisions at every service boundary.** The application must consistently call and enforce authorization for reads, edits, and search results. A policy service returning “allow” is ineffective if an app path skips the decision.
**Test direct and indirect paths.** Include access granted, access absent, nested groups, inherited folder relations, a change just made, and data-source failure. Record both the allow/deny outcome and its rationale.
Operational trade-offs
ReBAC can represent sharing among users, documents, folders, and projects directly, reducing the need to create static roles whenever resource access differs. But relationship data and policy become inputs to the authorization decision, so the system needs to explain which path granted access. Nested groups or inherited parent resources can make a check traverse many relationships; latency, cache consistency, and failure handling therefore need design attention.
It matters when relationship changes become visible to authorization checks. The Google Zanzibar paper describes consistency mechanisms that preserve ACL update order and avoid decisions based on data older than a client-specified change. Other systems do not automatically provide the same guarantees. Verify separately how revocation affects search results, download links, already issued tokens, and cached data.
For example, suppose members of a project folder can view every document in it. After removing a user from the project, check that no document-level grant or other group still provides access. Test the change on both new and existing documents, and verify that search and previews apply the same decision. This is a hypothetical design example, not a test result from a real product.
Sources
[Zanzibar: Google’s Consistent, Global Authorization System](https://www.usenix.org/conference/atc19/presentation/pang) — USENIX ATC 2019 paper and PDF.
[NIST SP 800-162: ABAC definition and considerations](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-162.pdf) — baseline definition used for comparison.