Similar to #78 but even simpler, there are a number of baseline expectations that we could check without even needing a mock AS in the mix. A protected server (remote server requiring authorization) MUST always:
And some smoke tests for poor JWT implementations - not all access tokens are JWTs, but they are common enough that these footguns are well-documented:
- Reject requests containing an unsigned JWT (no signature part)
- Reject requests containing a JWT with
alg: "none" (an old trick to get around signature validation, should be rejected by all modern JWT libs)
- Reject requests containing a self-signed JWT (the presence of a signature is not enough, it must be signed with a trusted key!)