Every consuming service should check the claims it actually relies on, not just trust upstream login flow validation. At minimum that means verifying issuer, audience, expiration, and any domain-specific claims used for authorization. If a service depends on a claim, it must enforce that claim locally before granting access.
What resource servers should check in a JWT before trusting it
A resource server should treat a JWT as an input to be validated locally, not as a finished trust decision handed down by the login flow. The practical question is whether this token was meant for this API, issued by the expected issuer, still current, and carrying the claims this service actually depends on for authorisation.
That means the server should validate the token against its own trust boundary. If the service uses a claim to grant access, shape scope, or distinguish tenant context, that claim has to be checked where the resource is enforced, not assumed because some upstream component accepted the token earlier. This is why strict token validation belongs with the protected resource, as reinforced in the API Gateway Security Guide and the JWT Security Guide.
At a minimum, the service should verify issuer, audience, expiration, and any business-specific claims that influence access decisions. For APIs that rely on token audience binding, the audience check is what prevents a token meant for one service from being replayed against another. For broader token handling patterns, the Token and Session Security Guide is the right companion reference for lifetime and replay concerns.
How local claim enforcement changes the security model
Local validation changes the model from “someone authenticated the user somewhere” to “this service has verified the token properties that matter to its own decisions.” That distinction matters because JWTs are often reused across multiple APIs, gateways, and service tiers. A token that is valid in one context is not automatically valid in another unless the resource server checks that the claims line up with its own expected trust boundary.
The most important practical consequence is that claims used for authorisation are not decoration. If the service depends on tenant ID, role, scope, plan tier, environment, or delegation state, those claims need to be enforced at the point of access. The service should fail closed if a required claim is missing, malformed, stale, or outside the expected value set, rather than silently treating absence as permission.
This is also where audience design and claim design meet. A token can be cryptographically valid and still be the wrong token for the current resource. The OAuth Scope Design Guide is useful here because scopes and audience restrictions only help when the resource server actually enforces them as part of its own decision path.
Which checks belong on the resource server, not only at the edge
Some checks are often handled upstream, but the resource server still needs to own the final decision for the claims it consumes. That includes verifying the token has not expired, that the issuer is trusted, that the audience matches the service, and that any application-specific claims used for authorisation are present and acceptable. If the service uses DPoP, mTLS-bound access, or other sender-constrained patterns, those bindings must also be validated in the place where the access decision is made.
Operationally, this means the backend should not trust a gateway, proxy, or authentication service to have already made every decision correctly. Shared infrastructure can help, but it does not remove the obligation for the service to validate the claims it relies on. When the surrounding architecture is gateway-heavy, the API Gateway Security Guide helps frame the boundary between central enforcement and service-level verification, while the Spring Security Configuration Guide is useful for implementing audience and policy checks in the resource layer.
Risk and Threat Considerations
JWT failures usually happen when a token is accepted for its signature but not for its context. That creates exposure to token replay across services, confused-deputy behaviour, and authorisation bypass when a downstream API assumes an upstream component already filtered claims correctly. In practice, the danger is not only forged tokens, but also valid tokens being used in the wrong place or with claims the resource should have rejected.
Failure mechanism: The resource server validates the token structurally but does not enforce the claims that control access, or it trusts claims that were never meant to be authoritative for that service. An attacker can then reuse a valid token, alter the request context, or target a less strictly protected backend that accepts the same token without checking audience or domain-specific claims.
Impact: The service may grant access outside the intended audience, tenant, role, workflow, or environment boundary. That can expose data, permit unauthorised actions, and turn a single token compromise into broader lateral access across APIs that share the same token format but not the same trust intent.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V8 — Authorization | Resource servers must enforce token claims that drive access decisions. |
| V10 — OAuth and OIDC | JWT validation here depends on issuer, audience, and token context from OAuth/OIDC. | |
| Recommendation — Enforce claim-based authorization checks at the resource server before granting access. Verify issuer, audience, and token context on every protected resource request. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | JWTs are bearer-style authenticators whose lifecycle and validity must be controlled. |
| AC-3 — Access Enforcement | The resource server must enforce the claims that determine access decisions. | |
| IA-2 — Identification and Authentication (Organizational Users) | Resource servers rely on authenticated identity assertions before authorizing access. | |
| Recommendation — Validate token lifetime and reject expired or invalid authenticators at consumption time. Apply access enforcement locally based on the claims required by the service. Require authenticated identity assertions before processing protected requests. | ||
Practitioner Guidance
What to verify: Confirm that every resource server independently checks the claims it actually uses, and that those checks are aligned to its own authorisation decision rather than a generic login success state. Pay special attention to audience, expiry, issuer, and any claim that influences tenant routing, privilege, or business workflow.
Common mistake: Treating JWT validation as complete once the signature is accepted. In practice, the resource server must also validate whether the token is meant for that service and whether the claims it consumes are still trustworthy in that context.
Practitioner takeaway: A JWT is only safe to trust at the resource server when the service enforces the exact claims that govern its own access decision, locally and fail closed.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org