What Cedar Is
Cedar
is a policy language and authorization engine, originally created at AWS to power
Amazon Verified Permissions and released as open source under Apache-2.0 in 2023.
The reference implementation is in Rust; there's a WebAssembly build, a CLI, a language
server, a formatter, and — unusually for an authorization library — a symbolic compiler
(cedar-policy-symcc) for proving properties of policies formally.
Cedar is a library, not a service. Applications integrate the
cedar-policy Rust crate directly, or use one of the language bindings via
WebAssembly, or call AWS Verified Permissions for a managed service that wraps Cedar.
The engine evaluates a request — principal, action, resource, context — against a set
of policies and returns Allow or Deny. Cedar policies look
like this:
permit (
principal == User::"alice",
action == Action::"view",
resource in Album::"vacation_photos"
)
when { resource.owner == principal }; The grammar is small and purpose-built for authorization, not a general-purpose programming language. Cedar is designed around RBAC and ABAC; relationship-based authorization is not a primary target.
What Cedar Gives You — and What It Doesn't
Out of the box, Cedar gives you:
- The authorization engine (
cedar-policycrate, WASM build) - A schema language for declaring entity types and validating policies against them
- A CLI for evaluating, validating, formatting, and linting policies
- A language server for IDE integration
- A symbolic compiler that can prove properties of your policies (e.g. "no policy permits Alice to delete a public album")
What Cedar doesn't include — and where it intentionally stops — is everything surrounding the decision. Policy distribution, persistent storage of entities and relationships, audit logging, decision signing, request authentication, an approval workflow for human-in-the-loop decisions, an agent identity model. AWS Verified Permissions adds some of those (storage, policy management, change history) as a managed service; outside that managed context, those layers are your responsibility.
For in-application authorization — the SaaS app that needs to decide whether the current user can view a document — that's appropriate. Your application already has authentication, a database, and a deployment platform. Cedar slots in as the decision engine and the surrounding pieces are already provided.
What OpenLeash Adds for AI Agents
OpenLeash is designed for autonomous AI agents acting on a person's or organization's behalf. It bundles the decision engine with the surrounding pieces an agent needs:
- Agent identity — agents register with Ed25519 keypairs and sign every authorization request. OpenLeash verifies the signature, the timestamp, and a single-use nonce before evaluating any policy.
- Approval workflow — when a policy returns
REQUIRE_APPROVAL, OpenLeash creates a pending request that an owner can review and approve in a portal. Approval tokens are single-use, action-scoped, and time-limited. - Cryptographic proof tokens — every approved action returns a PASETO v4.public token (Ed25519-signed) that any counterparty can verify offline with the public key. The token binds the decision to the specific action.
- Append-only audit log — every authorization attempt, approval, and policy change is recorded in a JSONL log scoped per user, organization, and agent.
- Policy drafts — agents can propose new policies for owner review when they hit an action type the existing rules don't cover.
- Opinionated YAML — policies are YAML, schema-validated, and intentionally constrained for action-level governance: cost limits, counterparty trust, time windows, cumulative spending, action-type allowlists.
The Policy Language Comparison
Cedar and OpenLeash YAML are closer in spirit than either is to Rego. Both are purpose-built for authorization, both prefer readability over expressive power, both can be reviewed by non-developers if they have to be. The differences come from what each is designed for.
Cedar's grammar is built around permit / forbid on
principal–action–resource tuples with when / unless conditions.
That maps cleanly onto in-application authorization questions: "can this user
perform this action on this resource?" Cedar's symbolic compiler can
formally verify properties of those policies — a meaningful advantage in high-assurance
environments where you need to prove that no policy permits some forbidden combination.
OpenLeash YAML is built around action types with constraints (cost <= 100,
cumulative_spend_24h < 500, counterparty_trust >= MEDIUM)
and obligations (HUMAN_APPROVAL, STEP_UP_AUTH,
DEPOSIT, COUNTERPARTY_ATTESTATION). Those primitives map cleanly
onto agent governance questions: "should this agent take this specific action
right now, given the current spending context?" Cedar can express agent-action policies,
but the constraint and obligation language has to be invented in the host application.
When to Use Which
Use Cedar when you're embedding authorization in an application — a SaaS product, an API, a service — and you control both the request shape and the runtime. When your access decisions fit cleanly into RBAC or ABAC over principal/action/resource. When you want formal verification of policy properties. When AWS Verified Permissions is a deployment option you'd consider for the managed-service layer.
Use OpenLeash when you're building or operating AI agents that take side-effectful actions, and you need agent identity, request signing, human-in-the-loop approvals, and offline-verifiable proof tokens out of the box. When your policy authors include compliance or operations people who shouldn't have to learn a programming language.
Use both when the same system has both layers: Cedar handling in-application authorization for users acting in the product, OpenLeash handling governance of the AI agents that operate alongside them. Cedar decides whether Alice can view Document X. OpenLeash decides whether Alice's agent should email a vendor on her behalf right now.
Could You Build OpenLeash on Top of Cedar?
Cedar is a library, not a service, so the gap is larger than building on OPA. To match OpenLeash you would need to:
- Wrap Cedar in a sidecar service with an HTTP API for agent integration
- Add an agent registration system with keypair generation and Ed25519 verification
- Add a request signing scheme with timestamp + nonce + body-hash binding
- Translate Cedar's
Allow/Denyoutput into the richer decision space agents need (REQUIRE_APPROVAL,REQUIRE_STEP_UP,REQUIRE_DEPOSIT) along with obligations - Build the approval-request state machine with single-use, action-scoped tokens
- Issue PASETO (or equivalent) proof tokens from your service, with a key rotation strategy and an offline verification path
- Maintain an audit log and policy distribution mechanism
You give up Cedar's symbolic verifier in the process unless you preserve a path back to the original Cedar grammar — which constrains how rich your obligation and constraint language can be. That's the tradeoff: Cedar's verifier is excellent for what it covers, but it covers RBAC/ABAC, not agent-flow obligations.
Key Differences Summary
- Form factor — Cedar is an embedded library (with AWS Verified Permissions as the managed service option). OpenLeash is a sidecar service with SDKs.
- Scope — Cedar is a general authorization language for RBAC/ABAC use cases. OpenLeash is purpose-built for AI agent governance.
- Policy language — Cedar (purpose-built for authz, with formal verification) versus YAML with constraints + obligations.
- Identity model — Cedar models principals abstractly; the host application provides identity. OpenLeash registers agents with Ed25519 keypairs and verifies every request signature.
- Decision output — Cedar returns
AlloworDeny. OpenLeash returns a richer decision (ALLOW/DENY/REQUIRE_APPROVAL/REQUIRE_STEP_UP/REQUIRE_DEPOSIT) plus a cryptographic proof token bound to the specific action. - Verification model — Cedar decisions are consumed by the calling code. OpenLeash proof tokens can be verified offline by any third party with the public key.
- Human approval — Cedar has no approval workflow. OpenLeash has a built-in state machine for owner-driven approvals.
- Stewardship — Cedar is open source under cedar-policy/cedar with heavy AWS contribution; AWS Verified Permissions is the managed offering. OpenLeash is a single-vendor open-source project (Apache-2.0) focused on AI agent authorization.
Learn More
See how OpenLeash compares to other authorization tools: OpenLeash vs OPA covers the general-purpose policy engine, and OpenLeash vs OpenFGA contrasts attribute-based decisions with relationship-based authorization. For foundational concepts, read about AI agent authorization, AI agent guardrails, human-in-the-loop controls, and PASETO proof tokens. Or dive into the documentation to start implementing.