diff --git a/pkg/app/authorizer.go b/pkg/app/authorizer.go index 58b0e445..e7a8cf68 100644 --- a/pkg/app/authorizer.go +++ b/pkg/app/authorizer.go @@ -86,6 +86,13 @@ func (e *Authorizer) ConfigServices() error { if err != nil { return err } + e.Services["edge"] = edgeDir + + for key := range e.Configuration.Services { + if !(contains(edgeDir.AvailableServices(), key) || key == authorizerService) { + return errors.Errorf("unknown service type %s", key) + } + } e.Services = make(map[string]ServiceTypes) @@ -105,7 +112,6 @@ func (e *Authorizer) ConfigServices() error { unary, stream := middlewareList.AsGRPCOptions() opts = append(opts, unary, stream) - e.Services["edge"] = edgeDir if contains(serviceConfig.registeredServices, "authorizer") { topaz, err := NewTopaz(serviceConfig.API, &e.Configuration.Common, opts, e.Logger) if err != nil {