OAuth Implementation and Token-Validation Failures
Expired tokens accepted, signatures unverified, scopes ignored, or tokens issued for the wrong audience allowed through.
Failure explanation
An API accepts or rejects OAuth access tokens incorrectly. Defects include skipping signature verification, accepting expired tokens, failing to validate issuer or audience, ignoring scopes, mishandling refresh or revocation, or accepting the wrong token type. Authentication proves an identity or client; authorization still needs to determine whether that identity may perform the requested operation.
Example
A token issued for reporting-api is presented to payments-api. The payments service validates the signature but does not validate the audience, so it accepts a token intended for another service.
How to test
- Use controlled test tokens: valid, expired, wrong issuer, wrong audience, invalid signature, missing scope, revoked, malformed, and wrong token type.
- Verify refresh and revocation behavior.
- Check that failures return the documented status and do not disclose token details.
Expected behavior
The resource server validates all required token claims and scopes, rejects invalid credentials consistently, and enforces authorization independently of authentication.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.