Commit Graph

546 Commits

Author SHA1 Message Date
Jefftree cbcdfbfd72 Network Proxy: GRPC + HTTP Connect with UDS
Kubernetes-commit: 725d2b6a8fd7733afcbc6822723f4c7e171bcd7f
2020-01-13 21:23:39 -08:00
Vincent C 27ae2b291d replaced tokenaccessreview with tokenreview
Kubernetes-commit: b410f77d3140ebc19037e6089d0d45980f0c6edf
2020-02-19 22:41:35 +08:00
yue9944882 1c89464ba6 adding response headers
Kubernetes-commit: da6f89217d357a6683ca4a7825c673d7c2af92f0
2020-02-17 16:06:13 +08:00
Mike Spreitzer 1c79014daa Added API Priority and Fairness filter and config consumer
Kubernetes-commit: 73614ddd4e42728a36c7ac6b7b20f27c8032cafb
2020-01-25 19:47:12 -05:00
Charles Eckman af3997fcac 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>

Kubernetes-commit: 5a176ac77241ff059f22609fc569ac219334238c
2019-01-29 13:46:37 -08:00
Mike Danese 337d7943db generated: run refactor
Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
2020-02-07 18:16:47 -08:00
Tim Allclair 56dc51d310 Ensure testing credentials are labeled as such
Kubernetes-commit: 9d3670f3586c98c02cdca93b7c98dd91fc0b87bd
2020-02-04 10:36:05 -08:00
Han Kang 08990c3cd6 remove client label from healthz metric test
Change-Id: I4082ff771e5912c68e2811cab07c4d488ab014ac

Kubernetes-commit: 75cf4d79f2c52a122d786812eaaed8557e928552
2020-01-29 13:32:12 -08:00
David Eads 78efdd9c66 rename dynamic cert loading to be more accurate
Kubernetes-commit: 5c2d2c5ef1ab08eb4dfaec0947e1ce252119c85d
2020-01-17 15:50:26 -05:00
Jonathan Tomer 114cbd8352 healthz: instrument root healthz requests for metrics
Kubernetes-commit: 9dadafa8979619495317f166bf8bd4803ec89452
2019-10-07 15:21:17 -07:00
Daniel Smith 09aa6a7555 make request logs greppable
Kubernetes-commit: e4a18dee73547e29eb1572af6da29364d64df2ab
2020-01-14 10:19:35 -08:00
danielqsj b31ce5f20e remove deprecated metrics of apiserver
Kubernetes-commit: 060756babbb6991cf9426c38be595d23e7124b4e
2019-04-12 16:15:13 +08:00
willise f0281f38ec fix: typos in comments of admission
Kubernetes-commit: e8b5658bd11384d2796f9512f6edb95c632a0a59
2020-01-10 14:01:06 +08:00
David Eads 2e81ed6ee9 allow an SNI cert to be used to respond for a particular IP
Kubernetes-commit: 2c8639deb70c5934109022372caa32ca029db473
2019-11-14 16:08:11 -05:00
Antonio Ojea e29a8f8fd0 clarify apiserver bind-address flag usage
From the listen godoc:

For TCP networks, if the host in the address parameter is empty or a
literal unspecified IP address, Listen listens on all available unicast
and anycast IP addresses of the local system.

Since the BindNetwork options is "tcp" by default, using an unspecified
address doesn't bind the listener to the IP family.

Kubernetes-commit: 05010d23ac7751a17aa26fb5cc011eb4f2127b1e
2020-01-04 10:51:48 +01:00
David Eads fe6638e697 prevent blocking wait in cert reloading
Kubernetes-commit: c14280e8d399b0db512989cfc33f8b1344d41f91
2019-12-18 08:41:57 -05:00
Bai Jianfei c8c7889d76 Count dropped requests except system previledged group requests.
Kubernetes-commit: b13e22482eac7a1964a8d1c900fe9e1908f67eee
2019-12-22 17:24:53 +08:00
Jin Hase 132e8e3270 Clean up kube-apiserver reference document
Kubernetes-commit: 49b6e40461766dc7785c99cd0be77b6db37d5d75
2019-12-24 21:21:06 +09:00
Antonio Ojea 223a85f36f apiserver: add localhost to alternateDNS for IPv6
apiserver adds localhost to the alternateDNS field
if the bind address is 0.0.0.0.
This PR considers the IPv6 unspecified address too.

Kubernetes-commit: 29ec87f769c6494fad5c0a0c624efe2dc6eeab13
2019-12-20 12:10:59 +01:00
Jianfei Bai f9ce5c1c1d Move added info and status stack trace to the end of line.
Kubernetes-commit: 5743cffd5d54e280a3dcaba8e690590a2167f71d
2019-12-13 10:53:04 +08:00
Shihang Zhang 6207833539 ping kmsplugin gentely when in good state
Change-Id: I50ce249d7996e5c51dcbb00e53d67300aa72a87f

Kubernetes-commit: c084d57b18a7c90c14bc13dc2daa256e84037a74
2019-12-02 16:38:03 -08:00
immutablet 5cec6b4746 Add defaulting logic for EncryptionConfiguration.
Kubernetes-commit: a151aa35dc21881d178e498141e5f58df13fb400
2019-11-14 22:53:18 -08:00
Michal Fojtik 84578a6062 apiserver: add Retry-After header to response when apiserver is shutting down
Kubernetes-commit: a3c82e8ae313a6ed97a63a4435438aa067225527
2019-11-20 17:30:52 +01:00
Mike Spreitzer b017e16e12 Renamed FeatureGate RequestManagement to APIPriorityAndFairness
The old name is too broad, we wanted a name that is more specific to
the actual feature.

This is an alpha gate, and no release has yet associated any
functionality with this gate.

Kubernetes-commit: 76d090e30f917888c5882228f7261ed31a34a2ab
2019-11-14 01:34:59 -05:00
immutablet 6e01b8c8f3 Move test inputs for EncryptionConfiguration tests into testdata.
Kubernetes-commit: 883e9a0b502b787a9454e10c26e324ffaa30eb29
2019-11-13 16:38:20 -08:00
Jordan Liggitt 54aa70b012 Add support for --runtime-config=api/beta=false, --feature-gates=AllBeta=false
Allow disabling all beta features and APIs

Kubernetes-commit: a5760dee812d280e4de203fccf58214051d0d62a
2019-10-12 09:59:14 -04:00
David Eads 0de0bb0422 dynamic reload cluster authentication info for aggregated API servers
Kubernetes-commit: 3aede35b3b042e8a626e8fb9e1e181e73cd29d0a
2019-11-04 13:46:28 -05:00
David Eads 79c6550889 allow individual ca bundles to be empty in union
Kubernetes-commit: 758f2ce44f82d68a1a67765823179c3f743e199d
2019-11-12 12:44:53 -05:00
Jordan Liggitt 4b9c976f43 AdmissionConfiguration v1
Kubernetes-commit: 1234290adfa11eb3dd34242c296e1f1dbe211c19
2019-11-11 11:57:29 -05:00
David Eads 331894196f add featuregate inspection as admission plugin initializer
Kubernetes-commit: 675c2fb924e82091f7ce4601e48daf4cc7030e72
2019-11-05 14:28:40 -05:00
Jordan Liggitt 52b3bfb8fa Switch kubelet/aggregated API servers to use v1 subjectaccessreviews
Kubernetes-commit: d54a70db5cfc0887e2f5177b0c3f795947be6eb4
2019-11-04 23:29:56 -05:00
Jordan Liggitt 086ad4b0b9 Switch kubelet/aggregated API servers to use v1 tokenreviews
Kubernetes-commit: 5ef4fe959a45e423d2b992e9c21e6e9db4b950c5
2019-11-04 22:41:32 -05:00
Dan Winship 0031a567fa Fix apiserver to advertise IPv6 endpoints if bound to IPv6
Also rename utilnet.ChooseBindAddress() to ResolveBindAddress(), to
better describe its functionality.

Kubernetes-commit: afa0b808f873b515c9d58a9ead788972ea7d2533
2019-10-30 10:46:46 -04:00
David Eads 80b16c1ce7 allow a verifyoptionsfunc to indicate that no certpool is available
Kubernetes-commit: c672affad176c22da66c7ac17cc8805f08533ce9
2019-11-06 10:38:45 -05:00
Mike Danese 44b9fc84ab migrate callers to g/g/uuid
Kubernetes-commit: a4ca9e6c93e45b4a97e7d04df37362299088f64a
2019-11-04 23:15:20 -08:00
chendotjs 73bcdb7730 Refactor the process to get ip address of loopback interface
Kubernetes-commit: d9cbad7ff197e61fe4ba3a66a7458b1bbaf36f61
2019-11-02 11:14:04 +08:00
Jack Kleeman c4dfb52a33 Dynamic SNI certificates
Reload SNI certificate cert and key file from disk every minute and notify
the dynamic certificate controller when they change, allowing serving
tls config to be updated.

Kubernetes-commit: d9adf535f35051be1d79d1309c72762939593d7c
2019-10-24 17:38:21 +01:00
Wenjia Zhang e518fe04f6 Resolve uncompatibility from update: etcd CAFile -> TrustedCAFIle
Kubernetes-commit: 9ead9373f350c7ad438257a9e8b8977a67b900eb
2019-10-23 11:15:43 -07:00
Jack Kleeman 51b8ce994d Dynamic serving certificate
Reload certificate cert and key file from disk every minute and notify
the dynamic certificate controller when they change, allowing serving
tls config to be updated.

Kubernetes-commit: 3f5fbfbfac281f40c11de2f57d58cc332affc37b
2019-10-22 19:10:40 +01:00
David Eads 84d21cfff4 wire up a means to dynamically reload ca bundles for kube-apiserver
Kubernetes-commit: 6beb96261e29754f2b7d0e44829eb6d15422cebf
2019-10-07 14:06:42 -04:00
David Eads f0a6fac13c add dynamic cabundle from file
Kubernetes-commit: b0c272e1fb6782ca0b755294c6f9046995769553
2019-10-07 12:58:15 -04:00
Jack Kleeman 40fefa1b37 Plumb dynamic SNI certificates
We create and use a dynamic certificate provider for the SNI serving
certificates. Currently we only use static serving certificate
providers, so the files are not reloaded, but we should be able to move
to a provider that is able to reload later on.

Kubernetes-commit: 84bc6b151d0726db0c737443874577f044e0e9c8
2019-10-08 19:03:56 +01:00
Han Kang 00d376192a rename metric for apiserver request terminations and reword corresponding documentation
Change-Id: I47a9c7b10614afe85bb652fa61984f91848d6d65

Kubernetes-commit: f8f1def5f1d92a588f48ebc01293e142f8dd63fd
2019-10-21 13:26:31 -07:00
Han Kang 4a680138c0 Fix double counting issue for request metrics on timeout.
Currently we record request metrics during the normal request flow and
we also manually invoke `Record` in the timeout handler to record
timeouts. This means that we effectively double count whenever we
timeout. This PR renames the `Record` function to `RecordRequestError`
to more accurately reflect the intended side-effect of the function
call.

Change-Id: Ie37fd0c1e501bd525640a434433d364a5fd6dde2

Kubernetes-commit: 4c6e7247878477a1f2efc26df7f141258010374f
2019-10-02 15:04:29 -07:00
Jack Kleeman 8da4640a3d Plumb dynamic serving certificates
We create and use a dynamic certificate provider for the main apiserver
serving certificates: SNI will be handled separately later. Currently we
only use static serving certificate providers, so the files are not
reloaded, but we should be able to move to a provider that is able to
reload later on.

Kubernetes-commit: 6f89f1027488aeba4af0786988c2fd2ace9a6f1d
2019-10-07 18:49:24 +01:00
David Eads 695d42bf49 wire dynamic tlsconfig up to apiserver
Kubernetes-commit: abddbd87cdcf69053e9fc6e752ade7d92c6b9fd7
2019-10-04 08:37:26 -04:00
David Eads 703545a3db add the ability for dynamic header names in delegated authentication
Kubernetes-commit: 58256346693717fd12f121f0cf74fe1e003edb0f
2019-10-03 12:56:42 -04:00
Tim Bannister 9e2288c881 Fix typo
Kubernetes-commit: bbccdcd8531a6377c1fe2937aef24f61caef43c4
2019-09-25 18:02:40 +01:00
David Eads 11d75d5283 refactor tlsConfig creation for secure serving
Kubernetes-commit: e7b41d08270f0b8035b423050e96c7affd4bd8e1
2019-10-04 09:52:49 -04:00
David Eads eee025a27a add ability to authenticators for dynamic update of certs
Kubernetes-commit: 51195dd86012c4c4b17a1707ef50a46fa046f74f
2019-09-05 09:59:59 -04:00