fix: accept the full discovered oidc configuration#394
Merged
Conversation
Owner
|
I can't justify removing the manual configuration, it'll cause non-standard issuers like Sign in with GitHub to break. This fix appears to work so I'll merge this in though, thank you! |
|
@tale is this in v0.6.2-beta.4? I didnt see it in the changelog, but my issue from #340 is solved with that release (so I dont have to switch to legacy crypto in kanidm to make OIDC work). Perhaps it was fixed by something else. But this was also merged before the release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @tale, thanks for headplane!
On lastest
mainI got an oauth2 redirect loop. My oauth2 provider iskanidmand by debugging using something very similar to #384 I found out it is because by defaultkanidmonly supportsES256JWS signature alg, which headplane refuses. The actual exception was:It is easy to fix this on the kanidm side as they have a switch to enable legacy crypto which will emit
RS256signatures which are accepted.However it is also easy to fix on the headplane side, as
openid-clientfully supportsES256. The bug actually comes from the fact that headplane throws out all the optional items of the auto-discovered server config, and that the default config only acceptsRS256(as can be seen inprocessGenericAccessTokenResponse).For now I did the most lightweight fix possible, but maybe we should rework a bit the logic in
discoveryCoalesce? It looks a bit too complicated for what it does.. I'd guess most oauth2 provider actualy have a working auto-discovery, perhaps we could remove all of the manual config (authorization_endpoint,token_endpoint,userinfo_endpointas well asuse_pkce).