ContainerImage.Pinniped/internal
Ryan Richard f46de56b95 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:48:03 -07:00
..
certauthority Add a CA.Pool() method to ./internal/certauthority. 2020-12-02 15:55:34 -06:00
client Merge branch 'main' of github.com:vmware-tanzu/pinniped into kubernetes-1.20 2021-01-08 13:22:31 -08:00
concierge Merge branch 'main' of github.com:vmware-tanzu/pinniped into kubernetes-1.20 2021-01-08 13:22:31 -08:00
config Add log level support 2020-11-10 10:22:27 -05:00
constable Save 2 lines by using inline-style comments for Copyright 2020-09-16 10:35:19 -04:00
controller Fix broken upstream OIDC discovery timeout added in previous commit 2021-07-08 09:48:03 -07:00
controllerlib Disable the goerr113 linter. 2020-12-07 15:53:41 -06:00
controllermanager Merge branch 'main' of github.com:vmware-tanzu/pinniped into kubernetes-1.20 2021-01-08 13:22:31 -08:00
crud Supervisor storage garbage collection controller enabled in production 2020-12-11 15:21:34 -08:00
deploymentref Always set an owner ref back to our deployment 2021-01-07 15:25:40 -05:00
downward internal/downward: add support for (optional) pod name 2020-12-11 11:49:27 -05:00
dynamiccert internal/provider -> internal/dynamiccert 2020-09-23 08:29:35 -04:00
fositestorage Update ExpectedAuthorizeCodeSessionJSONFromFuzzing. 2020-12-17 16:31:08 -06:00
here Save 2 lines by using inline-style comments for Copyright 2020-09-16 10:35:19 -04:00
httputil Simplify securityheader package by merging header fields. 2020-12-16 12:41:05 -06:00
kubeclient Merge branch 'main' of github.com:vmware-tanzu/pinniped into kubernetes-1.20 2021-01-08 13:22:31 -08:00
mocks Changing references from 1.19 to 1.20 2021-01-07 15:25:47 -08:00
multierror Backfill tests to OIDCProviderConfig controller 2020-10-09 10:39:17 -04:00
oidc Change access token storage TTL to match refresh. 2021-05-25 16:48:28 -05:00
ownerref Always set an owner ref back to our deployment 2021-01-07 15:25:40 -05:00
plog Finish the WIP from the previous commit for saving authorize endpoint state 2020-11-11 12:29:14 -08:00
registry/credentialrequest Changing references from 1.19 to 1.20 2021-01-07 15:25:47 -08:00
secret Rename off of main 2020-12-16 14:27:09 -08:00
testutil Be more lax in some of our test assertions. 2020-12-16 13:15:38 -06:00
upstreamoidc PR feedback-- omit empty groups, keep groups as nil until last minute 2021-01-14 15:11:00 -08:00