Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Open Policy Agent

openpolicyagent.org

  • Free plan
  • Windows
  • macOS
  • Linux
  • Web
  • API
  • Self-hosted

What Open Policy Agent is

Open Policy Agent (OPA) is a free, open-source policy engine that separates policy decisions from the systems that enforce them. It evaluates policies against structured input and can return structured data. Teams can use it to apply policies in microservices, Kubernetes, CI/CD pipelines, and API gateways. Policies are written in Rego, a declarative language designed for complex hierarchical data. Evaluations are available through a REST API, Go API, WebAssembly, or custom evaluators using OPA's intermediate representation. OPA bundles distribute policy and data, while discovery bundles carry configuration. Management interfaces support policy distribution, status and health checks, and decision logs. Integrations include Kubernetes, Terraform, Envoy, and code editors; the documentation recommends OPA Gatekeeper for Kubernetes admission control. Installation options include macOS, Linux/Unix, Windows, and Docker. OPA's security guidance says authentication and authorization are off by default and recommends configuring TLS, authentication, and authorization when securing the API. OPA is a graduated Cloud Native Computing Foundation project.

Who it suits

OPA suits developers and platform teams that need policy decisions applied across services, infrastructure, or delivery pipelines. It is also relevant to Kubernetes users who need admission control.

Good to know, and what to watch

  • Separates policy decisions from enforcement.
  • Supports REST, Go, and WebAssembly evaluation.
  • Rego is designed for hierarchical data.
  • Bundles distribute policy and data to instances.
  • Installs on macOS, Linux/Unix, Windows, and Docker.
  • API authentication and authorization are off by default.
  • Securing the API requires configuring TLS and access controls.

Open Policy Agent

Free

Open source

Getting started

  1. Open the Open Policy Agent website
  2. Install OPA on macOS, Linux/Unix or Windows
  3. Alternatively run OPA with Docker
  4. Write policies in Rego
  5. Connect evaluations through the REST API, Go API or WebAssembly
  6. Configure TLS, authentication and authorization for the API

Limits to check

OPA’s API starts with authentication and authorization disabled, so securing it requires configuring TLS, authentication and authorization. For Kubernetes admission control, the documentation recommends OPA Gatekeeper.

The Club's review

Overview

Open Policy Agent (OPA) is a general-purpose, open-source policy engine for teams that need one decision layer across many systems. It suits platform engineers, security teams and developers governing microservices, infrastructure and delivery pipelines. The trade-off is that OPA is a toolkit to operate and integrate, not a managed policy service that removes deployment work.

OPA separates deciding whether an action is allowed from the component that enforces the result. Policies written in Rego, a declarative language for complex hierarchical data, can evaluate arbitrary structured input and return structured output. That flexibility makes the same engine useful for access decisions, infrastructure checks and admission rules, while leaving each integrating system responsible for applying the decision.

OPA is a graduated Cloud Native Computing Foundation project, with integrations listed for Kubernetes, Terraform, Envoy and code editors. See Infrastructure Policy as Code Tools for related products.

Key features

Evaluation and integration

Applications can call OPA through a REST API, use its Go API, run policies in WebAssembly, or build custom evaluators from OPA's intermediate representation. This gives teams choices between a separate policy service, embedded Go evaluation and runtime-specific deployment. It also increases architecture decisions: each path needs appropriate packaging, lifecycle and observability.

OPA targets microservices, Kubernetes, CI/CD pipelines and API gateways. Runtime enforcement, admission control, CI/CD integration and policy reporting make it relevant from code review through production requests. For Kubernetes admission control, the project documentation recommends OPA Gatekeeper, so Kubernetes users should treat Gatekeeper as the practical companion rather than assuming the base engine is a complete cluster workflow.

Management and distribution

Management interfaces distribute policies, expose status and health, and collect decision logs. Bundles carry policy and data to OPA instances, while discovery bundles provide flexible configuration. These mechanisms help standardize many instances, but operating distribution, rollout and logging remains part of the team's platform responsibility.

Security and deployment

Installation guidance covers macOS, Linux/Unix, Windows and Docker, with binary checksums available by adding .sha256 to a binary filename. OPA supports API security with TLS, authentication and Rego-based authorization, but authentication and authorization are off by default. A production deployment therefore needs deliberate security configuration rather than relying on secure defaults. Users can engage the OPA Slack community, and the security policy directs suspected issues to the OPA security team by email.

Pricing

OPA is free and open source under the Apache License, Version 2.0. The Open Policy Agent plan costs nothing and includes the open-source policy engine. There are no paid seats, usage quotas or trial expiry attached to this plan; the cost advantage is strongest for teams able to run and support the engine themselves. Commercial support is offered by third-party companies, but choosing one is a separate procurement decision.

Platforms

OPA is available as an API and on Linux, macOS, Windows, web and self-hosted deployments. Docker is also covered by the installation guidance. The broad platform mix supports centralized services as well as local or embedded workflows, though self-hosting means your team owns availability, upgrades and security configuration.

Who it's for

Choose OPA when several services or tools need consistent, centrally managed decisions, especially across microservices, Terraform or Kubernetes workflows, CI/CD and API gateways. It is a strong fit for organizations comfortable writing Rego and operating policy distribution, evaluation and logs.

Look elsewhere when you want a narrowly focused Kubernetes validator, a client-side Terraform checker or a managed control plane with less operational ownership. OPA's generality is valuable only if you can design and maintain the surrounding integration.

Pros and cons

Pros

  • One policy layer across systems: separates decision logic from enforcement and applies to services, infrastructure and delivery pipelines.
  • Multiple evaluation paths: REST, Go, WebAssembly and intermediate-representation evaluators accommodate different architectures.
  • Operational interfaces: bundles, discovery, health, status and decision logs support fleets of OPA instances.
  • No license charge: Apache-licensed open source avoids per-seat or per-request software fees.

Cons

  • Security is not on by default: API authentication and authorization, plus TLS, must be configured before exposing a deployment.
  • Integration work remains: OPA returns decisions; calling systems must enforce them and teams must run distribution and lifecycle operations.
  • Rego is an additional language: teams must learn and govern declarative policy code, particularly for complex hierarchical data.

Alternatives

Terraform is the better choice for infrastructure provisioning with a freemium plan, a free tier capped at 500 managed resources and one concurrent remote and agent run.

Fairwinds Polaris fits small teams wanting an open-source policy engine focused on Kubernetes checks.

Google Cloud Terraform Policy Validation suits teams wanting the no-charge beta gcloud beta terraform vet client-side tool.

Conftest is a simpler open-source Apache 2.0 option for testing configuration data.

Chef Infra is preferable when you need a broader infrastructure automation product with commercial support and a 30-day trial.

Google Config Sync is aimed at configuration synchronization included with Google Kubernetes Engine, subject to supported cluster and fleet registration requirements.

KubeLinter provides an Apache 2.0 open-source linting option for Kubernetes and infrastructure manifests.

Kyverno is an open-source Apache 2.0 alternative for policy work across Kubernetes-oriented environments.

Verdict

OPA is the right choice for teams that need a free, extensible policy decision engine spanning applications, infrastructure and delivery systems. Its strongest reason to choose is consistent policy with several integration paths; its main reason to look elsewhere is the operational and security work required to run it safely, especially with API authentication and authorization initially disabled.

The verdict

OPA offers a common policy engine with several evaluation and integration paths. Teams should account for the default-off API authentication and authorization when planning a secure deployment.

Questions people ask

Does OPA cost anything?

OPA is free and open source under the Apache License, Version 2.0.

Which systems can run OPA?

Installation options cover macOS, Linux/Unix, Windows and Docker. The directory also lists API, web and self-hosted platforms.

What language does OPA use?

OPA policies are written in Rego, a declarative language for expressing rules over complex hierarchical data.

How can applications evaluate policies?

Applications can use OPA’s REST API, Go API, WebAssembly runtimes or custom evaluators based on its intermediate representation.

Does OPA support Kubernetes admission control?

Yes. OPA supports admission control, and its documentation recommends OPA Gatekeeper for Kubernetes admission control.

What the maker publishes

API security
OPA's security guidance describes TLS, authentication, and Rego-based authorization, and says authentication and authorization are off by default. source
Binary checksums
The installation guide says binary checksums are available by appending .sha256 to the binary filename. source
Community support
The official site links to an OPA Slack community for users to talk with other users and maintainers. source
Decision input and output
OPA evaluates policies against arbitrary structured input and can return arbitrary structured data as output. source
Deployment
The documentation describes installing OPA on macOS, Linux/Unix, and Windows, and running it with Docker. source
Downloads
The official installation guide provides options for macOS, Linux/Unix, Windows, and Docker. source
Governance
OPA is a graduated Cloud Native Computing Foundation project. source
Integration options
OPA supports policy evaluation through a REST API, a Go API, WebAssembly, and custom evaluators using its intermediate representation. source
Integrations
The project lists integrations for Kubernetes, Terraform, Envoy, and code editors. source
Kubernetes
The OPA documentation recommends OPA Gatekeeper for Kubernetes admission control. source
Policy distribution
OPA bundles distribute policy and data to OPA instances, while discovery bundles distribute flexible configuration. source
Policy engine
OPA is an open source, general-purpose policy engine that separates policy decision-making from policy enforcement. source
Policy evaluation
Policies can be evaluated through a REST API, the Go API, WebAssembly runtimes, or custom evaluators using OPA's intermediate representation. source
Policy language
OPA policies use Rego, a declarative language designed for expressing policies over complex hierarchical data. source
Policy language
OPA policies are written in Rego, a declarative language designed for expressing rules over complex hierarchical data. source
Policy management
OPA provides management interfaces for distributing policies, checking status and health, and collecting decision logs. source
Project status
OPA is a graduated Cloud Native Computing Foundation project. source
Purpose
OPA is an open-source, general-purpose policy engine that unifies policy enforcement across software systems. source
Security configuration
Authentication and authorization are off by default, and the security guide recommends configuring TLS, authentication, and authorization when securing the API. source
Security reporting
The security policy asks users to report suspected security issues to the OPA security team by email. source
Security reporting
The project asks security reporters to email its security team and says it aims to acknowledge reports and keep reporters informed about remediation. source
Support
The project lists third-party companies offering commercial support and says the listings are not vetted endorsements. source
Use cases
OPA can enforce policies in microservices, Kubernetes, CI/CD pipelines, and API gateways. source
Use cases
OPA can enforce policies in microservices, Kubernetes, CI/CD pipelines, and API gateways. source

Checked against the maker's pages on 3 Oct 2026.