-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
The current challenge is too long and may be mistakenly identified as risky by the browser #3955
Comments
It looks like this issue is closely related to #3777 From what I can tell, the reason the challenge is so long is because it contains the entire login/consent request state (compressed and encrypted). The linked issue suggests solving it with a POST request. It could also be solved by storing the state in persistent storage, although I imagine that wasn't chosen as it would open Hydra up to potential DoS attacks. |
An upgrade to 2.3.x should go a long way |
The latest 2.3.0 is also very long. I ran the 2.3.0 demo locally and saw that it was more than 1,200 characters. 😂 |
Using POST instead sounds like a good idea. 👍 |
POST doesn't solve the challenge, because the redirect to the UI (303 /login?consent_challenge=...) still needs to happen which can't be done with a POST unless we do some hidden iframe stuff that will for sure not work once 3P cookies are no longer working. We have it on the roadmap to further reduce the size of the challenge, right now it's not causing issues in our systems. You should consider reducing the payload you're sending as part of accept login/consent. |
@aeneasr Is it possible to leave a place in the configuration to allow the generation of short challenges? 😂 |
Wouldn't it be possible to have solution similar to OIDC The OIDC So since hydra already have configuration settings for its cookies, I suppose it should be feasible to have a config flag allowing to perform the redirect from the hydra server to login/consent (and from login/consent to hydra server) using a very similar auto-submitted html form as the one described in the OIDC spec: For example, a response from the authorization endpoint of hydra when redirecting to the login UI via HTML form post:
I understand that this is not an ideal situation, because browsers may invent new cookie restriction in the future. And if it is in the roadmap to have a reasonable upper bound on the request size, that would solve the underlying problem. However, as long as it is not possible to guarantee a reasonable upper bound it would be required that every single middlebox (F5, firewall, reverse proxy, etc) in the request path must be adapted to allow those large request. In some environment this can be quite challenging because it is not the same team managing those middleboxes as the team managing the hydra server. @aeneasr if you think this is an idea worth implementing, let me know. I can try to implement this and submit a PR. |
Preflight checklist
Ory Network Project
No response
Describe the bug
The current
challenge
is too long and may be mistakenly identified as risky by the browser.The challenge of
v2.x
is more than 1,000 characters, while the original challenge ofv1.x
is only a few dozen characters.Is there a way to make the challenge shorter? I haven't found any place in the document to configure it.
Reproducing the bug
Occasional, may not always recur
Relevant log output
Relevant configuration
Version
2.2.0
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Kubernetes
Additional Context
No response
The text was updated successfully, but these errors were encountered: