-
Notifications
You must be signed in to change notification settings - Fork 248
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
[UI] Remove broken Log out; provide another option #14639
Conversation
{% else %} | ||
<a href="{{ auth_base_url }}/signup"> | ||
Sign Up | ||
</a> | ||
<span>|</span> |
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.
This is just adding a |
between the two options in the logged-out view, equivalent to what used to be there between the username and Log out in the logged-in view
Thanks for working on this! Would it be possible to keep the logout button on every page but add a step where it takes the user to the Auth UI to make it work? Specifically, I'm thinking we could add logic to the <a href="https://auth.hail.is/user?logout">Log out</a> The tricky part of that might be getting the CSRF token, but since the |
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.
See comment.
@iris-garden as I understand it, the root of this problem is that
|
That is a good point! I think we could work around that by passing in the CSRF token from Batch in the query parameters as well, and then having the Auth service ping the Batch API with it to verify the token is valid (or perhaps we could just make this UI a single page application instead of a bunch of pages on different subdomains that resemble one) but I think for the short term this is a good fix! Unrelated process note: I think in order to link the issue to the PR successfully, you have to use a verb like "fixes" or "closes" in the PR description, rather than "addresses". |
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.
See comment; approved!
I believe the way our CRSF is implemented, we don't actually ever "validate" the tokens, we only check that the token in the formdata matches the token in the cookie.
This would be wonderful! Sort of similar-but-better to my thought of hosting the "top menu bar" as a separate iframe that always comes from auth. For the same reason (in particular, the apparently lack of regular usage of the logout button), that kind of change is probably larger than the scope of getting this bug fixed... but would cool to look into some day! |
167d3b2
to
68c11ab
Compare
Fixes #14635. Logout is only possible from
auth
pages due to per-subdomain CRSF tokens. Security/design thought process as documented in a comment on the issue: #14635 (comment)