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

Redirect from data sources sometimes loses session cookies #11374

Open
mvdbeek opened this issue Feb 15, 2021 · 16 comments
Open

Redirect from data sources sometimes loses session cookies #11374

mvdbeek opened this issue Feb 15, 2021 · 16 comments
Labels

Comments

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Feb 15, 2021

I don't understand what is going on there, but if you go to e.g. Get Data -> UCSC main table browser and you select send to Galaxy, sometimes the request is executed with sessioncookie, and sometimes without.

If the sessioncookie is not set users are logged out, which is especially confusing considering it's not always super clear that users aren't logged in.

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Feb 15, 2021

ok, the cookie is filtered out because it doesn't set SameSite=None (and secure=true in my case).
Screenshot 2021-02-15 at 12 29 19
I suppose we could add a special cookie just for the tool_runner path that is SameSite=None

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Feb 15, 2021

Weird though that this is inconsistent and works on every 2nd request

Loading

@dannon
Copy link
Member

@dannon dannon commented Feb 15, 2021

@mvdbeek This is one AlexO saw, too, but I couldn't reproduce on my end; I thought it was maybe browser addons or something at the time?

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Feb 15, 2021

The explanation given by Chrome makes sense to me, the request seems to be a cross site request (redirect), and therefore the cookie gets filtered out. I haven't managed to reproduce on firefox. I am a little surprised how this could actually work, assuming all browsers properly implement SameSite

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Feb 15, 2021

But of course now everything is working for me again ...

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Feb 15, 2021

Ah, no there it is again, just confused myself, thought I was still logged in ... 😆

Loading

@ic4f
Copy link
Member

@ic4f ic4f commented Feb 23, 2021

To confirm, this happens to me. I can't identify a pattern; first it happened consistently (not every 2nd request), now it happened once and stopped. Now it happens again. It may be connected to requesting different data, but I only have anecdotal evidence - nothing systematic. Discovered in the course of 21.01 release testing.

Loading

@ic4f
Copy link
Member

@ic4f ic4f commented Feb 23, 2021

Same happens on usegalaxy.eu

Loading

@nsoranzo nsoranzo changed the title Redirect from data sources sometimes loses sesison cookies Redirect from data sources sometimes loses session cookies Feb 23, 2021
@jennaj
Copy link
Member

@jennaj jennaj commented Apr 22, 2021

Happened again at usegalaxy.org

Loading

@jennaj
Copy link
Member

@jennaj jennaj commented Jun 23, 2021

From testing yesterday, could reproduce still with Chrome, but not Firefox or Safari on Mac OSX. Maybe that helps to find out what is going wrong.

@hexylena Should add this to the GTN for next week's training? The 101 uses this function and that is a pre-requisite for many (most?) other tutorials. Not sure about the best placement. Over time it happens, then it doesn't, then happens again. Might be a UCSC issue.

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Jun 23, 2021

This is totally our issue, this shouldn't be working on any modern browser AFAICT, but I likely won't have bandwidth to look into this before GCC.

Loading

@hexylena
Copy link
Member

@hexylena hexylena commented Jun 23, 2021

@jennaj if it was a month ago, I would've said "let's cut out the UCSC portion of the tutorials and use fixed copies of the data because that's better for reproducibility anyway" but since it's so close, I think the only option is fixing it, or warning people a lot in those tutorials :( it's unfortunate, I wish there were better options but we're stuck for now

Loading

@dannon
Copy link
Member

@dannon dannon commented Jun 23, 2021

It's chrome only though, right? The actual 'bug' is just that chrome's actually enforcing this on a redirect now? (so, is recommending using anything but chrome a better option than attempting to scramble to patch main, even if we do have time for a fix?)

Loading

@mvdbeek
Copy link
Member Author

@mvdbeek mvdbeek commented Jun 23, 2021

A proper fix would be a scoped token, right ? I don't think we should accept cookies that authenticate users from redirects ?

Loading

@jennaj
Copy link
Member

@jennaj jennaj commented Aug 24, 2021

Just dropping current status in here: Reproducible as of now re session lost when using chrome to get data from UCSC TB


Oh, slightly different behavior .. weird

  1. first query: logged out, but the output is sent back to a new unnamed history in the original account
  2. second query: log in under a new tab, that new unnamed history is the latest. repeat the query and am not logged out, and the output is added back to that same history

https://usegalaxy.org/u/jen-galaxyproject/h/unnamed-history

Maybe are more clues about how/what to fix. Certainly will help with end-user Qs if nothing else

screenshots

Screen Shot 2021-08-24 at 12 18 37 PM

Screen Shot 2021-08-24 at 12 18 45 PM

Loading

@hexylena
Copy link
Member

@hexylena hexylena commented Nov 15, 2021

Reproducible as of November, we're seeing it in a large course with @shiltemann and the proteomics community.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants