Skip to content

Open ID Connect ID Token Issuer not validated #8321

Closed
@furti

Description

@furti

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.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions