Skip to content
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

Merged

Conversation

alfonso-presa
Copy link
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented Jun 18, 2020

CLA assistant check
All committers have signed the CLA.

@alfonso-presa
Copy link
Contributor Author

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.

@diemol diemol closed this Jul 12, 2020
@diemol diemol reopened this Jul 12, 2020
@diemol diemol changed the base branch from master to trunk July 12, 2020 19:44
@diemol
Copy link
Member

diemol commented Jul 29, 2020

@harsha509 could you please help me to review this one?

@harsha509
Copy link
Member

Hi @diemol ,

PR looks good to me! we can merge it.

Regards,
Harsha.

@diemol
Copy link
Member

diemol commented Jul 30, 2020

Thanks for reviewing @harsha509!

Copy link
Member

@diemol diemol left a 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!

@diemol diemol merged commit 84af7b1 into SeleniumHQ:trunk Jul 30, 2020
@alfonso-presa
Copy link
Contributor Author

Thanks you both @diemol and @harsha509!

titusfortner pushed a commit to titusfortner/selenium that referenced this pull request Aug 13, 2020
Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants