# Open Policy Agent

> An open source, general-purpose policy engine that unifies policy enforcement across the stack

Source: https://talira.ai/catalog/open-policy-agent-rerf6ac8
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Infrastructure, Library, Command-line tool
- Categories: [security / auth / authorization](https://talira.ai/categories/security/auth/authorization), [security / policy as code](https://talira.ai/categories/security/policy-as-code), [ai / agents / security](https://talira.ai/categories/ai/agents/security)
- Platforms: macos, linux, windows, docker, kubernetes[^9][^10]
- Licence: Apache-2.0[^6]
- Pricing: Free and open source[^5]
- Pricing notes: Free and Apache-2.0. The OPA Support page lists third-party companies that sell commercial support.
- Free tier: yes[^5]
- Self-hostable: yes[^7]
- API: yes[^7][^8]
- Backed by: [Open Policy Agent](https://talira.ai/orgs/open-policy-agent.md), [Cloud Native Computing Foundation](https://talira.ai/orgs/cncf.md)
- Funding: non-profit[^11][^12]

Open Policy Agent (OPA) is an Apache-2.0 policy engine, a graduated CNCF project, that takes policy decisions out of your code. You write rules in Rego, its declarative language; your service sends OPA structured input (a request, a [Kubernetes](https://talira.ai/catalog/kubernetes-ftsegx3m.md) manifest, a [Terraform](https://talira.ai/catalog/terraform-zdejdqmx.md) plan, an AI agent's tool call) and OPA answers with a decision, from a yes or no to any JSON. It runs as a sidecar or daemon with a REST API, embeds in Go programs through its SDK, or compiles policies to WebAssembly, and integrates with [Envoy](https://talira.ai/catalog/envoy-proxy-bd85ktgf.md) and [Istio](https://talira.ai/catalog/istio-sdksayqp.md), Kubernetes (through [Gatekeeper](https://talira.ai/catalog/gatekeeper-dbrgamcz.md)), API gateways, CI/CD, Kafka, SSH and sudo. Bundle, status and decision log APIs and the OPA Control Plane distribute policies and keep an audit trail of every decision.

## Links

- Website: https://www.openpolicyagent.org
- GitHub: https://github.com/open-policy-agent/opa
- Docs: https://www.openpolicyagent.org/docs

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/opa>[^1]
- [mise](https://talira.ai/catalog/mise-0axr08xw.md): <https://mise-versions.jdx.dev/tools/opa>[^2]

## Problems it solves

- authorization rules are hard-coded in every microservice and nobody can see them all in one place
- ask a central policy engine whether user X can call operation Y on resource Z
- write access control rules as code, test them and review them in pull requests
- allow or deny HTTP API requests at the Envoy or Istio sidecar before they reach the service
- stop Kubernetes deployments that pull images from unapproved registries
- check a Terraform plan against our security rules before it is applied
- decide which tool calls our AI agent may run and which parameters are safe before the harness executes them
- a record of every authorization decision for audits and to replay it when debugging
- fine-grained authorization for Kafka topics, GraphQL APIs and SSH logins with one policy language
- security team owns shared rules while each product team extends them
- evaluate policies inside a browser or edge function without calling a server
- filter database queries down to the rows a user is allowed to see
- distribute policy updates to hundreds of services from Git

## Features

- Rego, a declarative policy language for hierarchical JSON data
- decisions as any structured JSON, not just allow or deny
- REST API for running OPA as a sidecar or host-level daemon
- Go SDK and Go API for embedding
- compile policies to WebAssembly for any Wasm runtime
- SDKs for TypeScript, Java and C#
- Envoy External Authorization integration
- Kubernetes admission control through OPA Gatekeeper
- policy testing and the opa CLI (eval, run, test, build)
- bundle API for distributing policies and data
- decision logs and status API
- OPA Control Plane: Git-based policy management and bundle serving
- data filtering for partial evaluation
- Rego Playground and VS Code extension
- guides for agent tool calling, Terraform, CI/CD, Kafka, GraphQL, Docker, SSH and sudo

## Limitations

- Doesn't enforce decisions itself: OPA returns allow or deny, and your service, proxy or agent harness accepts or rejects the request[^3][^4]

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.80 out of 1.
Signals: maintenance 1.00, adoption 0.82, momentum 0.60, community 1.00, backing 0.55, extensibility 0.40.

- last commit 5 days ago
- 467 commits in the last 90 days
- latest release v1.22.4 11 days ago
- 12.5k GitHub stars
- 636 contributors
- backed by Open Policy Agent and Cloud Native Computing Foundation
- funding: non-profit

## Alternatives

- [Oso Cloud](https://talira.ai/catalog/oso-cloud-8twyv4be.md): A centralized authorization service built on Polar
- [Ory Keto](https://talira.ai/catalog/ory-keto-zvqr5dxq.md): Open source authorization server based on Google Zanzibar, for RBAC and ReBAC
- [OpenFGA](https://talira.ai/catalog/openfga-72p8a9hd.md): Fine-grained authorization
- [Apache Casbin](https://talira.ai/catalog/apache-casbin-q0j8c46t.md): An authorization library that supports access control models like ACL, RBAC, ABAC
- [Kyverno](https://talira.ai/catalog/kyverno-29hn8ks7.md): Unified Policy as Code
- [Cerbos](https://talira.ai/catalog/cerbos-830ttkxr.md): Authorize every identity. Govern every action.

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://mise-versions.jdx.dev/tools.json (checked 21 Nov 2026)
[^3]: https://github.com/open-policy-agent/opa/blob/main/README.md (checked 19 Nov 2026)
[^4]: https://www.openpolicyagent.org/docs/agent-tool-calling (checked 19 Nov 2026)
[^5]: https://www.openpolicyagent.org/support (checked 19 Nov 2026)
[^6]: https://github.com/open-policy-agent/opa/blob/main/LICENSE (checked 19 Nov 2026)
[^7]: https://www.openpolicyagent.org/docs/integration (checked 19 Nov 2026)
[^8]: https://www.openpolicyagent.org/docs/rest-api (checked 19 Nov 2026)
[^9]: https://www.openpolicyagent.org/docs (checked 19 Nov 2026)
[^10]: https://www.openpolicyagent.org/docs/kubernetes (checked 19 Nov 2026)
[^11]: https://www.cncf.io/about/charter/ (checked 20 Nov 2026)
[^12]: https://www.cncf.io/ (checked 20 Nov 2026)
