Home / Companies / Permit.io / Blog / Post Details
Content Deep Dive

Policy as Code: OPA's Rego vs. Cedar

Blog post from Permit.io

Post Details
Company
Date Published
Author
Or Weis
Word Count
1,182
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

Policy as code (PAC) is a development approach that treats authorization policies as code, using languages like Rego and Cedar, which are stored in version control systems. Rego, associated with the Open Policy Engine (OPA), and Cedar, used by Amazon Verified Permissions, both focus on decoupling policy from code, enhancing performance, and supporting scalability and auditability. While both languages share common traits such as being open-source and supporting WebAssembly compilation, they differ in focus, language design, and ecosystem. Rego is more flexible and infrastructure-oriented, with a mature ecosystem, but it can be complex and less readable. In contrast, Cedar is more application-oriented, readable, and structured, backed by AWS, but has a smaller ecosystem. Tools like Permit.io can assist in adopting these languages by providing a low-code UI to generate code, facilitating easier adoption and flexibility in using or switching between Rego and Cedar. The choice between them depends on specific use cases and requirements, but tools can help simplify the learning curve and initial adoption.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Kubernetes 2 1,589 172 71 +19%
LLM 1 1,416 172 75 +112%
Real-time 1 1,875 540 158 +10%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.