liveBook · Manning

Relationship-based access control

As explained in Software Security for Developers

Relationship-based access control, or ReBAC, is an access-control technique that makes authorization decisions from relationships among entities such as users, resources, groups, and projects.

Authorization becomes difficult when access depends on more than a job title. Relationship-based access control (ReBAC) decides whether to allow an action by examining how a user, group, project, or resource is connected to the target. section 17.0 section 17.1.3

An entity is anything that can participate in access control, such as a user, group, document, team, or project. A relationship describes its connection to another entity, such as membership, ownership, responsibility, or sharing. section 17.1.3

ReBAC asks questions such as:

Shared document access

A document-sharing service should not grant access merely because someone has a general viewer role. It can allow viewing when the user owns the document, received an explicit share, or belongs to a team that owns it. The policy therefore follows the document's relationship graph rather than a static role. section 17.1.3

ReBAC is especially useful for:

  • Collaborative features such as shared files, boards, and tasks. section 17.1.3
  • Multitenant applications where customers must see only their own data. section 17.1.3
  • Organizational hierarchies, such as managers viewing direct reports' reports. section 17.1.3
  • Delegation, project-based access, and explicit dynamic sharing. section 17.1.3

In a monolith, relationship data can be loaded locally and checked where the action occurs. In distributed systems, services commonly synchronize ownerships, memberships, and associations to a central relationship store or query an authorization service. section 17.2.1 section 17.2.2

The flexibility has costs. Relationship graphs can become complex, graph traversal or relationship lookups may affect performance, and an unavailable central store can block access checks across otherwise healthy services. High availability and carefully defined relationships are essential. section 17.1.3

How Software Security for Developers covers it

How deep it goes
Explains entities, relationships, use cases, deployment patterns, and tradeoffs, but stops short of full policy implementation.
Examples
Uses shared documents, team ownership, project access, organizational hierarchies, delegation, and central relationship-store queries.
What it assumes
Assumes basic authorization awareness while defining entities, relationships, RBAC, and ABAC in accessible terms.
What you can do after
Evaluate whether relationship-driven authorization fits collaborative, multitenant, hierarchical, or delegated access patterns.
How it connects
Connects authorization with RBAC, ABAC, relationship graphs, multitenancy, delegation, microservices, and centralized authorization services.

Also explained in

Compare how 2 books explain relationship-based access control →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.