Skip to content

Commit

Permalink
feat: support config ignore authz prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
yadzhang committed May 8, 2020
1 parent 4624cad commit e04cc7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/tke-audit-api/app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func CreateConfigFromOptions(serverName string, opts *options.Options) (*Config,
genericAPIServerConfig := genericapiserver.NewConfig(apiserver.Codecs)
var ignoredAuthPathPrefixes []string
ignoredAuthPathPrefixes = append(ignoredAuthPathPrefixes, audit.IgnoredAuthPathPrefixes()...)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(ignoredAuthPathPrefixes)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(ignoredAuthPathPrefixes, nil)
genericAPIServerConfig.EnableIndex = false
genericAPIServerConfig.EnableDiscovery = false
genericAPIServerConfig.EnableProfiling = false
Expand Down
2 changes: 1 addition & 1 deletion cmd/tke-gateway/app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func CreateConfigFromOptions(serverName string, opts *options.Options) (*Config,
ignoreAuthPathPrefixes = append(ignoreAuthPathPrefixes, chartmuseum.IgnoredAuthPathPrefixes()...)
ignoreAuthPathPrefixes = append(ignoreAuthPathPrefixes, authapiserver.IgnoreAuthPathPrefixes()...)
ignoreAuthPathPrefixes = append(ignoreAuthPathPrefixes, audit.IgnoredAuthPathPrefixes()...)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(ignoreAuthPathPrefixes)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(ignoreAuthPathPrefixes, nil)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(ignoreAuthPathPrefixes, nil)
genericAPIServerConfig.MaxRequestBodyBytes = chartmuseum.MaxUploadSize
genericAPIServerConfig.LongRunningFunc = filter.LongRunningRequestCheck(sets.NewString(), sets.NewString(), []string{"/"})
Expand Down
2 changes: 1 addition & 1 deletion cmd/tke-logagent-api/app/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Config struct {
//config relies on options
func CreateConfigFromOptions(serverName string, opts *options.Options) (*Config, error) {
genericAPIServerConfig := genericapiserver.NewConfig(logagent.Codecs)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(nil)
genericAPIServerConfig.BuildHandlerChainFunc = handler.BuildHandlerChain(nil, nil)
genericAPIServerConfig.MergedResourceConfig = apiserver.DefaultAPIResourceConfigSource()
genericAPIServerConfig.EnableIndex = false
genericAPIServerConfig.EnableProfiling = false
Expand Down

0 comments on commit e04cc7b

Please sign in to comment.