From c6c0b8518e64917e42e05d96f887eef48765a4ba Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Sun, 22 Jan 2017 14:50:42 -0500 Subject: [PATCH] avoid incorrect short-circuit of client-ca setup --- pkg/kubeapiserver/options/authentication.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/kubeapiserver/options/authentication.go b/pkg/kubeapiserver/options/authentication.go index 971c4be4135..c5bdf0e8e2a 100644 --- a/pkg/kubeapiserver/options/authentication.go +++ b/pkg/kubeapiserver/options/authentication.go @@ -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 }