@@ -43,7 +43,6 @@ type BuiltInAuthenticationOptions struct {
43
43
BootstrapToken * BootstrapTokenAuthenticationOptions
44
44
ClientCert * genericoptions.ClientCertAuthenticationOptions
45
45
OIDC * OIDCAuthenticationOptions
46
- PasswordFile * PasswordFileAuthenticationOptions
47
46
RequestHeader * genericoptions.RequestHeaderAuthenticationOptions
48
47
ServiceAccounts * ServiceAccountAuthenticationOptions
49
48
TokenFile * TokenFileAuthenticationOptions
@@ -73,10 +72,6 @@ type OIDCAuthenticationOptions struct {
73
72
RequiredClaims map [string ]string
74
73
}
75
74
76
- type PasswordFileAuthenticationOptions struct {
77
- BasicAuthFile string
78
- }
79
-
80
75
type ServiceAccountAuthenticationOptions struct {
81
76
KeyFiles []string
82
77
Lookup bool
@@ -108,7 +103,6 @@ func (s *BuiltInAuthenticationOptions) WithAll() *BuiltInAuthenticationOptions {
108
103
WithBootstrapToken ().
109
104
WithClientCert ().
110
105
WithOIDC ().
111
- WithPasswordFile ().
112
106
WithRequestHeader ().
113
107
WithServiceAccounts ().
114
108
WithTokenFile ().
@@ -135,11 +129,6 @@ func (s *BuiltInAuthenticationOptions) WithOIDC() *BuiltInAuthenticationOptions
135
129
return s
136
130
}
137
131
138
- func (s * BuiltInAuthenticationOptions ) WithPasswordFile () * BuiltInAuthenticationOptions {
139
- s .PasswordFile = & PasswordFileAuthenticationOptions {}
140
- return s
141
- }
142
-
143
132
func (s * BuiltInAuthenticationOptions ) WithRequestHeader () * BuiltInAuthenticationOptions {
144
133
s .RequestHeader = & genericoptions.RequestHeaderAuthenticationOptions {}
145
134
return s
@@ -274,13 +263,6 @@ func (s *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) {
274
263
"Repeat this flag to specify multiple claims." )
275
264
}
276
265
277
- if s .PasswordFile != nil {
278
- fs .StringVar (& s .PasswordFile .BasicAuthFile , "basic-auth-file" , s .PasswordFile .BasicAuthFile , "" +
279
- "If set, the file that will be used to admit requests to the secure port of the API server " +
280
- "via http basic authentication." )
281
- fs .MarkDeprecated ("basic-auth-file" , "Basic authentication mode is deprecated and will be removed in a future release. It is not recommended for production environments." )
282
- }
283
-
284
266
if s .RequestHeader != nil {
285
267
s .RequestHeader .AddFlags (fs )
286
268
}
@@ -377,10 +359,6 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticat
377
359
ret .OIDCRequiredClaims = s .OIDC .RequiredClaims
378
360
}
379
361
380
- if s .PasswordFile != nil {
381
- ret .BasicAuthFile = s .PasswordFile .BasicAuthFile
382
- }
383
-
384
362
if s .RequestHeader != nil {
385
363
var err error
386
364
ret .RequestHeaderConfig , err = s .RequestHeader .ToAuthenticationRequestHeaderConfig ()
@@ -447,8 +425,6 @@ func (o *BuiltInAuthenticationOptions) ApplyTo(c *genericapiserver.Config) error
447
425
}
448
426
}
449
427
450
- c .Authentication .SupportsBasicAuth = o .PasswordFile != nil && len (o .PasswordFile .BasicAuthFile ) > 0
451
-
452
428
c .Authentication .APIAudiences = o .APIAudiences
453
429
if o .ServiceAccounts != nil && o .ServiceAccounts .Issuer != "" && len (o .APIAudiences ) == 0 {
454
430
c .Authentication .APIAudiences = authenticator.Audiences {o .ServiceAccounts .Issuer }
0 commit comments