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

After logging in using a serviceaccount token, logout is impossible #7011

Closed
stevekuznetsov opened this issue Feb 3, 2016 · 4 comments
Closed

Comments

@stevekuznetsov
Copy link
Contributor

Example:

$ oc new-project my-project
Now using project "my-project" on server "https://10.13.137.174:8443".
$ oc sa new my-sa
serviceaccount/my-sa
$ oc login --token="$( oc sa get-token my-sa )"
Logged into "https://10.13.137.174:8443" as "system:serviceaccount:my-project:my-sa" using the token provided.
$ oc logout
Error from server: oauthaccesstokens "<snip>" not found
$ oc whoami
system:serviceaccount:my-project:my-sa

@deads2k @liggitt

@deads2k
Copy link
Contributor

deads2k commented Feb 3, 2016

Ok, you can't delete it and we should let you know, but logout should update the local kubeconfig.

Also, I think examples should use oc get user/~ --token=<>

@stevekuznetsov
Copy link
Contributor Author

Updated tests to use oc get user/~.

You're saying that the error we see is from this attempted Delete? Should we try to ascertain when we are and are not supposed to be deleting the token?

@deads2k
Copy link
Contributor

deads2k commented Feb 3, 2016

You're saying that the error we see is from this attempted Delete? Should we try to ascertain when we are and are not supposed to be deleting the token?

Tokens are opaque.

@liggitt liggitt changed the title After logging in using a token, logout is impossible After logging in using a serviceaccount token, logout is impossible Feb 14, 2017
@liggitt
Copy link
Contributor

liggitt commented Feb 14, 2017

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

No branches or pull requests

6 participants