-
Notifications
You must be signed in to change notification settings - Fork 667
Handle logout for the special kube:admin user #1173
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
Handle logout for the special kube:admin user #1173
Conversation
|
/retest |
/retest |
|
/retest |
1 similar comment
|
/retest |
| return oauth2.Endpoint{}, nil, err | ||
| } | ||
|
|
||
| kubeAdminLogoutURL := proxy.SingleJoiningSlash(metadata.Issuer, "/logout") |
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.
kind of curious why we have this func vs just using filepath.Join() but I'm sure thats history.
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 think it might normalize http:// to http:/ in the URL
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.
package main
import (
"fmt"
"path/filepath"
)
func main() {
fmt.Println(filepath.Join("http://example.com/", "/logout"))
}
---
http:/example.com/logout
Program exited.
| // First POST to the console server to clear the console session cookie. | ||
| coFetch(window.SERVER_FLAGS.logoutURL, { method: 'POST' }) | ||
| // eslint-disable-next-line no-console | ||
| .catch(e => console.error('Error logging out', e)) |
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 are good just logging this error, no handling?
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.
If the access token is deleted in the previous request, it's actually OK if this one fails since the console cookie will no longer have a valid token anyway. We might even be able to skip this step.
FWIW, this matches what we do in logout()
https://github.com/openshift/console/blob/master/frontend/public/module/auth.js#L55-L57
There is an edge case where both delete token and logout fail where it could be a problem, though. I guess that could happen if you were disconnected from the internet or the console pod goes away.
|
/retest |
1 similar comment
|
/retest |
|
flake https://jira.coreos.com/browse/CONSOLE-1266 /retest |
|
/retest |
1 similar comment
|
/retest |
|
install failed /retest |
|
/retest |
1 similar comment
|
/retest |
|
/lgtm |
|
/retest |
9 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1670693
Fixes https://jira.coreos.com/browse/CONSOLE-1083
/assign @enj @benjaminapetersen