OPA — the Open Policy Agent — is a general-purpose policy engine that answers authorisation and configuration questions for other software. It is a single Go binary or library that accepts a JSON input document, evaluates policies written in a declarative language called Rego against that input plus any data it holds, and returns a JSON decision. It does not enforce anything itself: the calling service asks, OPA answers, and the service acts on the answer.
That separation is the whole point. Instead of authorisation logic being scattered through application code, admission webhooks and pipeline scripts in five different languages, the decision is expressed once in Rego and served through a stable interface. OPA can run as a sidecar, as a host-level daemon, as a library linked into a Go program, or compiled to WebAssembly and evaluated inside another runtime — the policy is identical in every case, which is why the same rule set can gate a Kubernetes admission request, an Envoy service call, a Terraform plan and a CI check.
The engine has more to it than the language. Bundles distribute signed policy and data from a central server on a polling interval. Decision logs stream every decision, its input and its result, to a remote endpoint — which is what makes an OPA deployment auditable rather than merely functional. Partial evaluation can compile a policy against known inputs to produce a residual policy or even a database filter. And the built-in test runner, coverage reporter and profiler mean Rego is treated as code that is tested and measured, not configuration that is hoped to be correct.
Why this skill matters now
Authorisation was the last piece of infrastructure to be pulled out of application code. Networking, secrets, configuration and observability all became platform concerns years ago; permission checks stayed hard-coded, duplicated per service, and impossible to audit centrally. OPA is the project that made externalised policy practical, and it is now a graduated CNCF project embedded in Kubernetes admission control, service meshes, API gateways, CI systems and cloud provisioning pipelines.
The pressure is coming from two directions at once. Platform teams need to enforce guardrails on hundreds of workloads without reviewing every manifest by hand, and auditors want to see that a control is applied uniformly and that every decision was recorded. A policy engine with a decision log answers both questions in a way that a wiki page of standards never can.
The hard part is Rego. It is a declarative language with unusual semantics — everything is a document, rules are partial by default, variables are bound rather than assigned, and negation has safety rules that surprise people who arrive from Python or Go. Engineers who can write a working rule are common; engineers who can structure a policy library, test it properly, reason about its evaluation cost and debug a rule that silently returns undefined are not.