Company
Date Published
Author
Abhijit Pujare
Word count
1600
Language
English
Hacker News points
None

Summary

Open Policy Agent (OPA) is utilized in the Harness platform to enforce governance best practices in DevOps by providing fine-grained access control over software delivery processes. It uses Rego, a declarative language that allows users to write policies ensuring secure and compliant software releases. When an API request is made to Harness, the policy agent evaluates it against a set of policies, outputting a JSON object to determine if the request should be allowed or denied. The language operates by defining conditions that OPA matches against input data, enabling users to create complex rule sets for various scenarios like prohibiting HTTP calls during deployment or ensuring approval steps follow deployment stages. Rego's declarative nature allows it to evaluate conditions without explicitly programming each step, offering flexibility in policy creation for different use cases such as managing permissions and defining access levels. Users can also leverage Rego for defining and controlling variables, sets, arrays, and objects within their policies to enforce specific practices within their software delivery pipelines.