-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug
Milestone
Description
Summary
When using spring-security-oauth2-client to authenticate via an OIDC provider and using OIDC discovery protocol to autoconfigure client registrations there can happen a NPE during the application startup if the userinfo_endpoint is not present in the OIDC configuration response.
Actual Behavior
Doing a call of ClientRegistrations.fromIssuerLocation(String)
with an URI of OIDC provider that misses 'userinfo_endpoint' property in it's openid-configuration json causes the NPE on the following line (according to a stack trace from a Spring Boot app):
The reason is that metadata.getUserInfoEndpointURI()
returns null.
Expected Behavior
The ClientRegistrationBuilder is successfully returned from the fromIssuerLocation
method.
Version
- affected versions seem to be 5.2.2 and 5.3.0
- there is no such issue in version 5.2.1
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug