Skip to content

Provide support for symmetric key verification via JwtDecoder #5465

Closed
@sirianni

Description

@sirianni

JWT signature verification for id_token fails in OidcAuthorizationCodeAuthenticationProvider for OIDC providers like Ping Federate that have alternate signature verification rules.

From Ping Identity Developers Guide:

Note: Signature validation is only required for tokens not received directly from the token endpoint (i.e. for the Implicit Client Profile). In other cases where the id_token is received directly by the client from the token endpoint over HTTPS, transport layer security should be sufficient to vouch for the integrity of the token.

And
image

These rules are valid according to the OpenID Connect specification:

If the ID Token is received via direct communication between the Client and the Token Endpoint (which it is in this flow), the TLS server validation MAY be used to validate the issuer in place of checking the token signature. The Client MUST validate the signature of all other ID Tokens according to JWS [JWS] using the algorithm specified in the JWT alg Header Parameter. The Client MUST use the keys provided by the Issuer.

There is a method within OidcAuthorizationCodeAuthenticationProvider to dynamically lookup a JwtDecoder for a given ClientRegistration:

private JwtDecoder getJwtDecoder(ClientRegistration clientRegistration) {

A few challenges here:

  1. That method is private
  2. There is no way to plug in sublcasses or alternate mappings in the .oauth2Login() configuration DSL

As such, there need to be changes to the core classes to enable such pluggability.

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