Resource server in Spring Boot 2.7.3 does not work for RS512?

Viewed 35

spring-boot-starter-oauth2-resource-server (2.7.3) Resource server, spring-security-oauth2-jose 5.7.3, WebFlux, JWT tokens, MEPAS / CAS authorization server, RS512 algo (CAS supports it). Nearly minimal configuration with issuer-uri, jwk-set-uri set correctly. Error thrown in sun.security.rsa.RSASignature.enigineVerify on line

byte[] unpadded = padding.unpad(decrypted); 

BadPaddingException. (Or sometimes crypto Message is shorter than modulus). The resulting error is too high level: "Authentication failed: Failed to validate the token" even for valid tokens.

0 Answers
Related