The paper describes a system built for “billions of objects shared by billions of users” (§1). Most applications are smaller, and the question readers ask most often is whether they need one at all. This page compares four common answers on the same requirements: a role table in the application’s own database, a policy engine, a Zanzibar-style service, and combinations of them. It does not pick a winner; the sources it cites do disagree, and they are cited as they stand. Several of them are vendors, named as such.
The models behind these options (ACL, RBAC, ABAC, ReBAC) are compared on ACL, RBAC, ABAC, ReBAC. The open-source Zanzibar-style systems are compared on Zanzibar-style systems compared.
Four options
A role table in your database. Grants are rows next to the data they protect, for example (user_id, role, doc_id), and the application checks them with a query. A list of “documents Anne can see” is a join. Nested groups need a query that follows membership edges; in PostgreSQL, “Using RECURSIVE, a WITH query can refer to its own output” (PostgreSQL docs). In a 2021 Hacker News thread on Oso’s “Why Authorization Is Hard”, one commenter argued that since many projects are mostly about database access, enforcing rules in the database itself may be enough (HN 28543457).
A policy engine. Rules live in a policy language and are evaluated against data the application supplies or the engine has cached. “Cedar is a language for writing authorization policies and making authorization decisions based on those policies”, and “Cedar evaluates each request against the provided policies and entities to make an allow or deny decision” (Cedar docs). OPA keeps “a cache or replica of that data, just as OPA has a cache/replica of policy”, loaded by bundles, pushes, the request input or calls during evaluation; with bundles, “OPA stores the entire datasource at once in memory” (OPA external data).
A Zanzibar-style service. Relationships are stored in the authorization service ahead of time and queried over the network. AuthZed (the company behind SpiceDB) puts the difference this way: “authorization data must be explicitly written into the backing datastore ahead of query time, just like an RDBMS” (AuthZed blog, 2023-11-29). The paper’s case for one shared service is in §1: it “helps establish consistent semantics and user experience across applications”, “makes it easier for applications to interoperate”, and supports common infrastructure such as “a search index that respects access control and works across applications”.
A combination. Either one product with both models (SpiceDB caveats, OpenFGA conditions, see ACL, RBAC, ABAC, ReBAC), or two systems side by side, discussed below.
Where does the data a decision needs live, and who keeps it current?
Notice the highlighted arrows. With a role table the grant and the data change in one transaction. A policy engine moves the work to request time: whoever calls it must gather the facts. A separate Zanzibar-style service moves it to write time: every change that affects access is written twice, once to the application and once to the service. AuthZed calls this “the dual-write problem” and lists ways to handle it, from out-of-band consistency checking to a transactional outbox or durable execution (AuthZed blog, 2025-01-02). The paper does not discuss this cost. It says “Zanzibar stores ACLs and their metadata in Spanner databases” (§3) and that clients store zookies “in an atomic write to the client storage” (§2.2), but not how clients keep their own data and their tuples in step.
Requirements against options
Each cell is a short summary of the paragraphs and sources on this page; “possible” means the option can do it with work the cell names.
| Requirement | Role table in your DB | Policy engine (OPA, Cedar) | Zanzibar-style service | Combination |
|---|---|---|---|---|
| Sharing one object with one user or group | Possible: a grant row per object and subject | Possible if the shares are passed in or replicated as data | Native: one tuple per share (§2.1) | Shares in the relationship store, the rest as policy |
| Nested groups | Recursive query (e.g. WITH RECURSIVE) |
Engine-specific; data must include the whole hierarchy | Native: usersets nest (§2.1); deep groups have a cost, see Leopard | From the relationship store |
| Consistency across services | One transaction, within one database | Whatever the caller’s data reflects; no snapshot token in the engine | The paper’s zookie (§2.2); product support varies (compare) | Per part; the policy side inherits the caller’s freshness |
| Audit: who can see X | A query over the grant tables | Analysis of rules plus data; hard for attribute rules (Kuhn et al.) | Expand returns a userset tree (§2.4.5); products add lookup APIs | Relationship side answerable; policy side as for policy engines |
| List: what can Anne see | A join | Partial evaluation or filtering, engine-specific | Lookup APIs or bulk check, see protecting a list endpoint | As for the store that holds the relationships |
| Latency of one check | One local query | In-process or sidecar evaluation, after the data is gathered | A network call; Google reports p50 ≈ 3 ms for Safe checks (§4.2) | Two calls if both systems are on the path |
| Operational cost | None beyond the database | Distribute policies and data to each engine | Another stateful service and datastore | Both |
| Data sync | None | Replicate or pass data on each request | Dual writes from the application | Dual writes for relationships only |
The latency row is the one most often over-read. The paper’s numbers (Table 2, §4.2) come from Google’s deployment and caching; they say nothing about a single-node install, and a policy engine’s evaluation time leaves out the time the caller spends fetching data. AuthZed makes the second point in its own favour (AuthZed blog); it is a vendor argument and has not been measured here.
A rough order of questions
Which questions separate the options? The figure follows the rows of the table, in the order they usually decide things.
Notice that context is a separate axis. The paper has no attribute conditions; a userset rewrite combines usersets with “union, intersection, and exclusion” (§2.3.1). Whatever the first two answers are, rules about time or network need either a product extension or a second system.
Critiques and replies
The debate is public and partly commercial. Here are its main published positions, with who wrote each.
“Zanzibar isn’t flexible” (Greg Sarjeant, Oso, 2024-11-01; Oso sells a policy-based authorization service). The argument: applications ask about actions, but “Your authorization service only lets you define relations”, so teams end up encoding permissions as relations; and a constrained language makes it harder to say exactly what you mean (Oso blog). Oso has also written about the sync cost of centralising authorization data in microservices (Oso Academy), and launched “Local Authorization”, where Oso can answer “yes, if” and the application evaluates the condition against its own database (Oso blog, 2024-04-16).
“Reading Zanzibar” (Tom MacWright, 2025-05-02; an independent developer). The post separates the paper’s model (objects, usersets, rewrite rules) from its machinery for consistency and scale, notes that “Zookies are very clearly important to Google” while several Zanzibar-like products have no equivalent, and concludes: “For my own needs, zookies and distributed consistency to the degree described in the Zanzibar paper are overkill.” What MacWright wants is “the API surface that Zanzibar describes”, trading “some scalability for simplicity” (macwright.com).
Policy and ReBAC as complements (AuthZed, maker of SpiceDB). AuthZed’s learning pages say “Policy engines like Cerbos and OPA primarily focus on ABAC but can be used alongside ReBAC systems” for cases that do not map to stored relationships (AuthZed learn). Its comparison post says the choice “depends on the authorization problems you have”, and that SpiceDB caveats “offer some of the benefits of policy engines without sacrificing the benefits of Google Zanzibar” (AuthZed blog, 2023-11-29). The SpiceDB FAQ states “SpiceDB is not a policy engine” (FAQ). In the 2021 HN thread, an AuthZed founder disputed the claim that ABAC cannot be done with ReBAC systems, and the Oso article’s author agreed a Zanzibar-style system can be combined with a policy engine (HN 28543457).
From practitioners. In a 2023 HN thread, one commenter called Zanzibar “overkill for the majority of needs”, and another replied that hosted services hide that complexity (HN 36470943). In a 2025 thread on rewriting OpenFGA in Postgres, the cited pain point was “keeping everything in sync all the time” (HN 45661547).
The positions overlap more than the titles suggest: all of them agree that relationship data and request context are different kinds of input, and differ on which one should be the centre.
A hybrid deployment
What does a combination look like in practice? This one is an illustration, assembled from the patterns above, not a documented reference architecture.
Notice that each system answers the question it holds data for. The gateway decides from the request alone; the relationship service decides who may see which document; the outbox turns the dual write into one local transaction followed by a retried delivery, one of the options in AuthZed’s dual-write post. The Watch arrow follows the paper’s own use: “Some clients maintain secondary indices of relation tuples in Zanzibar. They can do so with our Watch API” (§2.4.3), and Expand helps “build efficient search indices for access-controlled content” (§2.4.5).
Sources
- Zanzibar paper, §1, §2.1, §2.2, §2.3.1, §2.4.3, §2.4.5, §3, §4.2 (this site’s transcription)
- PostgreSQL documentation, WITH Queries: postgresql.org/docs/current/queries-with.html
- Cedar documentation: docs.cedarpolicy.com
- Open Policy Agent, External Data: openpolicyagent.org/docs/external-data
- D. R. Kuhn, E. J. Coyne, T. R. Weil, Adding Attributes to Role-Based Access Control, IEEE Computer, 2010: csrc.nist.gov
- Evan Cordell, Policy-Based Access Control (PBAC) vs Google Zanzibar, AuthZed blog (2023-11-29): authzed.com/blog/policy-based-access-control
- AuthZed, The Dual-Write Problem (2025-01-02): authzed.com/blog/the-dual-write-problem
- AuthZed, What are the key components of ReBAC?: authzed.com/learn/rebac-key-components
- AuthZed, SpiceDB FAQ: authzed.com/docs/spicedb/getting-started/faq
- AuthZed, Protecting a List Endpoint: authzed.com/docs/spicedb/modeling/protecting-a-list-endpoint
- Greg Sarjeant, Google Zanzibar Isn’t Flexible, Oso blog (2024-11-01): osohq.com/post/google-zanzibar-isnt-flexible
- Greg Sarjeant, Launching Local Authorization, Oso blog (2024-04-16): osohq.com/post/local-authorization
- Oso Academy, Authorization in Microservices: osohq.com/academy/microservices-authorization
- Tom MacWright, Reading Zanzibar (2025-05-02): macwright.com/2025/05/02/reading-zanzibar.html
- Hacker News, “Why Authorization Is Hard” (2021-09-15): news.ycombinator.com/item?id=28543457
- Hacker News, “Why Google Zanzibar shines at building authorization” (2023-06-25): news.ycombinator.com/item?id=36470943
- Hacker News, “We rewrote OpenFGA in pure Postgres” (2025-10-21): news.ycombinator.com/item?id=45661547