Spring Security OAuth2 Resource Server: JWT Validation, JWKS and Key Rotation
Spring Boot 4.1 and Spring Security 7.1 make a resource server one property long. That property does not validate the audience, cannot see Keycloak's roles, and caches the JWK Set in a way that decides whether a leaked signing key stops working in five minutes or never. Read from the sources, then measured: a retired key accepted indefinitely, and 25 bad tokens producing 25 JWKS fetches at the issuer.