mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Add authentication to openapi Spec
This commit is contained in:
@@ -117,7 +117,7 @@ func Run(s *options.ServerRunOptions) error {
|
||||
storageFactory.SetEtcdLocation(groupResource, servers)
|
||||
}
|
||||
|
||||
apiAuthenticator, err := authenticator.New(authenticator.AuthenticatorConfig{
|
||||
apiAuthenticator, securityDefinitions, err := authenticator.New(authenticator.AuthenticatorConfig{
|
||||
Anonymous: s.AnonymousAuth,
|
||||
AnyToken: s.EnableAnyToken,
|
||||
BasicAuthFile: s.BasicAuthFile,
|
||||
@@ -200,6 +200,7 @@ func Run(s *options.ServerRunOptions) error {
|
||||
// this method does not provide good operation IDs for federation, we should create federation's own GetOperationID.
|
||||
genericConfig.OpenAPIConfig.GetOperationID = apiserveropenapi.GetOperationID
|
||||
genericConfig.EnableOpenAPISupport = true
|
||||
genericConfig.OpenAPIConfig.SecurityDefinitions = securityDefinitions
|
||||
|
||||
// TODO: Move this to generic api server (Need to move the command line flag).
|
||||
if s.EnableWatchCache {
|
||||
|
||||
Reference in New Issue
Block a user