Skip to content

Commit

Permalink
use upstream authentication filter
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Sep 1, 2017
1 parent 98c26b3 commit dbd79a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
34 changes: 0 additions & 34 deletions pkg/cmd/server/handlers/authentication.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/cmd/server/origin/controller/standalone_apiserver.go
Expand Up @@ -62,7 +62,7 @@ func RunControllerServer(servingInfo configapi.HTTPServingInfo, kubeExternal cli
// we use direct bypass to allow readiness and health to work regardless of the master health
authz := serverhandlers.NewBypassAuthorizer(remoteAuthz, "/healthz", "/healthz/ready")
handler := serverhandlers.AuthorizationFilter(mux, authz, authorizationAttributeBuilder, requestContextMapper)
handler = serverhandlers.AuthenticationHandlerFilter(handler, authn, requestContextMapper)
handler = apifilters.WithAuthentication(handler, requestContextMapper, authn, apifilters.Unauthorized(false))
handler = apiserverfilters.WithPanicRecovery(handler)
handler = apifilters.WithRequestInfo(handler, requestInfoResolver, requestContextMapper)
handler = apirequest.WithRequestContext(handler, requestContextMapper)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/origin/master.go
Expand Up @@ -311,7 +311,7 @@ func (c *MasterConfig) buildHandlerChain() (func(apiHandler http.Handler, kc *ap
})
handler = apifilters.WithAudit(handler, genericConfig.RequestContextMapper, c.AuditBackend, auditPolicyChecker, genericConfig.LongRunningFunc)
}
handler = serverhandlers.AuthenticationHandlerFilter(handler, c.Authenticator, genericConfig.RequestContextMapper)
handler = apifilters.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, apifilters.Unauthorized(false))
handler = apiserverfilters.WithCORS(handler, c.Options.CORSAllowedOrigins, nil, nil, nil, "true")
handler = apiserverfilters.WithTimeoutForNonLongRunningRequests(handler, genericConfig.RequestContextMapper, genericConfig.LongRunningFunc)
// TODO: MaxRequestsInFlight should be subdivided by intent, type of behavior, and speed of
Expand Down

0 comments on commit dbd79a7

Please sign in to comment.