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

Proxy doesn't support auth providers in kubeconfig #3652

Closed
awly opened this issue Apr 30, 2020 · 1 comment · Fixed by #3655
Closed

Proxy doesn't support auth providers in kubeconfig #3652

awly opened this issue Apr 30, 2020 · 1 comment · Fixed by #3655
Assignees

Comments

@awly
Copy link
Contributor

awly commented Apr 30, 2020

Description

What happened:

Running proxy with a kubeconfig that uses auth providers (gcp/azure/openstack/etc) will fail at startup with Original Error: *errors.errorString no Auth Provider found for name "gcp"

There are a few missing pieces:

  • teleport binary should import k8s.io/client-go/plugin/pkg/client/auth for support to be compiled in
  • lib/kube/proxy/forwarder.go should propagate their credentials (usually bearer tokens) with http.RoundTripper wrappers (instead of cfg.BearerToken, since they are dynamically generated)
    • note: there seem to be two separate authn plumbing code paths for exec/portforward/etc and all other requests
    • we should probably unify those and make connecting+authn independent from what kind of request this is (if possible)

Note: auth providers are on the path to deprecation. However, at least GCP currently still defaults to them instead of exec plugins.

What you expected to happen:

Proxy starts successfully and provisions either mTLS key/certs or bearers token from auth providers.

How to reproduce it (as minimally and precisely as possible):

  1. gcloud container clusters create foo
  2. teleport start with a config pointing at kubeconfig generated by gcloud
@awly awly self-assigned this Apr 30, 2020
@awly
Copy link
Contributor Author

awly commented May 1, 2020

Talked to @klizhentas, we will only support gcp and azure providers, but not oidc or openstack.
This gives us coverage for most popular k8s hosting providers and keeps attack surface increase small.

Exec providers (which are, confusingly, not a type of "auth provider") are supported by default without magic imports. However, we're not using http.RoundTripper wrapping correctly to support bearer tokens from exec providers (which is what AWS uses).

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

Successfully merging a pull request may close this issue.

1 participant