Is Writing Policies in Natural Language a Feasible Approach?

0
4
Asked By CuriousCoder42 On

I'm exploring the challenges of using Open Policy Agent (OPA) and its Rego language. Writing policies in Rego feels cumbersome and requires significant effort, often forcing teams to start policy projects from scratch due to a lack of reusability. This situation discourages many teams from adopting policy-as-code, resulting in inadequate coverage. What if we could write policies in natural language, like we would casually discuss them with a colleague? For instance, instead of the complex structures required in Rego, a simple policy could be described as 'No two aws_security_group_rule resources may define an identical ingress rule.' Does this approach make sense? Are there certain policies it can't capture effectively?

1 Answer

Answered By TechSavvyGal On

Absolutely, using natural language as an interface can make policy writing much easier for teams without extensive Rego knowledge. It simplifies tasks like static checks on Infrastructure as Code, resource naming, and security constraints like preventing public S3 buckets. However, it can falter when context-aware, dynamic decisions are required or if fine-grained authorization is needed—like in microservices. Overall, it's a promising approach for enhancing policy-as-code adoption, provided you clarify its limitations.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.