kubernetes/pkg/master
Charles Eckman 5a176ac772 Provide OIDC discovery endpoints
- Add handlers for service account issuer metadata.
- Add option to manually override JWKS URI.
- Add unit and integration tests.
- Add a separate ServiceAccountIssuerDiscovery feature gate.

Additional notes:
- If not explicitly overridden, the JWKS URI will be based on
  the API server's external address and port.

- The metadata server is configured with the validating key set rather
than the signing key set. This allows for key rotation because tokens
can still be validated by the keys exposed in the JWKs URL, even if the
signing key has been rotated (note this may still be a short window if
tokens have short lifetimes).

- The trust model of OIDC discovery requires that the relying party
fetch the issuer metadata via HTTPS; the trust of the issuer metadata
comes from the server presenting a TLS certificate with a trust chain
back to the from the relying party's root(s) of trust. For tests, we use
a local issuer (https://kubernetes.default.svc) for the certificate
so that workloads within the cluster can authenticate it when fetching
OIDC metadata. An API server cannot validly claim https://kubernetes.io,
but within the cluster, it is the authority for kubernetes.default.svc,
according to the in-cluster config.

Co-authored-by: Michael Taufen <mtaufen@google.com>
2020-02-11 16:23:31 -08:00
..
controller generated: run refactor 2020-02-08 12:30:21 -05:00
ports kube-scheduler: enable secure ports 10259 2018-11-08 16:43:59 +01:00
reconcilers generated: run refactor 2020-02-08 12:30:21 -05:00
storageversionhashdata Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
tunneler pkg/master: Fix static check failures 2019-11-27 09:15:57 +08:00
BUILD Merge pull request #85903 from liggitt/disable-deprecated-apis 2019-12-13 16:19:36 -08:00
client_util.go generated: run refactor 2020-02-08 12:30:21 -05:00
controller_test.go Check that endpoint has subset before accessing first subset 2019-11-11 10:55:16 -08:00
controller.go generated: run refactor 2020-02-08 12:30:21 -05:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
import_known_versions_test.go Break out common API testing functionality from pkg/master 2019-01-04 20:52:35 +02:00
import_known_versions.go non-generated api models misc 2019-10-29 12:26:12 +08:00
master_openapi_test.go API Machinery, Kubectl and tests 2019-02-04 13:51:48 -08:00
master_test.go generated: run refactor 2020-02-08 12:30:21 -05:00
master.go Provide OIDC discovery endpoints 2020-02-11 16:23:31 -08:00
OWNERS Prune inactive owners from pkg/* misc api-machinery related OWNERS files. 2019-10-13 08:46:12 -04:00
services.go pkg/master: Fix static check failures 2019-11-27 09:15:57 +08:00