-
Notifications
You must be signed in to change notification settings - Fork 19
OIDC Workaround #312
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
OIDC Workaround #312
Conversation
|
It seems a little unreliable to rely on the library performing incorrectly. Additionally, this has an issue with the token expiring in the middle of a run—the run will fail to refresh the OIDC token and exit. We can still refresh using Some options:
|
c018f60 to
4454f94
Compare
bboston7
left a comment
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.
Thanks for tackling this!
bboston7
left a comment
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.
Looking great! Just found a small typo. Please rebase after fixing and we'll get this merged!
|
Just making a note here for my own memory: This should gracefully handle machines without |
Co-authored-by: Brett Boston <bboston7@users.noreply.github.com>
bboston7
left a comment
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.
Looks good!
There seems to be a problem with OIDC refresh. As far as I can tell, the issue is in the underlying C# Kubernetes library. When the
id-tokenis invalid (expired), it appears to use therefresh-token, but it doesn't store the new values ofid-tokenandrefresh-tokento the~/.kube/configfile. The library the C# Kubernetes library uses for OIDC is now archived, so it was removed as a dependency by version 16.0.7 (see kubernetes-client/csharp#1621). That implementation seems to call the wrong URL to refresh, which causes supercluster to still fail to refresh. However, it does mean that supercluster doesn't consume therefresh-token, sokubectlis able to update auth.Initially, this PR bumped the KubernetesClient version from 15.0.1 to 16.0.7. This has the downsides brought up below. Now, we use
kubectlto attempt to do anid-tokenrefresh if usingoidcauth. Note that since we'll presumably need to upgrade the KubernetesClient version at some point, we do need to address proper refresh at some point, also.