-
Notifications
You must be signed in to change notification settings - Fork 2
Spike: support client-go
auth-provider
s
#64
Comments
Reuse the logic in the `client-go` `AuthProvider` implementations by building an adapter from `http.RoundTripper` to `cc.Connection`. Issue: cloudfoundry/cf-crd-explorations#64 Co-authored-by: Kieron Browne <[email protected]>
Instead of trying to support the
This proved to work with the At the end of the day, we looked at using a similar approach for |
auth-provider
client-go
auth-provider
s
Instead of parsing the kube config ourselves and invoking a credentials plugin if configured, we can use the client-go similarly to how we used it for auth-provider users. The catch is that the exec authenticator sets details on a transport config object, but it is still possible to extract certificate information and to use the request wrapping. This feels slightly more hacky than the auth-provider code. But then again, the k8s folks seem careful with their private methods, so we might assume that the public interface will be maintained. Issue: cloudfoundry/cf-crd-explorations#64
Update on re-using the client-go exec authenticator codeIt is possible to use the code from exec.go. The interface is different from the This does two things. First it sets the Caching and execution of the credentials plugin is taken care of, so we don't have to worry about that. If the user has to login from the We can use the We can also invoke the So overall, this appears quite reasonable. The code is slightly verbose given the string of potential errors returned, but using |
Note that we can test the client cert part of the credentials plugin by using a pinniped configuration. And to test a credentials plugin that produces a bearer token, targeting a GKE cluster and switching the config to use https://github.com/sl1pm4t/gcp-exec-creds works. |
Reuse the logic in the `client-go` `AuthProvider` implementations by building an adapter from `http.RoundTripper` to `cc.Connection`. Issue: cloudfoundry/cf-crd-explorations#64 Co-authored-by: Kieron Browne <[email protected]>
Instead of parsing the kube config ourselves and invoking a credentials plugin if configured, we can use the client-go similarly to how we used it for auth-provider users. The catch is that the exec authenticator sets details on a transport config object, but it is still possible to extract certificate information and to use the request wrapping. This feels slightly more hacky than the auth-provider code. But then again, the k8s folks seem careful with their private methods, so we might assume that the public interface will be maintained. Issue: cloudfoundry/cf-crd-explorations#64
Reuse the logic in the `client-go` `AuthProvider` implementations by building an adapter from `http.RoundTripper` to `cc.Connection`. Issue: cloudfoundry/cf-crd-explorations#64 Co-authored-by: Kieron Browne <[email protected]> Issue: cloudfoundry/eirini-release#182 Issue: cloudfoundry/eirini-release#184 Issue: cloudfoundry/eirini-release#185 Issue: cloudfoundry/eirini-release#187 Issue: cloudfoundry/eirini-release#186 Issue: cloudfoundry/eirini-release#183 Issue: cloudfoundry/eirini-release#192 Issue: cloudfoundry/eirini-release#193 Issue: cloudfoundry/eirini-release#194 Issue: cloudfoundry/eirini-release#191 Issue: cloudfoundry/eirini-release#196 Issue: cloudfoundry/eirini-release#199 Issue: cloudfoundry/eirini-release#200 Issue: cloudfoundry/eirini-release#219 Issue: cloudfoundry/eirini-release#220 Issue: cloudfoundry/eirini-release#221 Issue: cloudfoundry/eirini-release#218 Issue: cloudfoundry/eirini-release#222 Issue: cloudfoundry/eirini-release#223 Issue: cloudfoundry/eirini-release#224
Instead of parsing the kube config ourselves and invoking a credentials plugin if configured, we can use the client-go similarly to how we used it for auth-provider users. The catch is that the exec authenticator sets details on a transport config object, but it is still possible to extract certificate information and to use the request wrapping. This feels slightly more hacky than the auth-provider code. But then again, the k8s folks seem careful with their private methods, so we might assume that the public interface will be maintained. Issue: cloudfoundry/cf-crd-explorations#64 Co-authored-by: Anonymous Eirininaut <[email protected]> Issue: cloudfoundry/eirini-release#182 Issue: cloudfoundry/eirini-release#184 Issue: cloudfoundry/eirini-release#185 Issue: cloudfoundry/eirini-release#187 Issue: cloudfoundry/eirini-release#186 Issue: cloudfoundry/eirini-release#183 Issue: cloudfoundry/eirini-release#192 Issue: cloudfoundry/eirini-release#193 Issue: cloudfoundry/eirini-release#194 Issue: cloudfoundry/eirini-release#191 Issue: cloudfoundry/eirini-release#196 Issue: cloudfoundry/eirini-release#199 Issue: cloudfoundry/eirini-release#200 Issue: cloudfoundry/eirini-release#219 Issue: cloudfoundry/eirini-release#220 Issue: cloudfoundry/eirini-release#221 Issue: cloudfoundry/eirini-release#218 Issue: cloudfoundry/eirini-release#222 Issue: cloudfoundry/eirini-release#223 Issue: cloudfoundry/eirini-release#224
Background
We now believe that the best way to support authentication against all different types of Kubernetes clusters is to use
$KUBECONFIG
. The explore describes the different types of authentication$KUBECONFIG
supports. We believe we can support all of them (except the deprecated ones).Questions
Among the different
auth-provider
configs, OIDC is the only one which is not getting deprecated. We believe we can support it, as it stores the ID and refresh tokens we're used to, but we want to make sure we can do this fully. In particular, we want to confirm that we can refresh the token when necessary. Obtaining the token is out of scope, as it is assumed that the user has already done it at this point.The text was updated successfully, but these errors were encountered: