mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 09:57:52 +00:00
Clear front proxy headers after authentication is complete
This matches the logic we have for the Authorization header as well as the impersonation headers. Signed-off-by: Monis Khan <mok@microsoft.com>
This commit is contained in:
@@ -237,6 +237,10 @@ func (o *BuiltInAuthenticationOptions) Validate() []error {
|
||||
}
|
||||
}
|
||||
|
||||
if o.RequestHeader != nil {
|
||||
allErrors = append(allErrors, o.RequestHeader.Validate()...)
|
||||
}
|
||||
|
||||
return allErrors
|
||||
}
|
||||
|
||||
@@ -472,6 +476,7 @@ func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.Authen
|
||||
}
|
||||
}
|
||||
|
||||
authInfo.RequestHeaderConfig = authenticatorConfig.RequestHeaderConfig
|
||||
authInfo.APIAudiences = o.APIAudiences
|
||||
if o.ServiceAccounts != nil && len(o.ServiceAccounts.Issuers) != 0 && len(o.APIAudiences) == 0 {
|
||||
authInfo.APIAudiences = authenticator.Audiences(o.ServiceAccounts.Issuers)
|
||||
|
Reference in New Issue
Block a user