Merge pull request #40277 from liggitt/builtin-nil-check

Automatic merge from submit-queue (batch tested with PRs 40196, 40143, 40277)

avoid incorrect short-circuit of client-ca setup

PasswordFile options should only affect computation of the SupportsBasicAuth field, not short-circuit setting up the client ca certpool
This commit is contained in:
Kubernetes Submit Queue 2017-01-23 05:39:05 -08:00 committed by GitHub
commit 23694f9939

View File

@ -298,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au
}
func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
if o == nil || o.PasswordFile == nil {
if o == nil {
return nil
}
@ -316,7 +316,8 @@ func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error {
}
}
c.SupportsBasicAuth = len(o.PasswordFile.BasicAuthFile) > 0
c.SupportsBasicAuth = o.PasswordFile != nil && len(o.PasswordFile.BasicAuthFile) > 0
return nil
}