Files
ziti/controller/model/handlers.go
T
Andrew Martinez 308d7f3a10 mfa initial
- add mfa read endpoints
- add mfa enroll enpoints
- fix mfa library timing issues
- adds mfa at tests
- adds admin mfa management endpoints
- adds admin mfa at tests
- improve at tests
- fix auth check vs auth query
- fix swagger for auth queryies
- fix swagger doc
- adds more api tests for validation
- redo auth query structure
- redo mfa endpoints
- move mfa verify to authenticate router:wq
- add recovery code support and tests
- add partial session authentication status
2021-01-19 08:36:27 -05:00

88 lines
3.2 KiB
Go

/*
Copyright NetFoundry, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package model
import (
"github.com/openziti/fabric/controller/network"
)
type Handlers struct {
// fabric
Router *network.RouterController
Service *network.ServiceController
Terminator *network.TerminatorController
// edge
ApiSession *ApiSessionHandler
ApiSessionCertificate *ApiSessionCertificateHandler
Ca *CaHandler
Config *ConfigHandler
ConfigType *ConfigTypeHandler
EdgeRouter *EdgeRouterHandler
EdgeRouterPolicy *EdgeRouterPolicyHandler
EdgeService *EdgeServiceHandler
EventLog *EventLogHandler
GeoRegion *GeoRegionHandler
Identity *IdentityHandler
IdentityType *IdentityTypeHandler
PolicyAdvisor *PolicyAdvisor
ServiceEdgeRouterPolicy *ServiceEdgeRouterPolicyHandler
ServicePolicy *ServicePolicyHandler
TransitRouter *TransitRouterHandler
Session *SessionHandler
Authenticator *AuthenticatorHandler
Enrollment *EnrollmentHandler
PostureCheck *PostureCheckHandler
PostureCheckType *PostureCheckTypeHandler
PostureResponse *PostureResponseHandler
Mfa *MfaHandler
}
func InitHandlers(env Env) *Handlers {
handlers := &Handlers{}
handlers.Router = env.GetDbProvider().GetControllers().Routers
handlers.Service = env.GetDbProvider().GetControllers().Services
handlers.Terminator = env.GetDbProvider().GetControllers().Terminators
handlers.ApiSession = NewApiSessionHandler(env)
handlers.ApiSessionCertificate = NewApiSessionCertificateHandler(env)
handlers.Authenticator = NewAuthenticatorHandler(env)
handlers.Ca = NewCaHandler(env)
handlers.Config = NewConfigHandler(env)
handlers.ConfigType = NewConfigTypeHandler(env)
handlers.EdgeRouter = NewEdgeRouterHandler(env)
handlers.EdgeRouterPolicy = NewEdgeRouterPolicyHandler(env)
handlers.EdgeService = NewEdgeServiceHandler(env)
handlers.Enrollment = NewEnrollmentHandler(env)
handlers.EventLog = NewEventLogHandler(env)
handlers.GeoRegion = NewGeoRegionHandler(env)
handlers.Identity = NewIdentityHandler(env)
handlers.IdentityType = NewIdentityTypeHandler(env)
handlers.PolicyAdvisor = NewPolicyAdvisor(env)
handlers.ServiceEdgeRouterPolicy = NewServiceEdgeRouterPolicyHandler(env)
handlers.ServicePolicy = NewServicePolicyHandler(env)
handlers.Session = NewSessionHandler(env)
handlers.TransitRouter = NewTransitRouterHandler(env)
handlers.PostureCheck = NewPostureCheckHandler(env)
handlers.PostureCheckType = NewPostureCheckTypeHandler(env)
handlers.PostureResponse = NewPostureResponseHandler(env)
handlers.Mfa = NewMfaHandler(env)
return handlers
}