@@ -11,11 +11,8 @@ import (
11
11
"k8s.io/apimachinery/pkg/apimachinery/registered"
12
12
"k8s.io/apimachinery/pkg/runtime"
13
13
"k8s.io/apimachinery/pkg/runtime/serializer"
14
- "k8s.io/apiserver/pkg/authentication/authenticatorfactory"
15
14
genericapiserver "k8s.io/apiserver/pkg/server"
16
15
genericoptions "k8s.io/apiserver/pkg/server/options"
17
- authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
18
- "k8s.io/client-go/rest"
19
16
"k8s.io/kubernetes/pkg/kubectl/cmd/util"
20
17
21
18
"io/ioutil"
@@ -128,32 +125,9 @@ func (o TemplateServiceBrokerServerOptions) Config() (*server.TemplateServiceBro
128
125
if err := o .SecureServing .ApplyTo (serverConfig ); err != nil {
129
126
return nil , err
130
127
}
131
-
132
- // TODO restore this after https://github.com/openshift/openshift-ansible/issues/5056 is fixed
133
- //if err := o.Authentication.ApplyTo(serverConfig); err != nil {
134
- // return nil, err
135
- //}
136
- // the TSB server *can* limp along without terminating client certs or front proxy authn. Do that for now
137
- // this wiring is a bit tricky.
138
- clientConfig , err := rest .InClusterConfig ()
139
- if err != nil {
140
- return nil , err
141
- }
142
- client , err := authenticationclient .NewForConfig (clientConfig )
143
- if err != nil {
128
+ if err := o .Authentication .ApplyTo (serverConfig ); err != nil {
144
129
return nil , err
145
130
}
146
- authenticationConfig := authenticatorfactory.DelegatingAuthenticatorConfig {
147
- Anonymous : true ,
148
- TokenAccessReviewClient : client .TokenReviews (),
149
- CacheTTL : o .Authentication .CacheTTL ,
150
- }
151
- authenticator , _ , err := authenticationConfig .New ()
152
- if err != nil {
153
- return nil , err
154
- }
155
- serverConfig .Authenticator = authenticator
156
-
157
131
if err := o .Authorization .ApplyTo (serverConfig ); err != nil {
158
132
return nil , err
159
133
}
0 commit comments