Open Policy Agent (OPA) is an open-source engine that allows declarative writing of policies as code and their use in decision-making processes. It uses a policy language called Rego, which can be used to write policies for different services. OPA has various applications, including authorization of REST API endpoints, allowing or denying Terraform changes based on compliance or safety rules, integrating custom authorization logic into applications, and implementing Kubernetes Admission Controllers to validate API requests. It was originally created by Styra and is now part of the Cloud Native Computing Foundation (CNCF). OPA can serve many purposes, but this article focuses on how it can be used alongside Infrastructure as Code.