Commit Graph

6 Commits

Author SHA1 Message Date
Margo Crawford
f015fd66ce Check whether static cert is already configured in UpdateTransportConfig
- Also update test-cmd.sh to pass a signing ca to the kube controller
  manager, so CSRs work properly in integration tests.

Signed-off-by: Margo Crawford <margaretc@vmware.com>
2022-03-07 13:54:32 -08:00
Andrew Keesler
20e1c4d754
exec credential provider: update tests+metadata for v1
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
2021-07-06 09:48:35 -04:00
Andrew Keesler
e427d2f22a
test/cmd: kubectl and exec plugins don't fight for stdin
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
2021-06-15 09:01:18 -04:00
Andrew Keesler
9dee2b95c2
exec credential provider: don't run exec plugin with basic auth
If a user specifies basic auth, then apply the same short circuit logic
that we do for bearer tokens (see comment).

Signed-off-by: Andrew Keesler <akeesler@vmware.com>
2021-05-21 13:51:03 -04:00
Anders Eknert
c595f983fa Move kube_flags_without_token creation 2020-07-06 21:55:23 +02:00
Anders Eknert
b423216a3b Presence of bearer token should cancel exec action
If a bearer token is present in a request, the exec credential plugin should accept that as the chosen method of authentication. Judging by an [earlier comment in exec.go](c18bc7e9f7/staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go (L217)), this was already intended. This would however not work since UpdateTransportConfig would set the GetCert callback which would then get called by the transport, triggering the exec plugin action even with a token present in the request. See linked issue for further details.

See #87369 for further details.

Signed-off-by: Anders Eknert <anders.eknert@bisnode.com>
2020-07-02 12:12:32 +02:00