feat: cache oidc.Provider to reduce pressure on OIDC identity provider (#47)
All checks were successful
Cadoles/bouncer/pipeline/pr-develop This commit looks good

This commit is contained in:
2025-03-07 10:11:37 +01:00
committed by wpetit
parent 076a3d784e
commit 2df74bad4f
5 changed files with 45 additions and 14 deletions

View File

@ -20,6 +20,7 @@ func NewDefaultLayersConfig() LayersConfig {
TransportConfig: NewDefaultTransportConfig(),
Timeout: NewInterpolatedDuration(10 * time.Second),
},
ProviderCacheTimeout: NewInterpolatedDuration(time.Hour),
},
Sessions: AuthnLayerSessionConfig{
TTL: NewInterpolatedDuration(time.Hour),
@ -45,7 +46,8 @@ type AuthnLayerSessionConfig struct {
}
type AuthnOIDCLayerConfig struct {
HTTPClient AuthnOIDCHTTPClientConfig `yaml:"httpClient"`
HTTPClient AuthnOIDCHTTPClientConfig `yaml:"httpClient"`
ProviderCacheTimeout *InterpolatedDuration `yaml:"providerCacheTimeout"`
}
type AuthnOIDCHTTPClientConfig struct {