OPA vs Cedar (Cedar Agent and OPAL)

Charlie Egan

Rego and Cedar are both open source languages for policy as code. In order to use each of these languages for a policy as code use case, such as externalized authorization, a wider context of tooling is required. Policy code needs to be authored, distributed, and enforced to be effective, so an effective comparison of the two languages takes this wider context into consideration as well.

OPA is a general-purpose policy engine. It supports a range of policy as code use cases, including authorization, with the Rego language. OPA is an open source project created and maintained by Styra and is hosted by the Cloud Native Computing Foundation. 

Enterprise OPA Platform builds on the capabilities of OPA, offering a comprehensive authorization platform. The platform provides compliance, governance, no-code policy, and lifecycle management capabilities to scale policy as code authorization in complex, enterprise domains.

Cedar is an open source policy language for authorization policy. While it can describe authorization policies, being only a language, it is not a standalone solution. For policy to be enforced, Cedar code needs to be evaluated within a policy engine or product.

Cedar Agent is an early stage, open source policy engine for Cedar. The agent is concerned with the evaluation and reloading of Cedar policies in response to API requests.

Open Policy Administration Layer (OPAL) is a self-hosted control plane that can manage the Cedar agent, a minimal Cedar-based policy engine. OPAL facilitates the management of Cedar policies, offering a way to distribute policies.

Key Differences:

  • Deployment: OPA and the Enterprise OPA Platform can be deployed anywhere and offer all that’s needed to run a policy as code platform. Cedar, being just a language, also needs a Cedar agent managed by OPAL to be able to provide a complete solution so it involves deploying more components.
  • Use Cases: OPA is a general-purpose policy engine suitable for various use cases beyond authorization. Cedar is a policy language focused solely on authorization while OPAL makes it possible to use the language outside of its usual home, as part of the APIs in AWS.

See also OPA vs Cedar with Amazon Verified Permissions