Join our Newsletter — 33% off our NHI Course
Home Glossary Cyber Security Open Policy Agent
Cyber Security

Open Policy Agent

← Back to Glossary
By NHI Mgmt Group Updated August 19, 2026 Domain: Cyber Security

Open Policy Agent is a general-purpose policy engine that evaluates structured input against policy rules and returns an allow or deny decision. In practice, it separates authorisation logic from application code, which makes the policy layer easier to manage but also something that must be monitored and protected.

Expanded Definition

Open Policy Agent, or OPA, is a policy engine that evaluates structured inputs against policy rules and returns a decision that software can enforce. It is commonly used to centralise authorisation logic so that applications, APIs, Kubernetes controls, and infrastructure workflows do not each implement their own access rules. That separation improves consistency, but it also means the policy layer becomes a high-value control point that must be governed, tested, and protected like production code.

In security operations, OPA is best understood as a decision component rather than an identity system or an access management product. It does not authenticate users, issue credentials, or replace privileged access controls. Instead, it consumes context such as user attributes, workload identity, request metadata, or environmental conditions and evaluates those inputs against policy. This is why OPA often sits alongside NIST Cybersecurity Framework 2.0 concepts around access control and governance. The most common misapplication is treating OPA as a complete security solution, which occurs when teams use it without version control, policy review, or safeguards against overly broad rules.

Examples and Use Cases

Implementing OPA rigorously often introduces policy-management overhead, requiring organisations to weigh centralised control against the cost of maintaining clear, testable rules.

  • API authorisation: a service checks whether a request should be allowed based on tenant, role, request path, and time of day, with policy defined separately from application code.
  • Kubernetes admission control: deployment requests are evaluated before they are admitted, helping block insecure image sources, privileged containers, or missing labels.
  • CI/CD guardrails: build and deployment pipelines use policy checks to prevent releases that violate environment segregation or change-approval requirements.
  • Cloud governance: infrastructure requests are assessed against rules for encryption, network exposure, and approved regions, supporting consistent enforcement across teams.
  • Agentic workflows: an AI agent can be constrained through policy so that tool calls, data access, and escalation paths are approved only when the context meets defined thresholds, which aligns with the direction of the OWASP Agentic AI Top 10.

Because OPA is policy-as-code, teams can also test and review policy changes using the same discipline applied to application code. This becomes especially important where policy decisions affect NHI, service accounts, or agent actions that can move quickly across environments.

Why It Matters for Security Teams

OPA matters because authorisation failures are often logic failures, not just identity failures. If policies are ambiguous, stale, or inconsistently deployed, security teams may believe access is controlled when the actual decision path is permissive. That creates risk in multi-team environments where application owners, platform teams, and security teams all influence the same policy boundary. In AI-adjacent use cases, the policy layer may also govern which tools an agent can invoke, what data it can retrieve, and when escalation is permitted, which makes policy integrity part of runtime safety rather than a back-office control.

For governance work, OPA aligns naturally with policy review, separation of duties, and change traceability. Its role is also relevant to broader AI risk management because policy enforcement is one of the practical ways to constrain unintended system behaviour, a theme reflected in the NIST AI Risk Management Framework and the CSA MAESTRO agentic AI threat modeling framework. Organisations typically encounter policy drift, unexpected privilege expansion, or unsafe agent behaviour only after an incident review, at which point OPA becomes operationally unavoidable to correct.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.AC-4OPA operationalises access enforcement through policy decisions.
NIST AI RMFAI RMF addresses governance and controls that can constrain AI decision paths.
OWASP Agentic AI Top 10Agentic AI guidance highlights tool-use and action-authorization risks OPA can constrain.
CSA MAESTROMAESTRO models policy and control points for agentic AI systems.
NIST Zero Trust (SP 800-207)3.1Zero trust requires continuous, context-aware authorization decisions that OPA can support.

Treat policy enforcement as a governance control for AI-enabled systems and validate policy changes.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 19, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org