guide:access-control-models@en

Guides

ACL, RBAC, ABAC, ReBAC: four ways to say who may do what

One access decision, "can Chen view doc:readme?", modelled as an access control list, as roles, as attribute rules and as a relationship graph, and where Zanzibar sits among them.

Facts checked on Paper sections §1, §2.1, §2.3.1, §3.2.3, §3.2.4, §5

Every authorization system answers the same kind of question: may this user do this to this object? The paper puts it as checking “that a user has permission to carry out an operation on a digital object” (§1). The four common models differ in what they store and what they compute when the question arrives.

In 1971 Butler Lampson described protection as a matrix: rows are domains (in today’s terms, subjects), columns are objects, and each cell lists the access a domain has to an object (Lampson, “Protection”). No real system stores the whole matrix. An ACL stores its columns, roles and attribute rules compute its cells, and a relationship graph derives them by following edges.

This page models one cell four ways. The running example: Anne, Beto and Chen (user:anne, user:beto, user:chen); the document doc:readme in folder:A; the group group:eng. Anne owns the readme, Beto is in eng, eng members view the readme, and Chen views folder A. The decision is:

Can user:chen view doc:readme?

The expected answer is yes, and only because of the folder. Chen has no direct grant on the readme.

ACL: a list on the object

An access control list attaches to each object a list of entries, each a principal and a set of rights. Multics had ACLs “on segments and directories”, with entries made of “a principal identifier and a set of permissions bits” (§5, citing Saltzer’s SOSP ’73 paper, revised as Saltzer 1974). Later systems let an entry name a group, as POSIX ACLs do (§5).

What does the readme’s own list say about Chen?

The ACL of doc:readmeTwo lists side by side. On the left, folder:A with one entry: user:chen · view. On the right, doc:readme with three entries: user:anne · owner, group:eng · view (dashed, a group entry), and user:chen · view. A dashed highlighted arrow labelled copied by the app runs from the folder's Chen entry to the readme's Chen entry.folder:Auser:chen · viewdoc:readmeuser:anne · ownergroup:eng · viewuser:chen · viewcopied by the app
Each object carries its own list. The readme's Chen entry exists only because something copied it from the folder.

The check itself is a lookup: scan the readme’s list for Chen. Notice where the folder went. Inheritance is not part of the ACL model, so the entry has to be copied onto the readme, either when the document is created (VMS “supports ACL inheritance for files created within a directory tree”, §5) or by the application. Once copied, the entry no longer remembers where it came from.

RBAC: users, roles, permissions

Role-based access control puts a layer between users and permissions. In the NIST wording, “RBAC controls all access through roles assigned to users. Each role assigns a collection of permissions to users” (Kuhn, Coyne and Weil 2010). Ferraiolo and Kuhn proposed it in 1992, and a unified NIST model became ANSI INCITS 359-2004 in 2004 (NIST RBAC project).

Roles are global, so a grant on one document needs a role that names that document. The running example becomes three roles:

User Role Permissions the role grants
user:anne readme_owner edit doc:readme, view doc:readme
user:beto eng view doc:readme
user:chen folderA_viewer view folder:A, view doc:readme (and every other document in folder A)

Which role gives Chen the view permission?

Users, roles and permissionsThree columns. Left: user:anne, user:beto, user:chen as pills. Middle: dashed role boxes role:readme_owner, role:eng, role:folderA_viewer, each user assigned to the role on the same row. Right: permissions edit doc:readme, view doc:readme, view folder:A. readme_owner grants edit and view on the readme; eng grants view on the readme; folderA_viewer grants view on folder A and view on the readme. Highlighted: user:chen to role:folderA_viewer to view doc:readme.user:anneuser:betouser:chenrole:readme_ownerrole:engrole:folderA_vieweredit doc:readmeview doc:readmeview folder:Ahashashasgrantsgrantsgrants
Chen holds role:folderA_viewer, and that role's permission set lists view doc:readme.

Notice that the folder survives only as a name. folderA_viewer is not connected to folder:A in any way the system understands; someone has to keep its permission set equal to “everything in folder A”. Per-object roles like readme_owner are the pattern that leads to role explosion, discussed in the table below.

ABAC: a predicate over attributes

Attribute-based access control stores no grants at all. NIST SP 800-162 defines it as a methodology where authorization “is determined by evaluating attributes associated with the subject, object, requested operations, and, in some cases, environment against policy, rules, or relationships” (NIST SP 800-162). The decision is a function of attributes, evaluated at request time.

Here are the running example’s three grants as rules, in the syntax of Cedar, a policy language AWS open-sourced in 2023:

// Anne: the owner may view
permit (principal, action == Action::"view", resource)
when { resource.owner == principal };

// Beto: anyone whose team is listed on the document
permit (principal, action == Action::"view", resource)
when { resource.viewerTeams.contains(principal.team) };

// Chen: anyone listed as a viewer of the document's folder
permit (principal, action == Action::"view", resource)
when { resource.folder.viewers.contains(principal) };

Which attributes does the engine read to decide Chen’s request?

The attributes an ABAC decision readsOn the left, the request: principal user:chen, action view, resource doc:readme. They feed a yellow box, policy evaluation. On the right, four green attribute boxes feed the same evaluation: doc:readme.owner = user:anne, doc:readme.viewerTeams = eng, doc:readme.folder = folder:A, folder:A.viewers = user:chen. The last two are highlighted. Below the evaluation, the decision: permit, highlighted.principaluser:chenactionviewresourcedoc:readmepolicyevaluationpermit(third rule)doc:readme.owner= user:annedoc:readme.viewerTeams= ["eng"]doc:readme.folder= folder:Afolder:A.viewers= [user:chen]decides
The rules are stored once; the facts they test live as attributes on users, documents and folders.

Notice the two highlighted attributes. doc:readme.folder and folder:A.viewers are relationships stored as attribute values, and the rule follows one to reach the other. The rules stay short, but the data has moved into attributes, and nothing outside the rules says which attributes matter for which decision.

ReBAC: a graph of relationships

Relationship-based access control decides from the relationships between the requester and the resource. Fong credits Carrie Gates with coining the term (her 2007 workshop paper was not checked for this page), and Philip Fong’s 2011 model bases decisions “on the relationship between the resource owner and the resource accessor” (Fong 2011). Fong stresses that binary relations compose, as in friends of friends, while a role is a unary predicate that offers little beyond boolean combinations.

Zanzibar stores each relationship as a relation tuple, object#relation@user (§2.1), and a namespace config says how relations combine. The paper’s Figure 1 encodes exactly this example: owners are editors, editors are viewers, and “viewers of the parent folder are also viewers of the document”. The paper does not use the word ReBAC.

How does a graph of stored tuples reach Chen?

Table 1 extended with the folder, Chen's path highlightedThree users on the left. user:anne has an arrow labelled owner to doc:readme. user:beto has an arrow labelled member to the dashed userset group:eng#member, which has an arrow labelled viewer to doc:readme. user:chen has an arrow labelled viewer to folder:A, which has an arrow labelled parent to doc:readme. Highlighted: user:chen, the viewer edge, folder:A, the parent edge and doc:readme, plus a dashed highlighted edge from user:chen to doc:readme labelled viewer (computed).user:anneuser:betouser:chengroup:eng#memberfolder:Adoc:readmeownermemberviewerviewerparentviewer (computed)
Solid edges are stored tuples. The dashed edge is not stored: Check computes it from the parent rule in the namespace config.

Notice that the folder is still a folder here. The readme points at folder:A with a parent tuple, and the rule turns “viewer of the parent” into “viewer of the readme” at check time. The step-by-step walk is on the relation tuples page.

The same example, cell by cell

ACL RBAC ABAC ReBAC (Zanzibar)
What is stored The readme’s list: Anne (owner), group:eng (view), Chen (view, copied from folder A) Three role assignments and three roles’ permission sets Three rules, plus attributes on users, the readme and folder A Five tuples (owner, eng member, eng viewer, parent, folder viewer) and one namespace config
Who can view the readme Read the list and expand group:eng: Anne, Beto, Chen Everyone holding a role that grants “view doc:readme”: Anne, Beto, Chen Not stored anywhere: evaluate the rules for every user. Anne, Beto, Chen Expand doc:readme#viewer (§2.4.5): Anne, Beto, Chen
Beto leaves eng Remove Beto from the group; the readme’s list is untouched Remove Beto’s assignment to eng Change user:beto.team Delete one tuple, group:eng#member@user:beto
The readme moves from folder A to folder B Remove the entries copied from A and copy in B’s, on the readme and on everything else that moved Take “view doc:readme” out of folderA_viewer and add it to a folderB_viewer role Change doc:readme.folder; the rules stay the same Replace one parent tuple: doc:readme#parent@folder:A#... becomes @folder:B#...
What is hard Inheritance and groups are add-ons; “what can Chen see?” means scanning every object’s list Role explosion: “thousands of separate roles”, and n Boolean conditions can need 2ⁿ roles (Kuhn et al.); per-object roles like readme_owner make it worse Auditing: ABAC “is easy to set up, but analyzing or changing user permissions can be problematic” (Kuhn et al.). “Attribute sprawl” is industry shorthand for the same problem, not a NIST term Graph traversal: “Recursive pointer chasing … has difficulty maintaining low latency with groups that are deeply nested or have a large number of child groups” (§3.2.4). SpiceDB caps depth at 50 hops by default, OpenFGA’s resolveNodeLimit at 25

Notice the two middle rows. Beto leaving eng is one change in every model, because every model here has some form of group. The folder move is where they part: ACL and RBAC copied the folder’s meaning into the readme’s grants, so they have to rewrite those grants; ABAC and ReBAC kept the folder as data, so one value changes. ReBAC also keeps “who can view?” answerable from stored data, which the rules-only ABAC version cannot.

Where Zanzibar sits

Zanzibar is a ReBAC system: relation tuples are the edges, and userset rewrite rules (§2.3.1) say how edges combine. Its data model supports “permissions, users, groups, and inheritance” as found in Multics, UNIX, POSIX ACLs and VMS (§5), and it treats a group as just another object, which “allows us to unify the concepts of ACLs and groups” (§2.1).

RBAC fits on top. The paper says roles “are similar to Zanzibar relations” and that “A number of Zanzibar clients have implemented RBAC policies on top of Zanzibar’s namespace configuration language” (§5). It does not say how; one way is to make a role an object whose member relation is a userset.

What does Chen’s role look like in tuples?

A role as a userset in Zanzibaruser:chen has an arrow labelled member to the dashed userset role:folderA_viewer#member. That userset has an arrow labelled viewer to folder:A and another arrow labelled viewer to doc:readme. The path from Chen through the role to doc:readme is highlighted.user:chenrole:folderA_viewer#memberfolder:Adoc:readmememberviewerviewer
Three tuples: role:folderA_viewer#member@user:chen, folder:A#viewer@role:folderA_viewer#member, doc:readme#viewer@role:folderA_viewer#member. An illustration, not from the paper.

Notice that the role is the same shape as group:eng: a userset. In Zanzibar the second viewer edge is unnecessary, because the parent rule already gives folder viewers the readme; the role only needs to be a viewer of the folder.

ABAC is the part the paper does not cover. Conditions on the request, such as time of day or network, are not relations between stored objects. Several Zanzibar-style systems add them: SpiceDB has caveats, conditions written in CEL (SpiceDB schema docs), OpenFGA has conditions, and Permify’s schema has attribute and rule (Permify docs). Cedar goes the other way: an attribute language with in for hierarchy membership (Cedar syntax).

Sources