Fictional lab: This is sample content for the portfolio. No real organization or production target is involved.
Context#
The demo application uses signed JSON Web Tokens to identify users. An API endpoint accepts a token and returns account-specific records. The test objective is to understand which component verifies the token and which claims the API trusts.
Observation#
The lab presents two services with different validation settings. A token rejected by the primary gateway is accepted by a secondary endpoint because that endpoint reads the account identifier before verifying the signature. This mismatch is the core finding.
Impact#
In the fictional scenario, a user could retrieve another demo account’s records by changing a claim in a token sent to the secondary endpoint. The affected boundary is authorization at that endpoint, not token issuance.
Remediation#
Verify the token signature and expected issuer, audience, and algorithm before using any claims. Centralize validation rules where practical, then add tests that send modified and expired tokens to every protected endpoint.
Verification#
After the lab fix, modified tokens return an unauthorized response. A valid token still accesses only its own account records.
