-
Notifications
You must be signed in to change notification settings - Fork 368
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
Fix: Only check verifier isn't empty when determining whether to do PKCE auth and ignore challenge #620
Conversation
e7af89b
to
08bdf74
Compare
This doesn’t look correct to me. Could you maybe first open an issue with all the information you have gathered so far? I do not believe that it is possible to perform PKCE without those two values involved. |
Yes, I believe you're correct, both values are needed for PKCE. This does not contradict that. These are private clients that do not implement PKCE, but instead use When it fails, it tells you "The PKCE code verifier must be at least 43 characters.". That's because the I'll try to get around to re-producing the problem again this weekend in order to better document it, if you're still not convinced. |
I don't think that is the case. PKCE requires the |
Ah, yes, getting the variable name confused with query parameter name. I very well might have something misconfigured, reviewing the logs during the problem with fresh eyes is probably a good idea. I intend to get the logs together this Sunday. Feel free to close this until I’ve provided the logs though. |
Ok, closing this in that case because I think the change does not make sense as is, which is also why the CI is failing :) |
Finally circling back. I was adding the errant |
I was attempting to use oryd/hydra with a Matrix Synapse as well as Grafana.
These projects implement server-side auth, but do not follow this recommendation:
However, they do include a "challenge" parameter, which appears to be included to try to maximize compatibility with generic OAuth.
This would cause the code below this logic to attempt PKCE verification, even though PKCE is not enforced or expected to be by the client.
Figured out that Synapse uses
authlib
underneath, which means it probably represents quite a few apps.This change makes this logic only consider
verifier
, and ignoreschallenge
in order to address this.Related issue(s)
I think this discussion may have actually been related to this -> ory/hydra#2671
Checklist
and signed the CLA.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).
Further comments