Skip to content

Oauth2: Lookup from oauth2 well-known endpoint fails, if lookup of the oidc well-known endpoint errors #17036

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

Open
lbueker opened this issue May 4, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug

Comments

@lbueker
Copy link

lbueker commented May 4, 2025

Describe the bug
When trying to use a oauth2 authorization server, that only provides the oauth2 well-known endpoint (/.well-known/oauth-authorization-server), the automated lookup of meta-data fails, because spring security tries to lookup the oidc well known endpoint first, which results in an error. In my case the error is the following:

Caused by: org.springframework.web.client.UnknownContentTypeException: Could not extract response: no suitable HttpMessageConverter found for response type [java.util.Map<java.lang.String, java.lang.Object>] and content type [text/html]

To Reproduce
Setup a oauth2 authorization server, that does not support oidc and instead serves a html error page, when trying to lookup
/.well-known/openid-configuration

Expected behavior
The error from looking up the oidc well-known endpoint should be ignored or maybe a config property can be introduced, to make clear what the type of issuer actually is (plain oauth2 vs oidc). This could prevent looking at the wrong place from start.

Sample
Let me know if a sample is needed.

@lbueker lbueker added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant