Open Policy Agent (OPA) is the foundation for enforcing Policy‑as‑Code across modern systems. It gives you a unified way to define, test, and deploy policies so they’re consistent everywhere—services, APIs, Kubernetes, CI/CD pipelines, and more.
OPA uses Rego, a purpose‑built policy language. Rego is declarative: you write what must be true, OPA evaluates it against input data, and decisions return in milliseconds. No hidden logic, no baked‑in rules inside applications. Policies live as version‑controlled code, reviewed like any other artifact.
Policy‑as‑Code means no manual gatekeeping, no ad hoc emails approving deployments. Every compliance rule, security check, and authorization path is automated. With OPA, governance is portable. You can run it as a sidecar, embed it in services, or call it over HTTP.
Common use cases: