A company may need to restrict critical resources to people using secure devices, while also allowing document access based on ownership or team membership. A policy language represents these rules in machine-readable form so software can evaluate them when access is requested. Unlike static lists or rules scattered through application code, externalized policies can adapt to changing context without reworking each application. section 1.2.8 section 1.6
Policy as Code treats policies as code that teams can write, review, and manage. A policy engine evaluates them for incoming requests. The language must express the decision in context: who is acting, what action is requested, which resource is involved, and which conditions apply. section 1.4.1 section 8.0
forbid(
principal,
action,
resource in Category::"CriticalResources"
) unless {
context.device.security.risk == "Secure" &&
context.device.security.assessment.overall >= 80
};
This Cedar forbid policy denies actions on critical resources unless the device signal says Secure and its overall assessment is at least 80. Its effectiveness depends on correct resource classification and trustworthy device signals. section 1.4.1 section 19.6
A single language can combine authorization models. Cedar, for example, can express role-based team membership, relationship-based ownership and management, and attribute-based conditions such as device trust and time of day. Its typed schema and permit and forbid statements provide structure for those decisions. section 9.1
Languages and frameworks make different tradeoffs:
- Cedar is purpose-built for fine-grained access control, with typed schemas and support for analyzing policies before deployment. section 7.1 section 8.5.6
- XACML defines a declarative policy language and an architecture separating decision from enforcement, but its XML syntax and tooling can be difficult to use. section 8.1
- Open Policy Agent and its Rego language offer flexibility for cloud-native infrastructure, while leaving teams to define much of their authorization structure. section 8.0
- OpenFGA emphasizes relationships for sharing and delegation; AWS Identity and Access Management (IAM) addresses cloud access within AWS. section 8.0 section 8.5.6
Figure 8.3 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.
The strength map compares five approaches across authorization elements and portability, helping teams identify which system’s native strengths fit their needs. section 8.5.6
Selection starts with the required mix of roles, attributes, and relationships, then considers enforcement location, portability, performance, maintainers, and complexity. Sustainable use also requires governance: policies need clear ownership, review, versioning, testing, deployment, and rollback. Identity data and contextual signals must be reliable enough to support the decisions the policies make. section 8.5.6 section 10.0 section 1.6
