-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow configurable JwtDecoder for IdToken verification #5717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jgrandja I'd like to suggest a little refactoring of the initial API above. I don't think that providing a mapping of clientRegistrationId to JwtDecoder. At this time the user does not easily have the information necessary (i.e. the keys) to create the Instead, I think we should provide an API that accepts a ClientRegistration and returns a JwtDecoder (i.e. |
My assumption is if the user provides a custom implementation of If there is no mapping configured for a I do agree though that a factory method that accepts a |
My point is that if there is 1M client registrations, then with the current approach the developer must lookup 1M client registrations at startup time to perform the mappings. This is not practical. One might say 1M client registrations is unrealistic, but I think very large numbers are possible (especially for a multi tenancy application).
Ok seems like we are on the same page here.
Is there a reason you prefer My concern is that As you have alluded to, I'm also convinced we don't want a new API. |
As I mentioned, I prefer We agree that we need an API that accepts a |
I do not think we should have a new API for this. I'd say for now anyone wanting to help with this can use |
We should expose a configuration in the
oauth2Login()
DSL that will allow users to configure a customJwtDecoder
to be used for verifying the signature of theOidcIdToken
during an OpenID Connect flow.The
OidcAuthorizationCodeAuthenticationProvider
contains the propertyprivate final Map<String, JwtDecoder> jwtDecoders
, which mapsclientRegistrationId
toJwtDecoder
. This property is currently hidden so there is no way to configure it. We should leverage the same property and existing logic internally, however, the DSL should allow for the configuration of this property.For example:
OR
The text was updated successfully, but these errors were encountered: