-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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(nodejs): include auth in same domain redirects #8437
fix(nodejs): include auth in same domain redirects #8437
Conversation
I've seen the CI fails are also failing in some jobs in master also.... I also don't see how they could be related with my changes. Even though if I can be of any help in fixing them let me know. |
@harsha509 could you please help me to review this one? |
Hi @diemol , PR looks good to me! we can merge it. Regards, |
Thanks for reviewing @harsha509! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @alfonso-presa!
Thanks you both @diemol and @harsha509! |
Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
Description
Authorization information is not being sent in same domain redirects.
Motivation and Context
TLDR; we need to send redirects in session creation with the authorization sent in the original post command.
We have long running commands (specially session creation) that may last for several minutes in our hub. Our hub is in AWS infrastructure and also under a bunch of reverse proxies and we don't (can't) control request timeouts in all those pieces (i.e. NLB has a hardcoded 350s timeout for requests).
Our hub is behind also a basic auth security proxy, so we need to provider that information in all requests.
We have implemented a redirect logic (sending 303 redirects is commands are not resolved in for example 120s) so that we can extend the command duration.
Additionally, to detect if the client dropped the connection and clear the browser "almost" immediatelly after it's provisioned, we always send a redirect before giving the session (so that if he doesn't come back for the session values we know that he has dropped the waitting)
Types of changes
Checklist