Overview

7 The building blocks of policy

This chapter introduces Cedar as a purpose-built language for expressing authorization policies that are precise, fast, and safe enough for real-time decisions. Using ACME Corp as an example, it shows why a team would choose Cedar: it can capture relationship-based and attribute-based rules in one policy language, supports review before deployment, and fits into systems that need immediate access checks. The chapter frames Cedar as a practical way to turn business rules like ownership, device trust, on-call status, and business hours into policies that both machines and humans can understand.

The core of the chapter explains how a Cedar policy is built from three parts: effect, scope, and conditions. The effect says whether the rule permits or forbids access, with forbids taking precedence over permits. The scope defines which principal, action, and resource the policy applies to, while conditions add extra constraints such as device status, team membership, time of day, or ownership. These pieces combine into a clear contract: a request is allowed or denied based on who is asking, what they want to do, what they want to act on, and whether the surrounding context satisfies the rule.

The chapter then connects policy structure to runtime evaluation through the PARC model: Principal, Action, Resource, and Context. Cedar first matches requests against policy scope, then evaluates any conditions, and finally combines results using deny-overrides and deny-by-default semantics. It also highlights Cedar’s distinctive design choices: strong typing, structured entities, namespaces, a small operator set, and the deliberate omission of complex or unsafe features like loops and external calls. Together, these choices make Cedar predictable, analyzable, and suitable for policy governance, while also laying the groundwork for comparing it with other authorization languages later in the book.

 A complete Cedar policy showing effect (top box), scope (middle box), and conditions (bottom box)
Mapping an access request to a policy. Each component of the request (left) is matched against the corresponding part of the policy (right). Scope is matched directly; conditions are evaluated by using attributes and context.

Summary

  • Cedar is a purpose-built policy language designed for real-time, fine-grained authorization decisions using attributes, relationships, and context.
  • Policies are organized using three elements: effect (permit or forbid), scope (principal, action, resource), and conditions (contextual logic).
  • Access requests follow the PARC model, and Cedar evaluates them by matching scope and evaluating conditions, using a deny-overrides decision model.
  • Cedar offers a rich entity model, allowing policies to reference relationships such as ownership or team membership through first-class entity types and attributes.
  • Namespaces and type safety help prevent errors and promote modular policy development by clearly organizing entities and enforcing strict type rules.
  • Cedar emphasizes safety, clarity, and analyzability by using strong typing, simple data access, and a minimal set of operators.
  • Design choices such as omitting regular expressions and loops make policies easier to audit, verify, and maintain, especially when using static analysis tools like Cedar Analysis.

FAQ

What is Cedar and why is it used for authorization?Cedar is a purpose-built, open source policy language for fine-grained access control. It was designed to express authorization logic clearly, safely, and efficiently, especially for real-time decisions.
What are the three main parts of a Cedar policy?A Cedar policy is built from three elements: effect, scope, and conditions. Effect says whether the policy permits or forbids access, scope defines when it applies, and conditions add extra checks that must be true.
What does the effect of a Cedar policy mean?The effect determines whether a policy contributes a permit or forbid decision. A forbid always overrides a matching permit.
What does policy scope describe in Cedar?Scope defines the principal, action, and resource the policy applies to. It answers who is making the request, what they want to do, and which resource they want to access.
What are conditions in Cedar policies?Conditions are Boolean expressions that must be true for the policy to apply. They often depend on dynamic context such as time of day, device trust, team membership, or on-call status.
What is PARC in Cedar?PARC stands for Principal, Action, Resource, and Context. It is Cedar’s model for representing an access request at runtime.
How does Cedar evaluate a request?Cedar first finds policies whose scope matches the request’s principal, action, and resource. Then it evaluates the conditions, and finally combines matching results using deny-overrides.
What is deny-overrides in Cedar?Deny-overrides means that if any applicable policy evaluates to forbid, the final decision is Deny. If no forbids apply and at least one permit applies, the result is Allow; otherwise the default is Deny.
Why does Cedar use strong typing and namespaces?Strong typing helps catch errors before runtime, such as comparing incompatible types. Namespaces keep entities and actions distinct, reduce ambiguity, and improve safety when policies are combined across systems.
What makes Cedar suitable for safety, performance, and analysis?Cedar is intentionally limited and deterministic. It avoids loops, external calls, and other unsafe features, supports fast evaluation, and is designed so policies can be statically analyzed for contradictions, redundancies, and unintended access.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free