Overview

8 Policy languages and frameworks

This chapter introduces several major authorization policy languages and frameworks by following ACME Corp’s growth from a small company into a complex, distributed organization. As the company’s needs change, different systems prove useful in different settings: XACML for early centralized access control, OPA/Rego for cloud-native infrastructure policy, OpenFGA for relationship-driven collaboration, and AWS IAM for deeply integrated cloud authorization. The chapter uses these examples to show that no single approach fits every scenario; the right choice depends on the kind of authorization problem being solved and the environment in which it must operate.

It then compares the systems through the PARC lens of principal, action, resource, and context. XACML models everything as attributes and supports rich ABAC-style decisions, but its XML verbosity and heavy tooling made it hard to adopt. Rego is far more flexible and works well for general policy enforcement across modern infrastructure, but it leaves principals, actions, and resources largely unstructured, placing more burden on policy authors. OpenFGA takes the opposite path by making relationships the core of authorization, which makes it ideal for sharing and delegation but less suited to contextual or attribute-heavy decisions. AWS IAM, by contrast, is highly expressive within AWS because it is tightly bound to AWS identities, actions, resources, and condition keys.

The chapter’s main takeaway is that authorization systems are shaped by tradeoffs in structure, portability, expressiveness, and developer experience. Cedar is presented as a more balanced option, combining typed entities, structural scoping, and strong expressiveness in a portable, developer-friendly form. ALFA shows how XACML can be made more approachable without changing its semantics, and AuthZEN is described as a complementary standard for the request-and-response interface between enforcement and decision points. Overall, the chapter argues that selecting a policy language should start with the authorization model you need, the platform you use, and the complexity your team can comfortably manage.

OPA (left) vs. Cedar (right) policy evaluation flow. OPA evaluates all policies using the full input, with no built-in filtering based on principal, action, or resource. In contrast, Cedar policies can declare structural scope, allowing the engine to filter policies before evaluation. This improves performance and ensures that only relevant policies are considered.
 Relationship-based access in OpenFGA. This example shows how OpenFGA encodes permissions as logical paths through structured relationships, allowing dynamic and delegatable access without altering the underlying policy logic.
Strength map comparing five policy languages and frameworks (XACML, OPA/Rego, OpenFGA, AWS IAM, and Cedar) across the four PARC elements and portability. Darker shading indicates stronger, more native support for that element; lighter shading indicates partial or minimal support. This visual emphasizes how each system’s design highlights different aspects of authorization, from attribute-rich context handling to typed principals and explicit resource modeling.

Summary

  • Over the years, a variety of policy languages and frameworks have been developed to handle different needs.
  • XACML pioneered standardized ABAC but saw limited adoption due to wordiness and complexity; ALFA emerged to make it more approachable.
  • OPA/Rego brings flexible, general-purpose policy-as-code to cloud-native systems and is often used for Kubernetes admission control and microservice authorization.
  • OpenFGA implements a relationship-based model inspired by Zanzibar, ideal for sharing and delegation scenarios.
  • AWS IAM is deeply integrated with AWS services, making it the default choice for in-cloud authorization, but it’s not portable beyond AWS.
  • Applying PARC reveals how each system emphasizes different aspects of authorization, providing guidance on which might fit best in a particular environment.
  • Selecting an authorization framework is partly dictated by factors beyond your control, such as the cloud vendor you use or the software you purchase.
  • Most organizations will end up using a mix of authorization frameworks and languages.

FAQ

What problem did ACME face as it grew, and why did that matter for authorization?As ACME expanded from a small company into a large, distributed organization, its authorization needs became much more complex. New systems, cloud infrastructure, customer-facing platforms, and compliance requirements made a single simple approach to policy insufficient, so the company needed different authorization models for different kinds of systems.
Why did XACML become less attractive to developers over time?XACML was important as an early standard for externalized authorization, but its XML syntax was very verbose, hard to write and test, and supported by limited tooling. Its heavy architecture and runtime model also made it harder to use in modern development workflows.
What role did ALFA play in relation to XACML?ALFA was created as a friendlier, code-like way to author XACML policies. It preserves XACML’s structure and semantics but replaces cumbersome XML with a more concise syntax that compiles into standard XACML.
How does XACML fit the PARC model?XACML models principals, actions, resources, and context primarily as attributes in requests. It has strong attribute-based support, especially for contextual data, but lacks native typed objects or relationship graphs, so much of the domain model must be flattened into attributes.
What makes OPA and Rego well suited to cloud-native systems?OPA is a lightweight, embeddable policy engine that works well across distributed environments like Kubernetes, APIs, and CI/CD pipelines. Rego is flexible and expressive over JSON data, making it useful for infrastructure policy, validation, and authorization in modern systems.
How does Rego differ from Cedar in how policies are scoped?Rego expresses all constraints inside the rule body, so the policy author must explicitly manage which principals, actions, and resources a rule applies to. Cedar, by contrast, allows structural scoping in the policy head, which improves clarity and lets the engine prefilter irrelevant policies before evaluation.
Why is OpenFGA a good fit for collaborative applications?OpenFGA is designed for relationship-based access control, so it works naturally when permissions depend on ownership, sharing, delegation, or group membership. Instead of writing imperative logic, you define a schema and relationship tuples, and access is determined by graph traversal.
How does AWS IAM enforce access to confidential documents in the example?IAM uses JSON policies with conditions that compare a requester’s principal tag, such as department, against an S3 object’s tags, such as owner-department and confidential. If the departments match and the document is marked confidential, access is allowed.
What are the main tradeoffs between OPA/Rego, OpenFGA, IAM, and Cedar?OPA/Rego is highly flexible but requires manual structure and can be harder to maintain. OpenFGA is excellent for relationship-based permissions but not for rich contextual logic. IAM is powerful and deeply integrated with AWS but is AWS-specific. Cedar aims to combine portability, typed schemas, structural scoping, and support for attributes, relationships, and context.
What factors should organizations consider when choosing an authorization language or framework?They should consider their primary authorization model, where enforcement happens, how portable policies need to be, who will maintain them, and how much complexity they can tolerate. The best choice depends on the system’s needs, performance goals, and the team’s developer experience.

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