Switched from issuing our own HS256 tokens to verifying RS256 tokens from the provider against a JWKS. Tests with a local RSA key confirmed that tokens that were expired, signed with the wrong key, missing, or forged with HS256 were all rejected.
- What worked
- Restricting the allowed algorithms blocked the HS256 algorithm-confusion attempt, as it should.