-
Notifications
You must be signed in to change notification settings - Fork 29
🐛 Logs out previously logged in users to avoid authentication issues with the cookie which is passed in all subdomains #6507
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6507 +/- ##
=========================================
+ Coverage 84.5% 86.1% +1.5%
=========================================
Files 10 1540 +1530
Lines 214 63138 +62924
Branches 25 2058 +2033
=========================================
+ Hits 181 54372 +54191
- Misses 23 8463 +8440
- Partials 10 303 +293
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
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.
👍 Did the change of cookie name helped? or still needs to be tested after deploy?
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.
I am not sure this is needed. An easier way to invalidate all cookies is to change the SESSION_SECRET_KEY
Moreover, NOTE that logging out a use is achieved by removing the auth token within the cookie not necessarily removing the entire cookie!
Let's check this when you are back :-)
So this approach seems to work. Tested locally. We can regenerate the env var |
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.
not sure I get what this is about.
@@ -17,7 +17,7 @@ services: | |||
# auth | |||
- traefik.http.middlewares.${SWARM_STACK_NAME}_manual-auth.forwardauth.address=http://${WEBSERVER_HOST}:${WEBSERVER_PORT}/v0/auth:check | |||
- traefik.http.middlewares.${SWARM_STACK_NAME}_manual-auth.forwardauth.trustForwardHeader=true | |||
- traefik.http.middlewares.${SWARM_STACK_NAME}_manual-auth.forwardauth.authResponseHeaders=Set-Cookie,osparc-sc | |||
- traefik.http.middlewares.${SWARM_STACK_NAME}_manual-auth.forwardauth.authResponseHeaders=Set-Cookie,osparc-sc-v2 |
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.
Could you explain why do we need a new name?
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.
we do not currently. Forgot to close the PR
will rotate credentials instead of renaming cookie |
What do these changes do?
After #6484 was merged it became obvious that we need to logout users. Current functionality does not allow us to logout users which do not have running services or a running frontend at the moment when the maintenance page is put up.
To avoid issues, the cookie name was changed and the old cookie is also removed.
NOTE: tried multiple ways to delete the session cookie but it appears to be impossible:
Any ideas are here are welcomed.
Related issue/s
How to test
Dev-ops checklist