Policy and controls
What is OpenPolicyAgent? An introduction to the Open Policy Agent project's policy engine
OpenPolicyAgent is a general-purpose policy engine, known as Open Policy Agent (OPA), that separates policy from application logic. It is a Cloud Native Computing Foundation Graduated project, and it generates an audit trail for every policy decision it makes. It is intended for managing policy across the stack, with development, security and audit in view.
- Tool
- OpenPolicyAgent
- Made by
- Open Policy Agent project
- Official site
- openpolicyagent.org
- Category
- Policy and controls
Who makes OpenPolicyAgent
OpenPolicyAgent is developed by the Open Policy Agent project, which is the source of the OPA name used for the engine. The project's official website is linked below this introduction.
Because the engine is a Cloud Native Computing Foundation Graduated project, it is positioned as a project within that foundation rather than as a single commercial product.
Official website: openpolicyagent.org
What OpenPolicyAgent is for
OpenPolicyAgent is a policy engine for managing policy across the stack. Its central idea is to separate policy from application logic, so that rules about what is allowed are expressed and maintained in one place rather than being written into each application.
The engine acts as a decision point. It evaluates policy against data held in memory, which allows it to return decisions quickly. Every one of those decisions is recorded in an audit trail, and the resulting decision history supports auditing and compliance work. Decisions can also be replayed, which is useful for analysis or debugging.
Who OpenPolicyAgent is for
The vendor names developer teams, security teams and platform teams as its audience. The engine is described as aimed at development, security and audit.
The division of work between these groups is part of the design. Security and platform teams manage shared policies centrally, and developer teams can extend those shared policies for their own needs. This arrangement lets a central group set the baseline while the teams that build applications adapt it where required.
Notable capabilities
The capabilities below describe how the engine is written to, where it can be applied and how it connects to other systems.
- Policy as a separate layer: OPA separates policy from application logic, so policy can be managed independently of the applications that rely on it.
- Rego policy language: Policies are written in Rego, a domain-specific policy language. OPA provides a high-level declarative language that covers many policy use cases.
- In-memory evaluation: OPA evaluates policy against in-memory data so that it can serve as a fast decision point.
- Audit trails and replay: OPA generates audit trails for every policy decision, and decisions can be replayed for analysis or debugging.
- Enforcement across the stack: OPA can enforce policy in applications, proxies, Kubernetes, CI/CD pipelines and API gateways, which unifies policy enforcement across the stack.
- Application integration: Applications integrate with OPA through SDKs or a REST API, and OPA has a native integration with the Envoy External Authorization API.
- Kubernetes admission control: OPA can control which Kubernetes resources may be created in a cluster.
- AI agent policy: OPA can enforce policies on which tools an AI agent may call and with what parameters.
How OpenPolicyAgent fits policy and controls
Within policy and controls, OpenPolicyAgent occupies the enforcement and decision layer. Rather than documenting a rule and relying on people to follow it, a team writes the rule in Rego and has the engine evaluate it whenever a decision is needed. The same engine can be applied in several places, from a Kubernetes cluster to a CI/CD pipeline or an API gateway, so one policy approach can cover many parts of an environment.
For audit, GRC and compliance work, the relevant feature is the record the engine keeps. Because an audit trail is generated for every policy decision, and because decisions can be replayed, reviewers have a decision history to examine when they need to understand why an action was allowed or denied. OPA is an engine that teams build into their systems, not a complete compliance program, so it is typically one component alongside other tools in an audit and compliance toolset.
Frequently asked questions
What is OpenPolicyAgent used for?
OpenPolicyAgent is used to manage policy across the stack by separating policy from application logic. It can enforce policy in applications, proxies, Kubernetes, CI/CD pipelines and API gateways.
Who develops OpenPolicyAgent?
OpenPolicyAgent is developed by the Open Policy Agent project. It is a Cloud Native Computing Foundation Graduated project.
What language are OPA policies written in?
Policies are written in Rego, a domain-specific policy language. It is a high-level declarative language that covers many policy use cases.
Does OpenPolicyAgent support auditing?
Yes. OPA generates audit trails for every policy decision, and the decision history supports auditing and compliance. Decisions can also be replayed for analysis or debugging.
How do applications connect to OpenPolicyAgent?
Applications integrate with OPA through SDKs or a REST API. OPA also has a native integration with the Envoy External Authorization API.
Auditalto is independent and is not affiliated with Open Policy Agent project. Product names belong to their owners. Features change; confirm details on the official website.