Documentation

Docs / Related work

Zanzibar, OpenFGA and SpiceDB (relationship-based access control)

What it is

Zanzibar is Google's global authorization service (USENIX ATC 2019). It stores relations between objects and users and answers "does user U have relation R to object O". OpenFGA (from Auth0/Okta, now a CNCF project) and SpiceDB (from AuthZed) are open-source systems modelled on it. This family is called relationship-based access control (ReBAC).

Model

  • Entities: objects with a type (namespace) and users or usersets. Everything is stored as relation tuples object#relation@user, where the user may be a userset such as group:eng#member.
  • Rule forms: per type, a configuration of "userset rewrites". A relation is the union, intersection or exclusion of: direct tuples, another relation on the same object (editor implies viewer), and a relation reached through another object (viewer of the parent folder).
  • SpiceDB adds caveats (conditions written in CEL, checked against the request's context) and relationship expiration. OpenFGA adds conditions (also CEL) and contextual tuples sent with a request.
  • Combining: set algebra over the graph. Exclusion (but not) is the only form of forbid.
  • Default: deny. No path, no access.
  • Consistency: Zanzibar's "zookies" make sure a check is evaluated at a snapshot at least as new as the content it protects (the "new enemy" problem).

Formal semantics and what is proved

  • The semantics is graph reachability with set operations. Without exclusion it is monotone and is a small Datalog program. Exclusion makes it non-monotone but stratified.
  • The papers give no proofs. Formal theory of ReBAC exists separately (Fong 2011; Crampton and Sellwood 2014), not tied to these systems.
  • Tools: model tests and assertions files (OpenFGA, SpiceDB). No equivalence or implication analysis.
  • Performance: Google reports under 10 ms at the 95th percentile over trillions of tuples.

Purpose and use case

None. Could be modelled as a relation (usecase:x#member@user:y), but then it is just another group.

Uncertainty

None.

History and state

Tuples change over time and checks are at a snapshot. No disclosure history.

What we can reuse

  • Storing permissions as typed edges in a graph, found from the request's entities. This is the closest existing match to "retrieve rules touching the request's entities" in a graph store's hypergraph.
  • Rewrites for hierarchies (folder to document, team to department) as the only recursion allowed.
  • Snapshot consistency (zookies) for the question "which version of the rules decided this".

What it lacks for us

  • Binary relations only. A rule that joins person, use case, asset class and form at once has to be reified as an object.
  • Only allow/deny, a weak forbid, no form, no caps, no purpose.
  • No formal semantics or proofs in the systems themselves.

Key references

  • Pang et al., "Zanzibar: Google's Consistent, Global Authorization System", USENIX ATC 2019. https://www.usenix.org/conference/atc19/presentation/pang
  • OpenFGA documentation. https://openfga.dev/docs
  • SpiceDB documentation (schema, caveats). https://authzed.com/docs
  • Fong, "Relationship-based access control: protection model and policy language", CODASPY 2011. https://cspages.ucalgary.ca/~pwlfong/Pub/codaspy2011.pdf

Last built 2026-11-25