Cedar policy language

Hand-drawn two parallel terracotta lattices of three rails with slanted braces crossing the frame, cut by one heavy hatched terracotta upright on the right, over dense cross-hatching in linen, sand, umber and moss.

Cedar is an open-source language and engine, built at Amazon Web Services (AWS), that decides whether a request to perform an action on a resource should be allowed or denied. It follows the approach called policy as code: access rules live in a dedicated language, and the application hands each decision to that language’s engine (Cutler et al., 2024). Cedar was designed so that a solver can analyse its policies automatically. Its developers also prove properties of a formal model of the language and test the production engine against it (Cutler et al., 2024; Disselkoen et al., 2024).

The main disputes concern three things. Each guarantee rests on assumptions about the data and the tools, so its reach is debated. Benchmarks disagree on Cedar’s speed. And a policy that passes Cedar’s checks may still not do what its author meant. It is one of several engines compared in authorization models and policy engines.

Requests, entities and policies

A Cedar decision answers one question about four things. A request names a principal (who asks), an action, a resource, and a context holding the circumstances of the request (Cedar, n.d.a).

Principals, actions and resources are entities. Each has a typed identifier, attributes, and links to parent entities, and the parent links form a directed acyclic graph, a hierarchy without cycles (Cutler et al., 2024). Relationships between two entities, such as membership of a group, are expressed through attributes that refer to groups of entities (Cutler et al., 2024).

A policy either permits or forbids, and it can add conditions. Every when condition must be true, and every unless condition false, for the policy to match and count toward the decision (Cedar, n.d.b).

How a decision is reached

Cedar denies by default and lets a forbid override any permit. If any matching forbid policy applies, the result is deny; otherwise, if any permit policy applies, the result is allow; if no policy applies, the result is deny (Cedar, n.d.a). Nothing is authorized unless a policy explicitly permits it (Cutler et al., 2024).

The order of policies does not change the decision. Cedar policies have no side effects and no general loops, so evaluation order does not matter (Cutler et al., 2024). The Lean model of the language states that the result is the same regardless of evaluation order or duplicate policies (Cedar Policy, n.d.a).

Errors and diagnostics

A policy that fails during evaluation is skipped rather than stopping the decision. Its evaluation error means it does not count toward the result, and the identifiers of the failing policies and the details of their errors are returned in the response’s diagnostics (Cedar, n.d.a).

The application decides what to do with those diagnostics. Cedar’s documentation presents skip-on-error as more flexible than failing outright, because an application can inspect the diagnostics and take a different decision when a policy errors (Cedar, n.d.a).

Schemas and validation

A schema describes the application to Cedar, so that policies can be checked before they run. It lists the entity types and their structure, the actions, and the shape of request each action allows (Cutler et al., 2024). Validation against the schema is a separate operation, run when policies are loaded or created, not at each request (Cedar, n.d.c).

Validation’s guarantee depends on the application’s data matching the schema. If requests and entity data follow the schema, validated policies avoid several classes of evaluation error (Cedar, n.d.c). The developers proved this as a validator soundness theorem: if the validator accepts a policy, evaluating it on a valid input can never cause a type error (Cedar, 2024). When the data does not match, a validated policy can still fail at evaluation and be ignored (Cedar, n.d.c).

Some errors remain possible even with valid data. The Lean statement of type soundness allows errors from a missing entity, from extension values, and from arithmetic going out of bounds. These depend on information only available at run time (Cedar Policy, n.d.c).

Verification-guided development

Cedar’s developers call their method verification-guided development: they prove properties about a readable formal model, and test that the deployed code matches that model (Disselkoen et al., 2024). The model is written in Lean, a proof assistant (a program that checks mathematical proofs). The production engine, written in Rust, is compared with the model by differential random testing, which feeds both the same generated inputs and compares their answers. Property-based tests cover behaviour of the Rust code that has no counterpart in the model (Disselkoen et al., 2024).

The specification repository holds the Lean model, its proofs, and the testing infrastructure (Cedar Policy, n.d.b). An earlier formalization in Dafny, another verification language, was deprecated in March 2024 (Cedar, 2024). Proof assistants and formal verification cover these tools in general.

The method found real bugs. The developers report fixing 4 bugs in the policy validator while writing proofs, and 21 more across Cedar through differential and property-based testing (Disselkoen et al., 2024).

The assurance has stated limits. The parsers, which turn policy text into the structures the model works on, are not modelled in Lean (Disselkoen et al., 2024). Testing missed a rare non-termination bug because inputs that trigger it are very unlikely to be generated, and it cannot find bugs outside the scope of its test generators (Disselkoen et al., 2024).

An independent model in Rocq Weak evidence: few or small studies support this

A group outside the Cedar team built a second model of Cedar’s typechecker in Rocq, another proof assistant. They brought it in line with the Rust implementation using only automatically derived test generators (Mittelman et al., 2026). Their tests found a difference in behaviour between the Rust implementation and the Lean model; the Cedar team already knew of it, and it has since been fixed (Mittelman et al., 2026).

Symbolic analysis

Cedar’s design lets questions about whole sets of policies be answered by an SMT solver, a program that searches for values satisfying logical formulas (SMT stands for satisfiability modulo theories). Its symbolic compiler, SymCC, converts policies and schemas into solver queries, for example whether a policy set always allows or always denies, or whether two policy sets are equivalent (Cedar Policy, n.d.d). Cedar’s authors describe the encoding as decidable, sound and complete (Cutler et al., 2024). The Lean model has proofs that the equivalence and implication checks report no false negatives and no false positives (Cedar Policy, n.d.a).

When two policy sets differ, the analysis can produce a concrete request that shows the difference. Equivalence means the same decision on all well-formed inputs in the analysis’s symbolic environment (Cedar Policy, n.d.d). A variant of each check returns a counterexample, a synthesized request and entity store, when the property does not hold (Cedar Policy, n.d.d; Cedar Policy, n.d.e).

The analyses themselves have been verified. SymCert is a Lean framework by one of Cedar’s authors. It verifies the symbolic compiler and authorizer, constraints that keep solver answers within well-formed Cedar inputs, and the conversion of solver answers back into concrete inputs (Torlak, 2026). It was used to verify five analyses of a Cedar analysis service at AWS (Torlak, 2026). The Rust version of that service runs in production, and the Lean version serves as a reference for daily differential random testing (Torlak, 2026).

These guarantees hold under assumptions. The compiler reduces well-typed Cedar expressions to solver terms, so the analysis covers policies that pass the typechecker (Cutler et al., 2024). SymCert treats the solver’s answer as trusted rather than proved (Torlak, 2026).

Comparable analysis of other policy languages covers less. An SMT analysis of Open Policy Agent’s Rego language detects contradictory and redundant rules, but only in a defined fragment of the language. Incremental rules and richer built-in functions are left to future work (Hranička, 2026). Proofs about Rego and XACML policies in Lean were feasible on examples, but their author judged them prohibitively difficult without proof automation (Kreuze, 2024).

Performance comparisons

Benchmarks disagree on which engine is fastest, and each comes from the developers of one of the engines tested. Cedar’s authors found Cedar 28.7 to 35.2 times faster than OpenFGA and 42.8 to 80.8 times faster than Rego on three example applications (Cutler et al., 2024). The maintainers of SAPL, another authorization engine, reran the same scenarios with the same generators and added their own engine. They report SAPL as 8 to 10 times faster than Cedar 3.0 and 10 to 18 times faster than Cedar 4.10 (SAPL, n.d.).

Both benchmarks time only the core decision, with all data already in memory. Cedar’s authors excluded loading entity data, parsing policies, HTTP processing, and retrieval from storage (Cutler et al., 2024). The SAPL rerun excluded parsing and entity loading (SAPL, n.d.).

The comparisons with other engines have their own caveats. The OpenFGA developers told Cedar’s authors that OpenFGA’s in-memory store is meant mainly for debugging and is not optimized (Cutler et al., 2024). Rego scaled much better when the transitive closure of relationships (every indirect link, listed in advance) was precomputed in its input. That moves part of the authorization logic out of the policy language (Cutler et al., 2024).

The two accounts also describe the OpenFGA setup differently. The SAPL rerun embedded SAPL, Cedar and OPA as libraries and called OpenFGA over HTTP to a local in-memory server, “as in the original Cedar paper”. The Cedar paper says HTTP-related processing was outside the time it measured, so the descriptions do not establish that the two runs charged OpenFGA the same transport costs (SAPL, n.d.; Cutler et al., 2024).

Policies written by language models Weak evidence: few or small studies support this

Two recent preprints suggest that passing Cedar’s validator is a weaker test than behaving as intended. In a study of policy repositories that included 53 Cedar projects, 40.6 to 55.7% of existing repository policies failed their language’s validation tool (Mostofa et al., 2026). After repair, 99.0 to 100% of policies generated by the authors’ tool, Reparo, passed validators. For Cedar, only 82.0 to 86.5% agreed with behavioural test cases (Mostofa et al., 2026).

That behavioural agreement may itself overstate correctness. A language model derived the test cases from the same repository evidence as the policies. The authors warn that their errors may therefore be correlated, so agreement alone does not establish correctness (Mostofa et al., 2026).

A verifier in the loop helps generation. On 200 cases with independently compiled reference policies, AutoCedar’s verifier-guided generation matched the reference in 178 cases. Direct generation with the same model matched in 132 (Vatsa et al., 2026).

Cedar for AI agents and Dogwood

AWS uses Cedar to control what AI agents may do. Amazon Bedrock AgentCore accepts Cedar for writing policies, and its gateway intercepts each agent request and evaluates it against those policies before allowing tool access (Amazon Web Services, n.d.f). Authorization for AI agents covers the wider problem.

Dogwood extends Cedar with conditions about an agent’s earlier actions. It compiles these temporal conditions into extra context that the Cedar engine then evaluates (dogwood-policy, n.d.a). At Dogwood’s launch, its temporal conditions did not support Cedar’s automated-reasoning analysis tools (Brooker et al., 2026).

Further reading

  • Cutler and colleagues, “Cedar: A new language for expressive, fast, safe, and analyzable authorization” (Cutler et al., 2024): the design paper, with the language, the symbolic compiler and the benchmark against OpenFGA and Rego.
  • Disselkoen and colleagues, “How we built Cedar: a verification-guided approach” (Disselkoen et al., 2024): how proofs and differential testing were combined, with the bugs found and missed.
  • Cedar’s reference guide on authorization (Cedar, n.d.a): the decision rule, skip-on-error and diagnostics in the developers’ words.
  • Torlak, “SymCert: Verifying SMT-based policy analyses” (Torlak, 2026): how the solver-based analyses were themselves verified, and what remains trusted.
  • Mittelman, Goldstein and Lampropoulos, “Testing theorems, fully automatically” (Mittelman et al., 2026): an independent Rocq model of Cedar’s typechecker tested against the Rust engine.
  • Mostofa and colleagues, “Reparo: Synthesizing and validating access control policies” (Mostofa et al., 2026): generated Cedar, OpenFGA and Rego policies, and why passing a validator is not enough.

Known gaps

What this article cannot tell you yet.

  1. How widely Cedar is used in Amazon Verified Permissions, in other AWS services and outside AWS is unknown.
  2. How Cedar’s redundancy checks (whether removing one policy changes any decision) work in practice is unclear beyond equivalence checking.
  3. The speed comparisons of Cedar with Rego, OpenFGA and SAPL come from the developers of the engines being compared; no independent benchmark that includes data retrieval and network costs exists.
  4. The studies of machine-written Cedar policies are recent preprints; whether their results hold for policies written in production, or for policies written by people, is unknown.

References

Solid source
Rated highly trustworthy by the research, and every passage taken from it was found in it.
Weak source
Rated low, or a passage taken from it was not found in it.
Medium trust
Rated medium by the research.
Not checked
Rated high, but its passages could not all be checked against it.
Show all 21 references