Fix structured authorization webhook timeout wiring

This commit is contained in:
Jordan Liggitt
2024-06-17 11:08:30 -04:00
parent 6c556cb9c2
commit c50f68d6ee
3 changed files with 21 additions and 1 deletions

View File

@@ -128,6 +128,9 @@ func (r *reloadableAuthorizerResolver) newForConfig(authzConfig *authzconfig.Aut
if err != nil {
return nil, nil, err
}
if configuredAuthorizer.Webhook.Timeout.Duration != 0 {
clientConfig.Timeout = configuredAuthorizer.Webhook.Timeout.Duration
}
var decisionOnError authorizer.Decision
switch configuredAuthorizer.Webhook.FailurePolicy {
case authzconfig.FailurePolicyNoOpinion: