Put the final authorization decision in the system that stores the data, not only in the app that displays it. JWT claims should carry the minimum information needed for policy evaluation, and the policy should check ownership, role, or tenant boundaries on every request. That keeps the access model consistent even when multiple frontends or APIs exist.
Why This Matters for Security Teams
JWT claims often look like a clean place to encode access context, but least privilege breaks when teams treat the token as the source of truth for authorization. Claims can age quickly, drift across environments, and become too coarse to express ownership, tenant, or data row boundaries. The practical risk is not token format itself, but overtrusting a portable assertion after the request leaves the app boundary.
This is where guidance from the OWASP Non-Human Identity Top 10 matters even for human-facing apps: identities and tokens are only safe when tightly scoped and continuously evaluated. NHIMG’s Ultimate Guide to NHIs – Key Challenges and Risks highlights how credential scope and trust boundaries become failure points when systems assume a token alone proves entitlement. The same pattern appears in APIs that forward JWTs across services without re-checking the underlying resource policy.
In practice, many security teams discover JWT overreach only after a cross-tenant data exposure, not through a planned authorization review.
How It Works in Practice
Least privilege with JWTs means using the token as an input to policy, not as the policy itself. The application should validate the signature, issuer, audience, and expiration, then pass the minimum claims needed for authorization to the component that owns the data or enforces the policy. That component should evaluate the request against live context such as resource ownership, tenant ID, environment, and operation type on every call.
For most teams, the cleanest pattern is centralised policy with request-time evaluation. The token may include a stable subject identifier, tenant identifier, and one or two coarse attributes, but not broad entitlements that never change. Fine-grained checks belong in the data layer, API gateway, or policy engine, so the same rule applies whether the caller is a web UI, internal service, or background job. This aligns well with NIST SP 800-207 Zero Trust Architecture, which treats every request as needing verification rather than trusting an upstream perimeter decision.
- Use short-lived JWTs and rotate signing keys to reduce the blast radius of stale claims.
- Keep claims minimal: subject, tenant, and narrowly defined context only when required.
- Enforce ownership and tenant checks in the resource owner, not just in the frontend.
- Log the claims used for a decision so reviewers can trace why access was granted or denied.
For teams dealing with identity sprawl, NHIMG’s Ultimate Guide to NHIs – Key Challenges and Risks is a useful reminder that token scope and control-plane scope are not the same thing. The least-privilege model only holds when authorization is re-evaluated where the data lives, not where the user happens to land first. These controls tend to break down when services cache authorization decisions for too long or reuse JWTs across tenants because the claims no longer reflect current access boundaries.
Common Variations and Edge Cases
Tighter authorization often increases request latency and implementation overhead, requiring organisations to balance security gains against system complexity. That tradeoff becomes sharper when JWTs are used across microservices, federated APIs, or event-driven workflows where every hop wants to trust the same token.
There is no universal standard for this yet, but current guidance suggests avoiding “entitlement-heavy” JWTs in favour of lightweight claims plus runtime policy. In multi-tenant systems, a JWT that says a user is an admin may still be insufficient if the request targets a specific customer record or workspace. In batch jobs and service accounts, the same principle applies: the workload may need broad operational authority, but only within a tightly bounded dataset or queue.
One important edge case is offline or highly distributed processing, where immediate policy lookups may not always be available. In those environments, teams should keep token lifetimes short, constrain the resource scope as much as possible, and reconcile access decisions when connectivity returns. Another common failure mode is trusting claims issued by one domain after they are forwarded into another domain with different data ownership rules. NHIMG’s State of Secrets in AppSec reinforces that teams still struggle with credential sprawl and delayed remediation, which makes overbroad JWTs especially risky when secrets, tokens, and claims are all treated as interchangeable trust signals.
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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | JWT claims can overstate entitlement if not scoped to actual identity use. |
| OWASP Agentic AI Top 10 | Request-time authorization is essential when autonomous callers may change behaviour. | |
| CSA MAESTRO | MAESTRO emphasises policy and trust boundaries for autonomous and distributed workloads. | |
| NIST AI RMF | AI RMF supports governance for dynamic, context-dependent authorization decisions. | |
| NIST Zero Trust (SP 800-207) | 3.1 | Zero trust requires continuous verification of each request, not token trust alone. |
Bind claims to workload context and enforce least privilege at the policy enforcement point.