Join our Newsletter — 33% off our NHI Course
Home› FAQ› Architecture & Implementation› How should teams choose between JWTs, bundles, API…
Architecture & Implementation

How should teams choose between JWTs, bundles, API pushes, and runtime pulls for OPA data fetching?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 24, 2026 Domain: Architecture & Implementation

Teams should choose based on data volatility, scale, and operational tolerance. JWTs suit small identity hints, bundles fit mostly static or CI/CD-driven updates, API pushes work for dynamic data with controlled latency, and runtime pulls help when data is too large to preload. The best design keeps policy decisions timely while avoiding unnecessary coupling between application code and authorization logic.

How to think about JWTs, bundles, API pushes, and runtime pulls

The real decision is not “which mechanism is best,” but which one fits the freshness, size, and delivery pattern of the data your policy needs. JWTs are a compact way to carry small identity or session hints. Bundles work best when the data changes on a predictable release cycle. API pushes and runtime pulls fit more dynamic cases, but they trade simplicity for operational coupling and delivery latency.

That distinction matters because OPA data is not just a transport problem, it shapes how quickly policy sees truth, how much infrastructure you must operate, and how tightly application behavior becomes linked to authorization state. The wrong choice usually shows up as stale decisions, oversized payloads, brittle integrations, or policy logic that becomes harder to test and govern.

What each delivery pattern is best at

JWTs are the lightest option when the policy only needs a few assertions, such as identity claims, tenant markers, or short-lived context. They are useful when the data can travel with the request and remain trustworthy for the token lifetime. The limitation is that JWTs are poor for rapidly changing authorization state, because revocation, enrichment, or broad entitlement lookups do not fit well into a self-contained token.

Bundles fit data that is mostly static or released through a controlled pipeline. They are a strong choice when the policy data can be versioned, validated, and distributed as a unit, especially for reference data, roles, rules, or moderately sized lookup sets. The trade-off is freshness: a bundle is only as current as the last successful publish and rollout, so it is not ideal when decision accuracy depends on near-real-time state.

API pushes suit dynamic data when a source system can actively publish updates to OPA or an intermediate distribution layer. This pattern works when you need lower staleness than bundles but still want to avoid fetching on every decision. It is most useful when the producer can control change events, accept delivery overhead, and tolerate some propagation delay. The main cost is operational coupling, because the producer now participates in policy freshness and must be reliable enough to keep authorization state synchronized.

Runtime pulls are the most elastic pattern when the data set is too large, too variable, or too source-dependent to preload efficiently. OPA can query what it needs at decision time, which reduces pre-distribution burden and can simplify data partitioning. The downside is that decision latency becomes dependent on upstream availability, caching quality, and network behavior, so teams must treat availability and timeout design as part of the authorization architecture.

How to choose based on scale, freshness, and operational tolerance

Start with the question of how quickly policy truth changes. If the answer can tolerate delay and the data is compact, JWTs or bundles are usually simpler. If the answer must reflect operational changes quickly, move toward API pushes or runtime pulls. If the data is large but changes slowly, bundles often give the best balance of performance and maintainability.

Then evaluate where you want complexity to live. JWTs shift simplicity into the caller and token issuer. Bundles shift it into a distribution pipeline. API pushes shift it into the update producer. Runtime pulls shift it into the authorization request path and the upstream dependency chain. The best architecture is usually the one that keeps the hardest operational problem in the place your team can observe and support most reliably.

Scale also changes the answer. At low volume, runtime pulls may be acceptable even if they are not elegant. At high volume, repeated fetches can create latency spikes or noisy dependencies that are harder to protect. At large policy surface area, bundles can become the cleaner boundary because they preserve locality and reduce per-request overhead, provided the update cadence is good enough for the risk.

Risk and Threat Considerations

Stale or oversized policy data creates two different failure modes: incorrect authorization decisions and fragile delivery paths. A mechanism that is too slow to refresh can authorize access after the source of truth has changed, while a mechanism that is too chatty can shift failure into runtime availability and make authorization depend on external services that were never meant to be decision-critical.

Failure mechanism: JWTs can go stale before they expire, bundles can lag behind source changes, API pushes can miss updates or arrive out of order, and runtime pulls can fail when the upstream source is slow, unavailable, or inconsistent. Each pattern becomes risky when teams assume freshness, integrity, or availability that the delivery model does not actually guarantee.

Impact: The practical result can be over-permission, denial of legitimate access, policy drift between systems, or degraded decision latency under load. In higher-risk environments, these failures can also complicate auditability because it becomes harder to prove which data version informed a specific decision.

Standards & Framework Alignment

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

OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5, NIST CSF 2.0 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers lifecycle and freshness of token-like authentication material.
AC-6 — Least PrivilegeData delivery choice affects how much authorization state is exposed or cached.
Recommendation — Manage token and secret lifecycles so policy inputs stay current and revocable. Minimize the authorization data each component receives to reduce blast radius.
NIST CSF 2.0PR.AA-05 — Identity and Access ManagementOPA data delivery patterns change how access decisions receive and trust identity data.
Recommendation — Align data freshness and propagation with access decision requirements.
OWASP ASVSV8 — AuthorizationThe subject is how authorization data is sourced and kept accurate for decisions.
Recommendation — Verify that authorization inputs are current, bounded, and consistently enforced.
OWASP API Security Top 10API8 — Security MisconfigurationRuntime fetches and pushes can fail through trust, timeout, or delivery misconfiguration.
Recommendation — Harden delivery and timeout settings so policy data retrieval stays reliable.

Practitioner Guidance

What to verify: Check the maximum acceptable staleness for each data class before choosing the transport. Identity hints, entitlement snapshots, and environmental metadata often belong in different delivery patterns, because they change at different rates and have different blast radii if they are wrong.

Decision rule: If the policy needs data that is small, tightly scoped, and short-lived, favor JWTs; if the data is reasonably static and versionable, favor bundles; if the data is dynamic but can be published on change, favor API pushes; if the data is too large or source-specific to distribute cleanly, use runtime pulls with explicit timeout and fallback design.

Common mistake: Teams often optimize for delivery convenience instead of decision quality. That usually leads to either under-fresh data, which silently weakens authorization, or over-coupled runtime lookups, which makes policy behavior depend on infrastructure that should have remained external to the decision path.

Practitioner takeaway: Choose the simplest mechanism that still preserves the freshness and resilience your authorization decisions actually need, because the right answer is the one that keeps policy trustworthy without making every decision dependent on unnecessary moving parts.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

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