Closed
Description
Summary
The OpenID Connect core specification states, that the issuer in the ID Token must match the issuer in the issuer of the OIDC Provider.
But org.springframework.security.oauth2.client.oidc.authentication.OidcIdTokenValidator.validate(Jwt) does not validate the issuer. There is a TODO referencing a issue closed almost 3 years ago.
// 2. The Issuer Identifier for the OpenID Provider (which is typically obtained during Discovery)
// MUST exactly match the value of the iss (issuer) Claim.
// TODO Depends on gh-4413
There is also no proper issuer field in the ClientRegistration. So it is not that easy to do the proper validation.
Actual Behavior
Issuer is not validated.
Expected Behavior
Issuer MUST be validated.
Version
spring security 5.2.2. Still in latest master.