troubleshooting Security & reliability
JWT issuer and audience validation
A JWT can have a valid signature and still be meant for another API. Compare two recipients to see how issuer, audience, and expiry checks determine eligibility without granting access.
What it means
A valid JWT signature does not mean every API that trusts the signer can accept the token. The signature authenticates the signed claims under the key used to verify them. The receiving API still has to check who issued the token (iss), whether it is an intended recipient (aud), and whether the token meets the applicable time conditions. A signature can faithfully authenticate a claim that says the token is for a different API.
Try it
Simulation: use only the synthetic choices. Do not enter a real token or key. Start with Signature check and Time claims set to valid, Issuer check and Audience check set to match, and Required scenario evidence set to provided. The result is eligible: the list of failed checks is empty. This is not a grant of access.
JWT issuer and audience validation
Explain why valid token signature is insufficient for use by a different API
All four modeled checks pass, not complete authorization.
Selected validation checks
- Signaturevalid
- Issuermatch
- Audiencematch
- Timevalid
Result
- Failed checksNone recorded
- OutcomeSelected checks pass
- Application authorizationNot modeled
The evaluator records all failed conditions. Missing signature evidence is not a valid signature. Even an empty failure list is not a grant of application authorization.
Evaluated inputs
- Required scenario evidence
- provided
- Signature check
- valid
- Issuer check
- match
- Audience check
- match
- Time claims
- valid
Symbolic policy; not parsing, signing, key discovery, scope/authorization or token validation implementation.
About this model
The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.
Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.
Change only Audience check to mismatch. The signature is still valid, but the failure list now contains audience, and the result changes to deny. Reset restores all five starting choices. Without interactive controls, you can follow the same comparison in the table below.
One signed token, two recipients
Suppose Issuer A issues a token whose audience is orders. Both the Orders API and the Reports API expect Issuer A and use the same verification policy for it. Consider the same token at the same time; only the identity of the receiving API changes.
| Decision for this token | Orders API | Reports API |
|---|---|---|
| Expected algorithm and key for Issuer A | Algorithm A, key K | Algorithm A, key K |
| Signature under that policy | Valid | Valid |
| Issuer in token vs. expected issuer | Issuer A matches | Issuer A matches |
| Audience in token vs. this recipient | orders matches orders | orders does not match reports |
| Expiry at the time of the check | Not expired | Not expired |
| Failed checks | None | Audience |
| Modeled decision | eligible | deny |
Algorithm A and key K are labels for a fixed policy, not values selected by the token. The simulation takes the signature check as a given; it does not perform cryptography. What changes between the columns is the comparison with the recipient's own identifier. Nothing about the signed data has to change for the Reports API to reject it.
The failure list also helps distinguish causes that can look alike from outside the API. With a valid signature and matching audience, an issuer mismatch and an expired token produce two entries: issuer and time. Resolving expiry alone would leave the issuer mismatch.
An empty list needs more care. With Signature check set to unknown and the other three checks passing, there is no known failure, but there is no established signature either. The result is unknown, not eligible. A known audience mismatch would still be enough to deny the token. If Required scenario evidence is missing, the result is insufficient: none of the four checks is evaluated, even if the selected choices look favorable.
The validation lanes are a set of stipulated observations, not the chronological steps of a production parser. A wrong audience is a known reason to deny even when signature evidence is missing. In the empty-failure-list case, consult the signature status before interpreting the result. No check in the diagram grants application permissions.
In practice
If an API rejects a token despite a reported signature success, start with a read-only comparison. For the same request, recipient, environment, and time, consult the API's configured validation policy and any authorized diagnostic that identifies the failed check. Does the reported audience include the identifier this API expects? Did the issuer check match? Was the token already expired when the API evaluated it? Use check results rather than copying a credential. A rejection by itself does not distinguish these causes.
If an audience mismatch is confirmed, the appropriate next step is to use the application's approved flow for a token intended for that API, not to relax the API's audience check. If expiry is the only confirmed failure, use the approved renewal flow instead. Verify the original symptom with an authorized, non-mutating request in the same environment. The simulation cannot establish that a real request now succeeds.
Stop if the expected policy, applicable software version, or relevant check result is unknown. Do not change a real service or its permissions on the strength of this example. The signature choice says nothing about how to parse token headers: real header processing, including critical parameters, follows the applicable JWS or JWE rules. The simulation neither parses tokens nor discovers keys.
Keep two decisions separate: first, does this token meet the validation policy for this recipient, at this time? Only then is it useful to ask whether the application permits the requested action.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Can one token target several audiences?
Yes. The aud claim may contain multiple audiences; that does not make the token valid for every service. A recipient must establish that it is an intended audience under its validation policy.
Is a trusted issuer enough?
No. Issuer trust alone does not establish that the token is intended for this recipient, still valid, or otherwise acceptable. Check the relevant claims under the recipient policy.
Does JWT imply encryption?
No. A JWT represented by a signed JWS can contain readable claims. A JWE representation provides encryption. Validating integrity and protecting claim confidentiality are separate requirements; never assume a token is secret just because it is signed.
Are valid claims authorization?
No. A token meeting its recipient’s stipulated validation conditions is only input to the application’s permission decision. The API still needs to decide whether the authenticated identity or delegated authority permits the requested operation. The lab does not evaluate that policy.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- RFC 7519: JSON Web Token (JWT)
Sections 3 and 4.1. Audience and expiration have defined meanings. A signed JWS can carry readable claims; JWE provides encryption. Integrity and confidentiality are distinct.
Checked .
- RFC 8725: JSON Web Token Best Current Practices
3.8,3.9. Audience claim constrains intended recipients when the same issuer issues JWTs for multiple parties.
Checked .