-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
kubectl refresh issues #828
Comments
@zihaoyu we've been seeing this issue crop up recently. Dex's logic will keep old signing keys around as long as there are id tokens that it could have signed. There will no longer be used to sign, but will be kept around to verify. I don't think this is the source of the issue, but yes, we've seen this response from kubectl a bit lately. What version of dex are you using? What logins (LDAP, GitHub, etc.)? Anecdotally we've seen these bugs reported less with our recent release v2.2.3. Could you try that? |
@ericchiang We use GitHub connector, and |
Experiencing an identical behavior with: Dex: 2.1.0 We're working to validate 2.2.3 and will let you know after 24 hours 😄 |
I think I can see an issue https://github.com/coreos/dex/blob/3797a71ec9b5cbd254908f9d509a9dd21d0cfb96/server/rotation.go#L135 |
Yep, the expiry bug is causing verification keys to arbitrarily be deleted. I think this is causing the issue. Will send a fix ASAP. |
Okay I was finally able to reproduce this
|
Thanks @ericchiang. So #829 fixes the above message? |
@joshrosso From my testing, yes it looks like #829 fixes the issue. Observed behavior of v2.2.3 is: after two rotations the validation key is prematurely marked as expired (after ~12 hours by default). During this time the ID Token hasn't expired, so kubectl doesn't trigger a refresh, but the public key is no longer returned by dex, so the API server marks it as invalid. Going to do a v2.2.4 release with #829 cc @rithujohn191 |
Thanks. We're happy to validate this once the |
Same here. Thanks for the fast turnaround! |
v2.2.4 is out. Let me know if you can login in 12 hours :) |
In flight, will let you know tomorrow. |
@ericchiang This morning, some of us reported successful
Looking at
Any ideas? We are running |
@ericchiang Before the bump |
@ericchiang |
For anyone running Tectonic and running into this, 1.5.2-tectonic.1 is running 2.1.0 of Dex which means you are affected. Looks like 1.5.3 release upgrades Dex to 2.2.4 in which case things should work. Thanks to everyone for fixing this! |
We use
dex
as OIDC provider forkube-apiserver
, and configurekubeconfig
to use OIDC authenticator in user config. Our expiration settings look like the following:However we noticed that when we come into office the next day,
kubectl
can't authenticate us some times:So we need to get new tokens and put them in
kubeconfig
file.Is it because
signingKeys
were rotated beforeidTokens
were re-issued, sodex
didn't know how to decrypt the tokens?The text was updated successfully, but these errors were encountered: