Cedar vs OPA vs OpenFGA vs Casbin: Pick on Who Supplies the Grant

An agent request is never "user U may do A" — it is "agent G, acting for U, under a grant issued earlier, may do A" — and the only axis that separates these four is whether the engine can read that grant without the agent handing it over. OpenFGA 1.22.1 stores it as a tuple and disables caching by default, so every check reads the database; Cedar 4.15.0 is stateless by design and takes entities from the caller; OPA 1.22.4 makes your revocation lag equal your bundle polling interval; Casbin 3.11.0 moves that lag per-replica, where nobody measures it. None of them fixes the agent case, because the fix is upstream: grant issuance as a separate, audited, expiring write.

By Agentic AI Wiki 12 min read

Every comparison of these four argues about policy languages, and for agents the language is the part that barely matters. An agent request is never "user U may do A" — it is "agent G, acting for U, under a grant issued at some earlier moment, may do A" — and the only question that separates these engines is whether they can read that grant without the agent handing it to them. Three of the four, by default, cannot.

At a glance

All four are production-grade and actively released as of November 2026. They are not four answers to one question; they are four different places to keep the facts a decision rests on.

EngineLatest releaseShapeAuthorization model it is native to
Cedar4.15.0 — 16 Nov 2026Library + language, stateless by designAttribute-based, with schema validation and symbolic analysis
OPA1.22.4 — 12 Nov 2026Service or sidecar, RegoGeneral-purpose policy, one engine across infra and app
OpenFGA1.22.1 — 28 Oct 2026Server with its own databaseRelationship-based, Zanzibar lineage
Casbin3.11.0 — 20 Aug 2026In-process library, many languagesModel file plus policy rows; RBAC/ABAC by configuration

Casbin's release carries a detail worth noting before you build on it: it is titled Apache Casbin (Incubating). The project entered the Apache Incubator on 7 February 2026, and 3.11.0 on 20 August 2026 was its first release under the foundation. Incubating is a governance status, not a quality judgement, but it does mean the repository scope and IP coverage across Casbin's many sub-projects were still being worked through during the year you would be adopting it.

Where each engine keeps the policy and the grant data A matrix of four authorization engines against three questions. Cedar keeps a policy set and takes entities from the caller or a separate entity store, so a caller can supply the facts. OPA evaluates a Rego module against bundle data it polls for, so mostly it cannot be forged. OpenFGA stores relationship tuples in its own database. Casbin loads a model and policy rows from your database in process. Forgeable means the agent fills in the facts the decision rests on. Where the policy lives, and who supplies the facts Policy artefact Grant / relation data Caller can forge it? Cedar 4.15.0 Policy set Caller / entity store Yes, by default OPA 1.22.4 Rego module Bundle, polled Only if you let it OpenFGA 1.22.1 Model DSL Tuples in its own DB No Casbin 3.11.0 Model + rows Your DB, in process No Forgeable means the agent fills in the facts the decision rests on
The third column is the one that decides an agent deployment, and it is not a feature any of them advertises.

Why "who supplies the grant" is the axis

Two paths by which a grant reaches an authorization decision An agent request reaches a policy engine by one of two paths. The upper path carries the grant as context on the request itself: fresh, but filled in by the agent and therefore forgeable. The lower path reads a grant stored earlier by the platform: trustworthy, but stale by whatever the cache or polling interval is. The engine choice is which of the two paths it can read without the caller's help. Two ways the grant reaches the decision Agent request the agent fills this in Context on the request fresh · forgeable by the caller Stored grant, written earlier you fill this in, ahead of time Policy engine · decide Pick the engine on which path it can read without the caller's help
Fresh and forgeable, or trustworthy and stale. No engine gives you both; they differ in which one is the default.

Classical authorization has a comfortable property: the subject is authenticated by the layer above, and the attributes the decision needs — this user's role, this document's owner — are facts about your own system that the request cannot change. Agents break it in a specific way. The request now carries a second principal and a delegation between them, and the delegation is the thing that varies per request: scope, expiry, which user approved it, whether approval was for this action or a class of actions.

So the grant has to come from somewhere, and there are exactly two somewheres. It travels on the request, where it is current but asserted by the component you are trying to constrain — a confused deputy that can describe its own authority is not constrained at all. Or it is stored ahead of time by you, where it cannot be forged but can be out of date by however long your propagation path is. Every engine below makes one of those the easy path, and that choice, not the syntax, is what you are adopting.

The corollary is uncomfortable and worth stating plainly: no engine here solves the agent problem, because the problem is upstream of all of them. What solves it is making grant issuance a separate, audited write with an expiry — delegated access and consent records — after which the engine's only job is to read it. The engine choice is then narrow and answerable: can it read that record without the caller passing it, and what is the lag before a revocation bites?

Where each engine puts the grant

Cedar — stateless on purpose, which puts the facts in the caller's hands

Cedar evaluates a request against a policy set and a set of entities, and it does not store the entities. They are supplied at evaluation time, either by your application or by an entity store you wire up (AWS Verified Permissions is the managed version of exactly that). For a service authorizing its own users this is clean and fast. For an agent it means the default integration hands the agent's own request path the job of describing the delegation, which is the one thing it must not describe.

What Cedar gives you in exchange is the strongest analysis story of the four. It has a schema, so a policy referring to an attribute that does not exist fails validation rather than quietly evaluating to false, and the 16 November 2026 release shipped alongside cedar-policy-symcc 0.9.0, the symbolic compiler for reasoning about policies formally — asking whether one policy set is strictly more permissive than another, rather than testing examples. If your agent permissions are going to be reviewed by someone who needs to prove a property about them rather than sample them, that capability has no equivalent in the other three.

OPA — the data is yours, and its freshness is a number you set

OPA evaluates Rego against data it holds, and the data arrives either in bundles it fetches on an interval you configure or by calling out mid-evaluation. That first mode is the useful one here: a grant written to your consent store, published into a bundle, and polled by every OPA instance is a fact the agent cannot touch. The cost is explicit and, unusually, honest — your revocation lag is your polling interval, and you chose it.

Rego is the standard complaint and it is a real one: it is a language your team learns rather than reads. The compensating argument is scope. If you already run OPA for Kubernetes admission or Terraform policy, putting agent authorization in the same engine means one place where "what is allowed" is written, which is worth more than elegance. If you do not, adopting Rego for this alone is the hardest sell of the four.

OpenFGA — the only one where the grant is a stored object by default

OpenFGA keeps an authorization model plus relationship tuples in its own database, and a check is a graph query over them. A delegation is simply a tuple — agent:g is actor_for user:u on account:123 — written by whatever issued the grant and readable by nothing else. That is the shape the agent case wants, and it is the default rather than something you build.

Two caveats stop this from being a straight recommendation. First, contextual tuples exist, and they are caller-supplied: reach for them to express "and the grant has not expired" and you have reopened the hole you chose OpenFGA to close. Second, the consistency story needs reading before you deploy. Caching is disabled by default, and with it off every check reads the database and is strongly consistent; enable it and the default consistency mode serves from cache where it can, with HIGHER_CONSISTENCY available per-request to bypass it. That default is the right way round — you trade away correctness deliberately, per call — but it means a revocation-sensitive check must be written to ask for the stronger mode rather than inheriting it.

Casbin — in-process, which makes the lag invisible rather than absent

Casbin is a library, not a service: a model file, policy rows loaded through an adapter from your own database, and a check that is a function call with no network hop. For a single application that wants authorization in-process and nothing to operate, it is the lowest-friction option here and available in more languages than the other three combined.

The agent-specific risk is that the staleness moves somewhere you are less likely to measure. Each process holds its own copy of the policy, refreshed on whatever reload you configured, so a revoked grant is live in every replica that has not reloaded — and because there is no service, there is no central place where that lag is a metric someone owns. Being library-only also means the policy lifecycle, the control plane and the audit trail are yours to build, which is precisely the work the agent case needs most.

Revocation lag is the number you are actually choosing

Line the four up on the question "how long after I revoke a grant can an agent still use it?" and the comparison stops being about expressiveness. Cedar's answer is whatever your entity store's freshness is, and the engine is not involved — it evaluates what it is given, so the lag is entirely a property of code you wrote. OPA's answer is your bundle polling interval, visible in configuration and identical across instances. OpenFGA's answer is zero with caching off, and your cache TTL with it on, per request. Casbin's answer is your reload interval, multiplied by the number of processes, and nobody is watching it.

That ordering is roughly the inverse of the ordering you get from a feature comparison, which is the point. The engine with the most elegant language has the weakest default story for the agent case; the one whose model looks narrowest has the strongest. And all four are strictly better than the arrangement they usually replace, which is a scope string inside a token the agent itself presents — see scoped credentials for agents for why a self-describing credential is a grant you cannot revoke at all.

One more axis worth naming because it is easy to discover late: none of these four publishes a latency or throughput guarantee, and the performance claims circulating in vendor comparisons mostly trace back to a single paper. Benchmark the check on your own data shape — particularly OpenFGA's graph queries at your tuple count — before the number matters.

When to pick which

SituationPickBecauseWatch out for
Agents acting for users across shared resourcesOpenFGAThe delegation is a stored tuple the agent cannot assertContextual tuples quietly hand the grant back to the caller
Permissions a reviewer must prove properties aboutCedarSchema validation plus symbolic analysis via SymCCYou must build the entity store; statelessness is yours to fix
You already run policy-as-code elsewhereOPAOne engine and one review path across infra and agentsRego; and your revocation lag is the polling interval
One app, no service to operate, many languagesCasbinIn-process checks, lowest operational costPer-replica staleness with no central metric; Incubating status
Attribute logic over relationship logicCedar or OPABoth express attributes nativelyRelationship checks at depth get expensive without a tuple store

The combination that keeps appearing in practice is OpenFGA answering "is this agent acting for this user on this resource?" and Cedar or OPA answering "and is this specific action permitted right now?" That is two systems and two review paths, and it is worth it only when the relationship graph is genuinely deep. Below that, one engine plus a properly audited grant-issuance write beats two engines plus a forgeable context object.

FAQ

Which of these is best for AI agent authorization?

OpenFGA has the best default, because a delegation is a stored tuple rather than something the caller asserts. But the engine is not the deciding factor — grant issuance being a separate, audited, expiring write is. With that in place any of the four works; without it, none of them does.

Can I just put the agent's permissions in its token?

Only if you never need to revoke them before expiry. A scope string in a token the agent presents is a grant the agent carries and you cannot withdraw, which is the arrangement all four of these engines exist to replace.

Is Rego worth learning for this?

If OPA is already running in your estate, yes — the win is one policy engine and one review path, not the language. If it is not, Cedar's schema and validation give you more safety for less learning curve on an app-authorization problem.

What does Casbin being "Incubating" mean for production use?

It is a governance status at the Apache Software Foundation, not a stability warning. The practical implication is that repository scope and IP coverage across Casbin's sub-projects were still being resolved through 2026, so pin versions and check the licence position of any adapter you pull in.

Does OpenFGA return stale decisions?

Not by default — caching is off, and with it off every check reads the database. If you enable caching, the default consistency mode will serve from cache; pass the higher-consistency option on checks where a fresh revocation must be respected.

Do I need a policy engine at all for a single-tenant internal agent?

Often not. If the agent acts only as itself against resources it wholly owns, a scoped credential and an egress allowlist cover it. The engines earn their keep the moment the agent acts for someone, because that is when the grant becomes a per-request variable.

Further reading

On this wiki:

Project sources: