Open Policy Agent centralizes authorization and policy decisions across your stack. Services query OPA instead of hardcoding rules, using the Rego language and JSON input data.
Overview
Open Policy Agent (OPA) is a general-purpose policy engine for unified, context-aware enforcement across applications and infrastructure. You express rules in the declarative Rego language to answer questions such as whether a user may call an API, which cluster may run a workload, or which tags a resource needs before creation.
Integrating services offload those decisions: when a policy choice is required, the service sends a query with input context and optional data documents; OPA evaluates policies and returns allow, deny, or structured guidance. This pattern suits API authorization, Kubernetes admission, Terraform plans, container policies, SSH access, and similar controls described in project documentation.
OPA offers a local CLI for development, REST APIs for polyglot integration, and Go SDKs at varying abstraction levels. A browser-based Rego Playground helps author and share policies. The project is a graduated CNCF member with community extensions listed in its ecosystem directory.
Policies remain decoupled from application code, so security and compliance teams can evolve rules independently while services enforce results consistently at decision time.
Key features
- Rego policy language
- Decoupled policy decisions
- REST and Go integrations
- CLI for local evaluation
- JSON input and data documents
- Kubernetes and Terraform examples
- Rego Playground authoring
- CNCF graduated project
Use cases
- API request authorization
- Kubernetes admission control
- Infrastructure as code guardrails
- Microservice permission checks
- Compliance rule enforcement
Does the same job as
OPA doesn't name these products itself, but its own description shows it does the same job.