-
Notifications
You must be signed in to change notification settings - Fork 41.1k
OAuth2ClientPropertiesRegistrationAdapter shouldn't remove issuer's trailing slash #15324
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
Looks like the |
I looked at this example provided here. The @jzheaux If we didn't clean the path, the |
I see, @mbhave.
This is the desired behavior.
Agreed. While not ideal to potentially break users, it should be relatively easy for folks to realize what is happening since the error message is detailed enough:
|
@jgrandja Auth0 is the only provider that I know of whose issuer ends in a slash. Okta, Google, and UAA all do not have a trailing slash in their issuer value: Okta: Either way, though, I'd vote that the discrepancies regarding discovery be handled inside |
@jzheaux Agreed, we should handle the trailing slash on our end, whether it's in |
sounds good to me (marked it as a bug rather than an enhancement since |
Thank you, @mbhave! |
FYI https://sts.windows.net/9d14e56a-b1df-4955-9dc6-0a5833c58a1f/.well-known/openid-configuration |
OAuth2ClientPropertiesRegistrationAdapter
removes the trailing slash on the user-providedspring.security.oauth2.client.provider.providername.issuer-uri
property.This causes a problem when the issuer for the OAuth 2.0 provider actually does have a trailing slash.
For example, Auth0's
iss
field always has a trailing slash.Once the trailing slash is removed, then issuer validation fails since it differs from the
iss
claim in JWTs and in the OIDC Discovery endpoint.There is at least one example of a user working around this in the wild by adding an extra slash. :)
Is it necessary to remove the trailing slash?
The text was updated successfully, but these errors were encountered: