Access Control Models

The data an authorization decision reasons over: an ACL on the object, a role on the subject (RBAC), attributes of subject, resource and environment (ABAC), or the relationship graph between them (ReBAC/Zanzibar). Choosing the wrong one produces the gaps attackers exploit.

How it works

ModelDecision inputBreaks down whenSecurity-relevant failure
ACLper-object list of principalsmany objects, sharing, inheritanceorphaned entries after re-org/offboarding
RBACrole → permissionsownership, per-tenant scope, exceptionsrole explosion; coarse roles answer “may edit invoices” but not “this invoice”. Exactly the gap BOLA lives in
ABAC (NIST SP 800-162)attributes of subject, object, action, environmentattribute provenance unclearattacker-influenced attributes; business and security attributes mixed without an owner
ReBACgraph of relations (owner, member, parent)data must be kept in sync with app DBstale tuples, the “new enemy” problem
PBACpolicy evaluated by a central enginen/a. This is architecture, not a modelsee Authorization Policy Engines

The IDPro taxonomy argues that “RBAC/ABAC/PBAC” conflate different questions. Describe a system as a tuple over six axes: administration (who writes rules), model (what data drives the decision), policy (rule format), information (where decision data comes from), decision (where it’s computed; PBAC lives here), and enforcement (where it’s applied: gateway, middleware, DB). When reviewing a design, the information and enforcement axes are where most exploitable bugs sit.

RBAC to ABAC in practice

AWS IAM condition keys are ABAC bolted onto RBAC. One policy replaces a role per department:

{"Effect":"Allow","Action":["ec2:StartInstances","ec2:StopInstances"],"Resource":"*",
 "Condition":{"StringEquals":{"ec2:ResourceTag/Department":"${aws:PrincipalTag/Department}"}}}

The security of this rests entirely on who can set Department tags. Attribute write access is privilege.

ReBAC and Zanzibar

Google Zanzibar (behind Drive and hundreds of other Google services) stores relation tuples <object>#<relation>@<user>, e.g. file123#owner@alice, and computes permissions by graph traversal. It serves >2 trillion ACLs, with 95% of checks under 10 ms and 99.999% availability. API: read, write, watch, check, expand. Open implementations: SpiceDB, OpenFGA, Permify.

New enemy problem: Alice removes Bob from a folder, then adds a sensitive doc. If the check runs on a replica that hasn’t seen the removal, Bob reads the new doc. Zanzibar fixes this with zookies, opaque tokens encoding the write timestamp, stored with content versions and passed on later checks so evaluation uses data “no older than” that snapshot.

Dual-write consistency: relationships live in both the app DB and the authz store. SpiceDB patterns: 2PC-like (DB commit only if the SpiceDB write succeeds), CQRS streaming through Kafka, or async updates where staleness is acceptable. Every async path is a window where revoked access still checks true.

OpenFGA positions ReBAC as a superset of RBAC (roles are just relations) and adds conditions and contextual tuples to cover ABAC-style cases. OWASP’s Authorization Cheat Sheet explicitly recommends ABAC/ReBAC over RBAC for object-level decisions.

Defenses / design guidance

  • Use RBAC for coarse function gates (Function Level Authorization) and ReBAC/ABAC for object and tenant scope (Insecure Direct Object Reference, Multi-Tenant Isolation).
  • Avoid the all-powerful admin role; it becomes the single point of compromise.
  • Give every attribute and relation an owner and a source of truth. Make explainability (“why does X have access?”) a requirement.
  • Wire revocation into lifecycle events (offboarding, re-org, role change) and propagate it synchronously, or carry consistency tokens.
  • Measure P95 authz-check latency. Slow checks get cached, and caches go stale.

Sources