Skip to content

RBAC vs ABAC vs ReBAC: Access Control Models Explained with Diagrams

How RBAC, ABAC and ReBAC answer the same access question from different data, where PEP and PDP fit, which tools to use and how to combine the models.

· Founder & developer

Published

Three frames. RBAC: Alice is assigned the editor role, which grants document edit. ABAC: Alice's request goes through an API gateway (PEP) to a decision point that reads an attribute store and a policy. ReBAC: Alice, team, folder and document linked by relations.

Your app shipped with two roles, admin and member. Then sales needed read-only access, contractors needed to edit one project only, and legal wanted archived documents locked. A year later there are dozens of roles, a few hard-coded user IDs, and nobody can say who may edit what.

Role-based (RBAC), attribute-based (ABAC) and relationship-based access control (ReBAC) all decide whether a subject may perform an action on a resource, but they decide from different data, and that shapes your schema, audits and latency.

This post walks one example through all three, compares them, and covers the policy architecture (PEP, PDP, PIP, PAP), tools, combinations and pitfalls.

One question, three models

The running example: Alice, a product manager, wants to edit the Q3 roadmap document.

RBAC: roles bundle permissions

Role-based access control assigns permissions to roles and roles to users. David Ferraiolo and Rick Kuhn of NIST formalized it in 1992; the NIST model became the ANSI/INCITS 359 standard in 2004, revised in 2012.

Alice holds the editor role and editor grants document:edit, so she may edit. The check is a set lookup, and "who can edit documents?" is a list of editors.

The catch is scope: the role grants edit on every document, not just this one. Expressing "editors of the product team's documents" takes a role per team, then per team and region. This is the role explosion that NIST SP 800-162 warns about.

ABAC: policies over attributes

Attribute-based access control evaluates attributes of the subject, the object, the operation and sometimes the environment against policy, as defined in NIST SP 800-162 (2014, updated 2019). The roadmap rule in Cedar:

permit (
  principal,
  action == Action::"edit",
  resource
)
when {
  principal.department == resource.department &&
  resource.state != "archived"
};

Alice and the roadmap both belong to the product department and the document is a draft, so the request is allowed. Nothing lists Alice as an editor; the decision is computed when she asks, and time, network or device posture fit in as environment attributes.

The cost is visibility: answering "who can edit the roadmap?" means evaluating the policy for every user, and a stale attribute silently grants or removes access.

ReBAC: relationships form a graph

Relationship-based access control stores facts such as "Alice is a member of the product team" and derives permissions by following them. Google described the approach at scale in the Zanzibar paper (USENIX ATC 2019): tuples written as object#relation@user, more than two trillion ACLs, millions of checks per second, a 95th-percentile latency under 10 ms and over 99.999% availability across three years. The same rules as an OpenFGA model:

model
  schema 1.1

type user

type team
  relations
    define member: [user]

type folder
  relations
    define editor: [user, team#member]

type doc
  relations
    define parent: [folder]
    define editor: [user, team#member] or editor from parent

Three tuples connect Alice to the roadmap: user:alice is a member of team:product, team:product#member is an editor of folder:plans, and folder:plans is the parent of doc:q3-roadmap. The check walks that path. Reverse questions such as "which documents can Alice edit?" are built-in queries (ListObjects in OpenFGA, LookupResources in SpiceDB). The price: every relationship a check needs must be written to the authorization store and kept in sync with your database.

RBAC vs ABAC vs ReBAC compared

RBAC ABAC ReBAC
Decides from Roles the user holds User, resource, action and environment attributes Stored relationships
Granularity Per role and resource type Any attribute, including time and network Per object, inherited through groups and parents
Who can access X? Easy: list role members Hard: evaluate the policy for every user Built in: reverse queries
Scaling pain Role count Attribute lookups per request Relationship volume and data sync
Typical change Assign or revoke a role Edit and test a policy Write or delete a tuple
Typical tools Kubernetes RBAC, cloud IAM roles OPA (Rego), Cedar, XACML engines OpenFGA, SpiceDB
Good fit Admin consoles, internal tools Regulated data, context rules Collaboration apps, multi-tenant SaaS

PEP, PDP, PIP and PAP: the policy architecture

Once authorization leaves application code, four components appear, whatever the model. The terms come from XACML; NIST SP 800-162 defines them:

Component Job (NIST SP 800-162) Usually runs in
PEP, policy enforcement point Enforces the decision; does not decide API gateway, middleware, sidecar proxy
PDP, policy decision point Evaluates the applicable policies OPA, Cedar, an OpenFGA or SpiceDB server
PIP, policy information point Supplies attributes the PDP needs Identity provider, HR system, resource database
PAP, policy administration point Creates, manages, tests and stores policies Policy repository with review and CI

In ReBAC, the relationship store acts as the PIP and the check API as the PDP. The PEP-to-PDP call also has a standard now: AuthZEN Authorization API 1.0 from the OpenID Foundation, a final specification dated January 11, 2026. The PEP sends subject, action, resource and context; the PDP answers {"decision": true} or false:

POST /access/v1/evaluation HTTP/1.1
Content-Type: application/json

{
  "subject": { "type": "user", "id": "alice", "properties": { "department": "product" } },
  "action": { "name": "edit" },
  "resource": { "type": "document", "id": "q3-roadmap" },
  "context": { "time": "2026-11-04T10:42:00Z" }
}

Make the PEP fail closed when the PDP is unreachable, and log each decision with its inputs.

Tools: OPA, Cedar, OpenFGA and SpiceDB

At the time of writing (November 2026):

  • OPA is a general-purpose policy engine and a graduated CNCF project: your service sends JSON input, and a Rego policy returns the decision. It suits ABAC and teams that also need Kubernetes and infrastructure policy.
  • Cedar is an open source authorization language, and Amazon Verified Permissions is the managed AWS service built on it. Cedar's authorization algorithm denies by default, and any matching forbid overrides every permit.
  • OpenFGA is a Zanzibar-inspired CNCF project, incubating since October 2025. Its docs cover ReBAC plus conditions and contextual tuples for ABAC cases.
  • SpiceDB is open source and Zanzibar-inspired too, with its own schema language.

Combining models

Most systems mix models:

  • Roles plus attributes. Keep roles for the coarse question and attributes to narrow it, such as same department or managed devices only. In Cedar that is principal in Role::"editor" in the policy scope plus a when condition.
  • Relationships plus conditions. OpenFGA has conditional relationship tuples; SpiceDB has caveats, CEL expressions that decide at check time whether a relationship counts. Typical uses are expiring grants and IP allowlists.
  • Roles as relationships. In ReBAC a role is a relation on an object, such as organization#admin, so per-tenant roles come for free; see the multi-tenant SaaS architecture diagram.

Tokens are no substitute: a JWT can carry roles and a tenant ID, not every document a user may edit, and it stays valid after revocation (see the JWT authentication flow and OAuth 2.0 flows).

Pitfalls

  • Role explosion. Encoding department (8 values), region (4) and seniority (3) in role names takes 8 × 4 × 3 = 96 roles for one rule over three attributes. A role name containing a value, such as editor-product-emea, is an attribute in disguise.
  • Untestable policies. Keep policies in version control with review and unit tests for allowed and denied cases; OPA ships opa test, and Cedar validates policies against a schema.
  • Slow attribute lookups. Three sequential 5 ms attribute fetches add 15 ms to every check; a list page checking 50 documents one by one waits 750 ms. Pass attributes the PEP already has, batch checks (AuthZEN defines a batch request), cache stable attributes, and filter lists with reverse queries.
  • Stale decisions. Remove Bob from a folder, add a document, and a stale replica may still let him read it. Zanzibar calls this the new enemy problem and solves it with zookies, tokens that force ACL data at least as fresh as a content version.
  • Checks only at the edge. A gateway that checks the route but not the object lets an editor swap the document ID. OWASP ranks broken object level authorization first in its 2023 API Security Top 10.

The access control models diagram

Three frames. RBAC: Alice is assigned the editor role, which grants document edit. ABAC: Alice's request goes through an API gateway (PEP) to a decision point that reads an attribute store and a policy. ReBAC: Alice, team, folder and document linked by relations.

19 components · 11 connections

Open in Archboard
Diagram contents
  • RBAC: roles grant permissions
  • ABAC: policies over attributes
  • ReBAC: relationships form a graph
  • Alice
  • Role: editor
  • Permission: document:edit
  • API gateway (PEP)
  • Attribute store (PIP)
  • Decision point (PDP)
  • team:product
  • folder:plans
  • doc:q3-roadmap
  • assigned
  • grants
  • edit q3-roadmap
  • subject, action, resource
  • allow or deny
  • attributes
  • policies
  • member of
  • editor of
  • parent of
  • can edit (derived)
One question, can Alice edit the Q3 roadmap, answered three ways: RBAC follows her role to a permission, ABAC asks a decision point to evaluate a policy over attributes, and ReBAC follows stored relationships to the document.

How to read it:

  • One question, three frames, each answering whether Alice can edit the Q3 roadmap.
  • RBAC: Alice is assigned the editor role, which grants document:edit on every document.
  • ABAC: the API gateway (PEP) sends subject, action and resource to the decision point (PDP), which reads attributes from the PIP and the policy from the PAP, then returns allow or deny. The dashed policy edge means policies are loaded ahead of time.
  • ReBAC: solid edges are stored relationships from Alice to the document; the dashed edge is the permission the engine derives.

Drawing access control diagrams clearly

  • Ask one concrete question. "Can Alice edit the Q3 roadmap?" makes every arrow checkable.
  • Name the relation or attribute on every edge.
  • Separate stored from derived: solid for facts you write, dashed for computed permissions and asynchronously loaded policies.
  • Show where enforcement happens, so reviewers can confirm every path to the data passes a PEP. The API gateway architecture diagram shows the usual placement; the zero trust architecture diagram uses the same PEP and decision point split from NIST SP 800-207.
  • Leave out full policy text, every role and sign-in; authentication gets its own diagram, like the OpenID Connect flow or a SAML SSO login sequence.
  • Common mistakes: roles drawn as people, authentication mixed into authorization, and no sync path feeding the PDP.

Build it in Archboard

  1. Sign in with Google or GitHub and create a diagram.
  2. Add three Frame nodes from the Core pack for RBAC, ABAC and ReBAC, tinted blue, amber and green.
  3. In the RBAC frame, add a Person from the C4 Model pack for Alice, a Core Box for the editor role and a Policy from the Security pack for document:edit, joined by edges labeled assigned and grants.
  4. In the ABAC frame, add a Person, an API Gateway from the Cloud pack as the PEP, a Policy as the PDP, a Database from the C4 Model pack as the PIP and a Markdown block from the Core pack with the policy. Draw the request, decision and attribute edges, and a dashed edge from the policy to the PDP.
  5. In the ReBAC frame, add a Person, two Core Box nodes for team:product and folder:plans and a Document from the Flowchart pack. Label the edges member of, editor of and parent of, and add a dashed orthogonal edge from Alice to the document.
  6. Add a Core Text with the takeaway under each frame and the question across the top.

Already sketching in Mermaid? The Mermaid to editable diagram tool turns a flowchart into an editable first draft.

The example uses 15 diagram nodes, within the Free plan.

FAQ

What is the difference between RBAC and ABAC? RBAC grants permissions through the roles a user holds. ABAC evaluates a policy over user, resource, action and environment attributes at request time, so one rule can replace many narrow roles.

What is relationship-based access control (ReBAC)? ReBAC derives permissions from stored relationships, such as team membership or the folder that contains a document. Google's Zanzibar made it well known; OpenFGA and SpiceDB follow the same design.

Is ReBAC better than RBAC? Not in general. ReBAC fits per-object sharing and nested resources; RBAC is simpler to run and audit when a few roles cover your rules.

What are PEP, PDP, PIP and PAP? The enforcement point allows or blocks the request, the decision point evaluates policies, the information point supplies attributes, and the administration point is where policies are written, tested and stored. NIST SP 800-162 defines all four.

What is policy-based access control (PBAC)? A label for authorization where centrally managed policies, evaluated by a decision point, replace checks scattered through the code. It overlaps heavily with ABAC and has no separate standard of its own.

Start free — one seat, no credit card.

Related posts

← Back to blog

Open a canvas in a minute

Sign in with Google or GitHub. Free for a single seat. Upgrade when the team joins.