mitreid-connect / OpenID-Connect-Java-Spring-Server

An OpenID Connect reference implementation in Java on the Spring platform.
Other
1.47k stars 767 forks source link

Signing JWT based on the default keyId. Currently, it signs based on… #1612

Open DmytriE opened 3 weeks ago

DmytriE commented 3 weeks ago

This changes looks to see if there is a default key ID defined. If so, then we should grab the key based on the key ID from the keystore. However, the current implementation iterates through a list of keys in a jwks keystore looking for the first which has the desired algorithm. This works if you have a single key which uses that algorithm. If we would like a rolling key situation this fails and cannot be relied upon.