int128 / kubelogin

kubectl plugin for Kubernetes OpenID Connect authentication (kubectl oidc-login)
Apache License 2.0
1.65k stars 191 forks source link

DRAFT: Add Token Exchange Grant Type (RFC8693) #1052

Open blairdrummond opened 6 months ago

blairdrummond commented 6 months ago

Opening this work-in-progress PR, my colleague and I started working on this a few weeks ago but had to set it down. I'm going to try to get this ramped back up over the next week, just opening this draft to get the conversation going.

Dex just released Token Exchange support, which we use to authenticate github actions pipelines against Kubernetes and ArgoCD (original PR here). I have been rolling bespoke token exchange code for a while but want to get this merged into KubeLogin if I can so that I can use kubelogin for human and machine authentication to k8s and argocd.

In another branch we're working to refactor stuff to more closely match the style of the existing codebase, but that branch is not in a working state yet.

Anyway! I will continue updates in this PR and will try to get this wrapped up hopefully by end of next weekend

benley commented 6 months ago

I'm eager to try using this approach with Gitlab CI job tokens and Keycloak as an OIDC broker. How much is left to do before this will be usable?

blairdrummond commented 5 hours ago

I haven't forgotten about this work but have been really busy. I'll try to take a look some time this fall