ContainerImage.Pinniped/internal/controller
Ryan Richard f0d120a6ca Fix broken upstream OIDC discovery timeout added in previous commit
After noticing that the upstream OIDC discovery calls can hang
indefinitely, I had tried to impose a one minute timeout on them
by giving them a timeout context. However, I hadn't noticed that the
context also gets passed into the JWKS fetching object, which gets
added to our cache and used later. Therefore the timeout context
was added to the cache and timed out while sitting in the cache,
causing later JWKS fetchers to fail.

This commit is trying again to impose a reasonable timeout on these
discovery and JWKS calls, but this time by using http.Client's Timeout
field, which is documented to be a timeout for *each* request/response
cycle, so hopefully this is a more appropriate way to impose a timeout
for this use case. The http.Client instance ends up in the cache on
the JWKS fetcher object, so the timeout should apply to each JWKS
request as well.

Requests that can hang forever are effectively a server-side resource
leak, which could theoretically be taken advantage of in a denial of
service attempt, so it would be nice to avoid having them.
2021-07-08 09:44:02 -07:00
..
apicerts dynamiccert: split into serving cert and CA providers 2021-03-15 12:24:07 -04:00
authenticator impersonator: add support for service account token authentication 2021-04-29 17:30:35 -04:00
conditionsutil Split package upstreamwatchers into four packages 2021-05-12 14:00:39 -07:00
impersonatorconfig Tolerate NotFound when deleting services in impersonatorconfig. 2021-06-03 12:07:19 -05:00
issuerconfig When merging CredentialIssuer updates, don't overwrite LastUpdated. 2021-05-27 17:09:12 -05:00
kubecertagent Create CredentialIssuer at install, not runtime. 2021-05-19 17:15:25 -05:00
supervisorconfig Fix broken upstream OIDC discovery timeout added in previous commit 2021-07-08 09:44:02 -07:00
supervisorstorage Merge branch 'main' into initial_ldap 2021-05-11 11:09:37 -07:00
controller_test.go Clean this test up a trivial amount using require.Implementsf(). 2020-12-17 08:38:16 -06:00
utils.go Upstream Watcher Controller Syncs less often by adjusting its filters 2020-12-18 15:41:18 -08:00