By NHI Mgmt Group Editorial TeamPublished 2025-06-11Domain: Best PracticesSource: Cerbos

TL;DR: Moving from OPA to a custom policy decision engine delivered up to 17x faster authorization decisions, clearer reasoning, and lower memory and CPU overhead, according to Cerbos. The deeper lesson is that authorization platforms win when they separate policy from code without forcing teams to absorb engine complexity.


At a glance

What this is: Cerbos describes why it moved from OPA to a custom policy decision engine to improve authorization performance, explainability, and operational efficiency.

Why it matters: IAM teams should care because authorization architecture affects application latency, auditability, and the practicality of fine-grained access control across human, NHI, and autonomous use cases.

By the numbers:

👉 Read Cerbos's analysis of its move from OPA to a custom authorization engine


Context

Authorization is the control point that decides whether a principal can act on a resource, and the article shows why teams often outgrow general-purpose policy engines as application requirements mature. For IAM programmes, the issue is not policy syntax alone but whether the decision layer can support scale, explainability, and low-latency enforcement across modern application architectures.

This is an application authorization story, not a vendor feature story. The practical question for security architects is how to keep permissions logic outside application code while still preserving enough performance, audit detail, and deployment flexibility to avoid creating a new bottleneck.

For teams standardising on policy-based access control, the strongest lesson is that the control plane must be treated as production infrastructure. If decision latency, rule complexity, or debugging friction slow adoption, the authorization model can become harder to govern than the application it was meant to simplify.


Key questions

Q: How should teams decide between a general policy engine and a purpose-built authorization layer?

A: Choose the model that matches your operating burden. A general policy engine suits broad, multi-domain policy evaluation, while a purpose-built authorization layer fits application environments that need fast decisions, tailored outputs, and simpler operational control. The deciding factors are latency tolerance, explainability requirements, and whether developers can safely keep policy outside application code.

Q: Why does authorization explainability matter in IAM programmes?

A: Explainability matters because access control is only governable when teams can show why a request was allowed or denied. Audit logs, rule traces, and decision explanations support incident response, access reviews, and debugging. Without them, policy becomes a black box that is difficult to certify, tune, or defend during security reviews.

Q: What breaks when authorization is handled inside application code?

A: Policy logic embedded in code is harder to standardise, test, and govern across teams. It increases the chance of inconsistent permissions, slows policy updates, and makes audit evidence fragmented. In practice, that usually leads to permission drift, duplicated rules, and weaker visibility into who can do what and why.

Q: How can security teams measure whether policy-based authorization is working?

A: Track decision latency, deny reason quality, audit completeness, and the percentage of access paths that still bypass the central policy layer. If developers are re-implementing checks in code or support teams cannot explain denials quickly, the authorization model is not yet operating as intended.


Technical breakdown

Policy decision points and policy as code

A policy decision point centralises authorization logic so applications do not hardcode permissions checks into business code. In this model, the application sends three inputs: principal, action, and resource. The decision engine evaluates those inputs against policy and returns allow or deny, sometimes with reasoning metadata. That separation improves consistency, but it also shifts the burden to the policy layer to remain fast, observable, and easy to operate at scale.

Practical implication: standardise authorization around a central decision service only if teams can monitor latency, policy drift, and decision quality in production.

Why OPA fits some use cases but not all authorization workflows

OPA is a general policy engine, which is useful when one control surface must serve many domains. The trade-off is that broad capability can make product-specific enhancements harder, especially when teams need custom decision explanations or tightly tailored output for user interfaces. When an authorization layer must support application UX as well as backend enforcement, generality can become a constraint if extension paths are too slow or too rigid.

Practical implication: assess whether your authorization requirement is broad policy evaluation or application-specific enforcement, then choose an engine model that matches the operating burden.

Performance, explainability, and the operational cost of authorization

Authorization is not just a logical check. It is part of the runtime path, so every millisecond added to decision-making affects user experience and system throughput. Explainability matters too, because audit logs and rule traces determine whether teams can debug false denials, prove least privilege, and support governance reviews. Memory and CPU footprint also matter in containerised environments where policy services compete with application workloads for resources.


NHI Mgmt Group analysis

Policy engines have become an identity control plane, not a developer convenience. The article shows that authorization is no longer a thin application layer concern. Once permissions are expressed centrally, the policy engine becomes the place where governance, auditability, and runtime enforcement intersect. For IAM teams, that means authorization design now carries the same operational weight as authentication architecture and privileged access controls.

Fine-grained access control fails when the decision layer is too opaque to govern. Cerbos's emphasis on decision reasoning and audit logs reflects a real control requirement: teams cannot certify access decisions they cannot explain. That matters for both human IAM and NHI governance, where the ability to justify a deny or allow is part of the control itself. Practitioners should treat explainability as an authorization control objective, not a product feature.

Authorization performance is a governance issue because slow decisions change adoption behaviour. If policy enforcement adds latency or operational friction, developers route around it, and the policy layer loses authority. That is especially relevant for high-volume application, workload, and service-to-service access patterns where teams need fast decisions without embedding logic in code. The implication is that authorization tooling must be governable at runtime, not only correct on paper.

Identity control separation remains the right model, but only if the execution layer is specialised enough to keep up. This article reinforces the case for externalised authorization, but it also shows that a generic decision engine may not satisfy every operational requirement. The named concept here is authorization runtime friction: the point at which policy separation exists in principle but slows implementation in practice. Teams should recognise that friction early because it shapes whether access control stays centralised or gets fragmented back into application code.

From our research:

  • Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to The State of Secrets in AppSec.
  • That gap persists alongside an average of 6 distinct secrets manager instances per organisation, which fragments control and complicates governance.
  • For teams formalising authorization and secrets governance together, NHI Lifecycle Management Guide is the next resource to use when deciding how policy, rotation, and offboarding should line up.

What this signals

Authorization runtime friction: when policy enforcement slows developers down, they route around the control and rebuild it in application code. That creates governance inconsistency, especially in environments where human access, service accounts, and automated workflows all need the same policy spine. Teams should watch for any increase in local exception handling, because that is usually the first sign that central authorization is losing authority.

Cerbos's shift reinforces a broader programme lesson. Security teams should treat authorization services like production infrastructure, with latency budgets, observability, and resilience testing, rather than as a library dependency hidden in application logic. That mindset matters when access decisions are part of both application security and NHI control.

With 43% of security professionals concerned about AI systems learning and reproducing sensitive information patterns from codebases, according to The State of Secrets in AppSec, the separation of policy from code becomes more valuable, not less, as AI-assisted development expands. Policy centralisation limits how much sensitive logic leaks into the code path.


For practitioners

  • Map authorization decisions to a dedicated control plane Keep policy evaluation out of application code for high-risk access paths, then define service-level objectives for decision latency, audit logging, and rollback behaviour.
  • Test explainability before scaling policy enforcement Validate that every allow and deny can be traced to a readable rule set, because access reviews and incident debugging depend on clear decision reasoning.
  • Benchmark the runtime cost of authorization Measure p95 decision time, CPU usage, and memory footprint under realistic load so policy enforcement does not become the bottleneck that developers bypass.
  • Separate application UX from policy logic If front-end teams need user-friendly denial messages, keep those outputs consistent with the central policy engine rather than duplicating rules in the interface layer.

Key takeaways

  • Authorization works best as a governed runtime service, not as scattered logic inside application code.
  • Explainability is part of the control surface, because teams cannot certify decisions they cannot trace.
  • Performance and governance are linked in authorization design, since slow policy enforcement invites workarounds.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.AC-4Central policy evaluation governs who can access what in production.
NIST Zero Trust (SP 800-207)AC-4Policy enforcement at runtime supports zero trust access decisions.
OWASP Non-Human Identity Top 10NHI-05Fine-grained authorization affects non-human access paths and workload permissions.

Review workload and service-account authorization for least privilege and clear decision tracing.


Key terms

  • Policy Decision Point: A policy decision point is the service that evaluates access requests against defined rules and returns an allow or deny outcome. It separates authorization logic from application code so teams can centralise governance, logging, and control. In mature environments, it becomes part of the production security stack.
  • Policy as Code: Policy as code is the practice of expressing access rules in a machine-readable format that can be versioned, tested, and deployed like software. It improves consistency and auditability, but only if the resulting control path remains understandable enough for security and development teams to govern effectively.
  • Authorization Explainability: Authorization explainability is the ability to show why a request was approved or denied in a way humans can review and trust. It usually depends on decision traces, policy rule references, and audit logs. Without it, access control is technically enforced but practically difficult to operate.
  • Authorization Runtime Friction: Authorization runtime friction is the operational drag created when policy enforcement is too slow, opaque, or hard to integrate into real applications. It shows up as latency, developer workarounds, or duplicated checks in code. The more friction rises, the more likely teams are to bypass central governance.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.

This post draws on content published by Cerbos: the story of moving from OPA to a custom policy decision engine. Read the original.

NHIMG Editorial Note
Published by the NHIMG editorial team on 2025-06-11.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org