Repository: hyperledger/firefly
Pull request #901 (2022-07-13 14:56:18)

Only start each plugin once


Patch:
diff --git a/docs/reference/config.md b/docs/reference/config.md
index 8d423c45e..8cfa915a9 100644
--- a/docs/reference/config.md
+++ b/docs/reference/config.md
@@ -494,18 +494,6 @@ nav_order: 2
 |shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
 |writeTimeout|The maximum time to wait when writing to an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
 
-## http.auth
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|type|The auth plugin to use for server side authentication of requests|`string`|`<nil>`
-
-## http.auth.basic
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
-
 ## http.tls
 
 |Key|Description|Type|Default Value|
@@ -583,18 +571,6 @@ nav_order: 2
 |shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
 |writeTimeout|The maximum time to wait when writing to an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
 
-## metrics.auth
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|type|The auth plugin to use for server side authentication of requests|`string`|`<nil>`
-
-## metrics.auth.basic
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
-
 ## metrics.tls
 
 |Key|Description|Type|Default Value|
@@ -685,7 +661,6 @@ nav_order: 2
 
 |Key|Description|Type|Default Value|
 |---|-----------|----|-------------|
-|auth|Authorization plugin configuration|`map[string]string`|`<nil>`
 |blockchain|The list of configured Blockchain plugins|`string`|`<nil>`
 |database|The list of configured Database plugins|`string`|`<nil>`
 |dataexchange|The array of configured Data Exchange plugins |`string`|`<nil>`
@@ -693,19 +668,6 @@ nav_order: 2
 |sharedstorage|The list of configured Shared Storage plugins|`string`|`<nil>`
 |tokens|The tokens plugin configurations. This will be used to configure tokens connectors|`string`|`<nil>`
 
-## plugins.auth[]
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|name|The name of the auth plugin to use|`string`|`<nil>`
-|type|The type of the auth plugin to use|`string`|`<nil>`
-
-## plugins.auth[].basic
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
-
 ## plugins.blockchain[]
 
 |Key|Description|Type|Default Value|
@@ -1236,18 +1198,6 @@ nav_order: 2
 |shutdownTimeout|The maximum amount of time to wait for any open HTTP requests to finish before shutting down the HTTP server|[`time.Duration`](https://pkg.go.dev/time#Duration)|`10s`
 |writeTimeout|The maximum time to wait when writing to an HTTP connection|[`time.Duration`](https://pkg.go.dev/time#Duration)|`15s`
 
-## spi.auth
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|type|The auth plugin to use for server side authentication of requests|`string`|`<nil>`
-
-## spi.auth.basic
-
-|Key|Description|Type|Default Value|
-|---|-----------|----|-------------|
-|passwordfile|The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.|`string`|`<nil>`
-
 ## spi.tls
 
 |Key|Description|Type|Default Value|
diff --git a/go.mod b/go.mod
index 63fa130b1..e783af3b4 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
 	github.com/golang-migrate/migrate/v4 v4.15.2
 	github.com/gorilla/mux v1.8.0
 	github.com/gorilla/websocket v1.5.0
-	github.com/hyperledger/firefly-common v0.1.14
+	github.com/hyperledger/firefly-common v0.1.13
 	github.com/hyperledger/firefly-signer v0.9.12
 	github.com/jarcoal/httpmock v1.1.0
 	github.com/karlseguin/ccache v2.0.3+incompatible
diff --git a/go.sum b/go.sum
index 7f876936a..6058af980 100644
--- a/go.sum
+++ b/go.sum
@@ -726,9 +726,8 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J
 github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
 github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/hyperledger/firefly-common v0.1.13 h1:eNK99U9FV43u1F46MM0mPuXT4Xn++orghpoTIIPsmwo=
 github.com/hyperledger/firefly-common v0.1.13/go.mod h1:2NqPi5Ud9H6rSlZXkLbotxW7z4EAD89p3/8oNOpm9Gs=
-github.com/hyperledger/firefly-common v0.1.14 h1:BFobO96kGPCC4UUvzdwdH8X5oXo1NbtqPrASrd9N0kY=
-github.com/hyperledger/firefly-common v0.1.14/go.mod h1:MNbaI2spBsdZYOub6Duj9xueE7Qyu9itOmJ4vE8tjYw=
 github.com/hyperledger/firefly-signer v0.9.12 h1:pCPiGHx1+MbTsIQuRkoQmfWxvpcvtGHVavls0NnH0po=
 github.com/hyperledger/firefly-signer v0.9.12/go.mod h1:GPQRUZOFOAjkLmg8GDjZUjEdUD0gcar+CSVhwltIwyw=
 github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
diff --git a/internal/apiserver/server.go b/internal/apiserver/server.go
index 615207370..58d4995aa 100644
--- a/internal/apiserver/server.go
+++ b/internal/apiserver/server.go
@@ -31,7 +31,6 @@ import (
 	"github.com/gorilla/mux"
 	"github.com/hyperledger/firefly-common/pkg/config"
 	"github.com/hyperledger/firefly-common/pkg/ffapi"
-	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly-common/pkg/httpserver"
 	"github.com/hyperledger/firefly-common/pkg/i18n"
 	"github.com/hyperledger/firefly/internal/coreconfig"
@@ -250,19 +249,6 @@ func (as *apiServer) routeHandler(hf *ffapi.HandlerFactory, mgr namespace.Manage
 		if err != nil {
 			return nil, err
 		}
-
-		// Authorize the request
-		authReq := &fftypes.AuthReq{
-			Method: r.Req.Method,
-			URL:    r.Req.URL,
-			Header: r.Req.Header,
-		}
-		if or != nil {
-			if err := or.Authorize(r.Req.Context(), authReq); err != nil {
-				return nil, err
-			}
-		}
-
 		if ce.EnabledIf != nil && !ce.EnabledIf(or) {
 			return nil, i18n.NewError(r.Req.Context(), coremsgs.MsgActionNotSupported)
 		}
@@ -344,7 +330,6 @@ func (as *apiServer) createMuxRouter(ctx context.Context, mgr namespace.Manager)
 	r.HandleFunc(`/favicon{any:.*}.png`, favIcons)
 
 	ws, _ := eifactory.GetPlugin(ctx, "websockets")
-	ws.(*websockets.WebSockets).SetAuthorizer(mgr)
 	r.HandleFunc(`/ws`, ws.(*websockets.WebSockets).ServeHTTP)
 
 	uiPath := config.GetString(coreconfig.UIPath)
diff --git a/internal/coreconfig/coreconfig.go b/internal/coreconfig/coreconfig.go
index 1a19cd5c0..2b32d30e2 100644
--- a/internal/coreconfig/coreconfig.go
+++ b/internal/coreconfig/coreconfig.go
@@ -148,8 +148,6 @@ var (
 	TokensList = ffc("tokens")
 	// PluginsTokensList is the key containing a list of supported tokens plugins
 	PluginsTokensList = ffc("plugins.tokens")
-	// PluginsAuthList is the key containing a list of supported auth plugins
-	PluginsAuthList = ffc("plugins.auth")
 	// PluginsBlockchainList is the key containing a list of configured blockchain plugins
 	PluginsBlockchainList = ffc("plugins.blockchain")
 	// PluginsSharedStorageList is the key containing a list of configured shared storage plugins
diff --git a/internal/coremsgs/en_config_descriptions.go b/internal/coremsgs/en_config_descriptions.go
index 31c099def..8dc95b788 100644
--- a/internal/coremsgs/en_config_descriptions.go
+++ b/internal/coremsgs/en_config_descriptions.go
@@ -321,10 +321,4 @@ var (
 
 	ConfigSPIWebSocketBlockedWarnInternal = ffc("config.spi.ws.blockedWarnInterval", "How often to log warnings in core, when an admin change event listener falls behind the stream they requested and misses events", i18n.TimeDurationType)
 	ConfigSPIWebSocketEventQueueLength    = ffc("config.spi.ws.eventQueueLength", "Server-side queue length for events waiting for delivery over an admin change event listener websocket", i18n.IntType)
-
-	ConfigPluginsAuth     = ffc("config.plugins.auth", "Authorization plugin configuration", i18n.MapStringStringType)
-	ConfigPluginsAuthName = ffc("config.plugins.auth[].name", "The name of the auth plugin to use", i18n.StringType)
-	ConfigPluginsAuthType = ffc("config.plugins.auth[].type", "The type of the auth plugin to use", i18n.StringType)
-
-	ConfigGlobalAuthBasicPasswordFile = ffc("config.global.basic.passwordfile", "The path to a .htpasswd file to use for authenticating requests. Passwords should be hashed with bcrypt.", i18n.StringType)
 )
diff --git a/internal/events/websockets/websocket_connection.go b/internal/events/websockets/websocket_connection.go
index 22378315f..ea8c60da2 100644
--- a/internal/events/websockets/websocket_connection.go
+++ b/internal/events/websockets/websocket_connection.go
@@ -53,11 +53,9 @@ type websocketConnection struct {
 	closed       bool
 	remoteAddr   string
 	userAgent    string
-	header       http.Header
-	auth         core.Authorizer
 }
 
-func newConnection(pCtx context.Context, ws *WebSockets, wsConn *websocket.Conn, req *http.Request, auth core.Authorizer) *websocketConnection {
+func newConnection(pCtx context.Context, ws *WebSockets, wsConn *websocket.Conn, req *http.Request) *websocketConnection {
 	connID := fftypes.NewUUID().String()
 	ctx := log.WithLogField(pCtx, "websocket", connID)
 	ctx, cancelCtx := context.WithCancel(ctx)
@@ -72,8 +70,6 @@ func newConnection(pCtx context.Context, ws *WebSockets, wsConn *websocket.Conn,
 		receiverDone: make(chan struct{}),
 		remoteAddr:   req.RemoteAddr,
 		userAgent:    req.UserAgent(),
-		header:       req.Header,
-		auth:         auth,
 	}
 	go wc.sendLoop()
 	go wc.receiveLoop()
@@ -157,18 +153,12 @@ func (wc *websocketConnection) receiveLoop() {
 			var msg core.WSStart
 			err = json.Unmarshal(msgData, &msg)
 			if err == nil {
-				err = wc.authorizeMessage(msg.Namespace)
-				if err == nil {
-					err = wc.handleStart(&msg)
-				}
+				err = wc.handleStart(&msg)
 			}
 		case core.WSClientActionAck:
 			var msg core.WSAck
 			err = json.Unmarshal(msgData, &msg)
 			if err == nil {
-				// acks are not authenticated because they will only be accepted for
-				// messages that were sent by FireFly on this connection, which would
-				// have previously checked authorization in the start message
 				err = wc.handleAck(&msg)
 			}
 		default:
@@ -345,18 +335,3 @@ func (wc *websocketConnection) waitClose() {
 	<-wc.senderDone
 	<-wc.receiverDone
 }
-
-func (wc *websocketConnection) authorizeMessage(ns string) error {
-	wc.mux.Lock()
-	defer wc.mux.Unlock()
-	authReq := &fftypes.AuthReq{
-		Namespace: ns,
-		Header:    wc.header,
-	}
-	if wc.auth != nil {
-		if err := wc.auth.Authorize(wc.ctx, authReq); err != nil {
-			return err
-		}
-	}
-	return nil
-}
diff --git a/internal/events/websockets/websockets.go b/internal/events/websockets/websockets.go
index ef0a3b53f..25f825645 100644
--- a/internal/events/websockets/websockets.go
+++ b/internal/events/websockets/websockets.go
@@ -37,7 +37,6 @@ type WebSockets struct {
 	connections  map[string]*websocketConnection
 	connMux      sync.Mutex
 	upgrader     websocket.Upgrader
-	auth         core.Authorizer
 }
 
 func (ws *WebSockets) Name() string { return "websockets" }
@@ -60,10 +59,6 @@ func (ws *WebSockets) Init(ctx context.Context, config config.Section) error {
 	return nil
 }
 
-func (ws *WebSockets) SetAuthorizer(auth core.Authorizer) {
-	ws.auth = auth
-}
-
 func (ws *WebSockets) SetHandler(namespace string, handler events.Callbacks) error {
 	ws.callbacks[namespace] = handler
 	return nil
@@ -101,7 +96,7 @@ func (ws *WebSockets) ServeHTTP(res http.ResponseWriter, req *http.Request) {
 	}
 
 	ws.connMux.Lock()
-	wc := newConnection(ws.ctx, ws, wsConn, req, ws.auth)
+	wc := newConnection(ws.ctx, ws, wsConn, req)
 	ws.connections[wc.connID] = wc
 	ws.connMux.Unlock()
 
diff --git a/internal/namespace/manager.go b/internal/namespace/manager.go
index d0a749dfc..288a43f82 100644
--- a/internal/namespace/manager.go
+++ b/internal/namespace/manager.go
@@ -21,8 +21,6 @@ import (
 	"encoding/json"
 	"fmt"
 
-	"github.com/hyperledger/firefly-common/pkg/auth"
-	"github.com/hyperledger/firefly-common/pkg/auth/authfactory"
 	"github.com/hyperledger/firefly-common/pkg/config"
 	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly-common/pkg/i18n"
@@ -58,7 +56,6 @@ var (
 	sharedstorageConfig = config.RootArray("plugins.sharedstorage")
 	dataexchangeConfig  = config.RootArray("plugins.dataexchange")
 	identityConfig      = config.RootArray("plugins.identity")
-	authConfig          = config.RootArray("plugins.auth")
 
 	// Deprecated configs
 	deprecatedTokensConfig        = config.RootArray("tokens")
@@ -78,7 +75,6 @@ type Manager interface {
 	GetNamespaces(ctx context.Context) ([]*core.Namespace, error)
 	GetOperationByNamespacedID(ctx context.Context, nsOpID string) (*core.Operation, error)
 	ResolveOperationByNamespacedID(ctx context.Context, nsOpID string, op *core.OperationUpdateDTO) error
-	Authorize(ctx context.Context, authReq *fftypes.AuthReq) error
 }
 
 type namespace struct {
@@ -101,7 +97,6 @@ type namespaceManager struct {
 		dataexchange  map[string]dataExchangePlugin
 		tokens        map[string]tokensPlugin
 		events        map[string]eventsPlugin
-		auth          map[string]authPlugin
 	}
 	metricsEnabled bool
 	metrics        metrics.Manager
@@ -144,11 +139,6 @@ type eventsPlugin struct {
 	plugin events.Plugin
 }
 
-type authPlugin struct {
-	config config.Section
-	plugin auth.Plugin
-}
-
 func NewNamespaceManager(withDefaults bool) Manager {
 	nm := &namespaceManager{
 		namespaces:     make(map[string]*namespace),
@@ -169,7 +159,6 @@ func NewNamespaceManager(withDefaults bool) Manager {
 	iifactory.InitConfig(identityConfig)
 	tifactory.InitConfigDeprecated(deprecatedTokensConfig)
 	tifactory.InitConfig(tokensConfig)
-	authfactory.InitConfigArray(authConfig)
 
 	return nm
 }
@@ -230,23 +219,24 @@ func (nm *namespaceManager) Start() error {
 		// Ensure metrics are registered
 		metrics.Registry()
 	}
+	// Orchestrators must be started before plugins so as not to miss events
 	for _, ns := range nm.namespaces {
-		if ns.plugins.Blockchain.Plugin != nil {
-			if err := ns.plugins.Blockchain.Plugin.Start(); err != nil {
-				return err
-			}
+		if err := ns.orchestrator.Start(); err != nil {
+			return err
 		}
-		if ns.plugins.DataExchange.Plugin != nil {
-			if err := ns.plugins.DataExchange.Plugin.Start(); err != nil {
-				return err
-			}
+	}
+	for _, plugin := range nm.plugins.blockchain {
+		if err := plugin.plugin.Start(); err != nil {
+			return err
 		}
-		for _, plugin := range ns.plugins.Tokens {
-			if err := plugin.Plugin.Start(); err != nil {
-				return err
-			}
+	}
+	for _, plugin := range nm.plugins.dataexchange {
+		if err := plugin.plugin.Start(); err != nil {
+			return err
 		}
-		if err := ns.orchestrator.Start(); err != nil {
+	}
+	for _, plugin := range nm.plugins.tokens {
+		if err := plugin.plugin.Start(); err != nil {
 			return err
 		}
 	}
@@ -319,13 +309,6 @@ func (nm *namespaceManager) loadPlugins(ctx context.Context) (err error) {
 		}
 	}
 
-	if nm.plugins.auth == nil {
-		nm.plugins.auth, err = nm.getAuthPlugin(ctx)
-		if err != nil {
-			return err
-		}
-	}
-
 	return nil
 }
 
@@ -624,11 +607,6 @@ func (nm *namespaceManager) initPlugins(ctx context.Context) (err error) {
 			return err
 		}
 	}
-	for name, entry := range nm.plugins.auth {
-		if err = entry.plugin.Init(nm.ctx, name, entry.config); err != nil {
-			return err
-		}
-	}
 	return nil
 }
 
@@ -828,13 +806,6 @@ func (nm *namespaceManager) validateMultiPartyConfig(ctx context.Context, name s
 			}
 			continue
 		}
-		if instance, ok := nm.plugins.auth[pluginName]; ok {
-			result.Auth = orchestrator.AuthPlugin{
-				Name:   pluginName,
-				Plugin: instance.plugin,
-			}
-			continue
-		}
 
 		return nil, i18n.NewError(ctx, coremsgs.MsgNamespaceUnknownPlugin, name, pluginName)
 	}
@@ -885,13 +856,6 @@ func (nm *namespaceManager) validateNonMultipartyConfig(ctx context.Context, nam
 			})
 			continue
 		}
-		if instance, ok := nm.plugins.auth[pluginName]; ok {
-			result.Auth = orchestrator.AuthPlugin{
-				Name:   pluginName,
-				Plugin: instance.plugin,
-			}
-			continue
-		}
 
 		return nil, i18n.NewError(ctx, coremsgs.MsgNamespaceUnknownPlugin, name, pluginName)
 	}
@@ -974,31 +938,3 @@ func (nm *namespaceManager) getEventPlugins(ctx context.Context) (plugins map[st
 	}
 	return plugins, err
 }
-
-func (nm *namespaceManager) getAuthPlugin(ctx context.Context) (plugins map[string]authPlugin, err error) {
-	plugins = make(map[string]authPlugin)
-
-	authConfigArraySize := authConfig.ArraySize()
-	for i := 0; i < authConfigArraySize; i++ {
-		config := authConfig.ArrayEntry(i)
-		name, pluginType, err := nm.validatePluginConfig(ctx, config, "auth")
-		if err != nil {
-			return nil, err
-		}
-
-		plugin, err := authfactory.GetPlugin(ctx, pluginType)
-		if err != nil {
-			return nil, err
-		}
-
-		plugins[name] = authPlugin{
-			config: config.SubSection(pluginType),
-			plugin: plugin,
-		}
-	}
-	return plugins, err
-}
-
-func (nm *namespaceManager) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error {
-	return nm.Orchestrator(authReq.Namespace).Authorize(ctx, authReq)
-}
diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go
index 57de36fff..dc556a3b6 100644
--- a/internal/orchestrator/orchestrator.go
+++ b/internal/orchestrator/orchestrator.go
@@ -19,7 +19,6 @@ package orchestrator
 import (
 	"context"
 
-	"github.com/hyperledger/firefly-common/pkg/auth"
 	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly-common/pkg/i18n"
 	"github.com/hyperledger/firefly-common/pkg/log"
@@ -117,9 +116,6 @@ type Orchestrator interface {
 
 	// Network Operations
 	SubmitNetworkAction(ctx context.Context, action *core.NetworkAction) error
-
-	// Authorizer
-	Authorize(ctx context.Context, authReq *fftypes.AuthReq) error
 }
 
 type BlockchainPlugin struct {
@@ -152,11 +148,6 @@ type IdentityPlugin struct {
 	Plugin idplugin.Plugin
 }
 
-type AuthPlugin struct {
-	Name   string
-	Plugin auth.Plugin
-}
-
 type Plugins struct {
 	Blockchain    BlockchainPlugin
 	Identity      IdentityPlugin
@@ -165,7 +156,6 @@ type Plugins struct {
 	Database      DatabasePlugin
 	Tokens        []TokensPlugin
 	Events        map[string]eventsplugin.Plugin
-	Auth          AuthPlugin
 }
 
 type Config struct {
@@ -516,11 +506,3 @@ func (or *orchestrator) SubmitNetworkAction(ctx context.Context, action *core.Ne
 	}
 	return or.multiparty.SubmitNetworkAction(ctx, key, action)
 }
-
-func (or *orchestrator) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error {
-	authReq.Namespace = or.namespace
-	if or.plugins.Auth.Plugin != nil {
-		return or.plugins.Auth.Plugin.Authorize(ctx, authReq)
-	}
-	return nil
-}
diff --git a/mocks/namespacemocks/manager.go b/mocks/namespacemocks/manager.go
index 5105fcdc2..32dfaaf28 100644
--- a/mocks/namespacemocks/manager.go
+++ b/mocks/namespacemocks/manager.go
@@ -5,9 +5,7 @@ package namespacemocks
 import (
 	context "context"
 
-	fftypes "github.com/hyperledger/firefly-common/pkg/fftypes"
 	core "github.com/hyperledger/firefly/pkg/core"
-
 	mock "github.com/stretchr/testify/mock"
 
 	orchestrator "github.com/hyperledger/firefly/internal/orchestrator"
@@ -20,20 +18,6 @@ type Manager struct {
 	mock.Mock
 }
 
-// Authorize provides a mock function with given fields: ctx, authReq
-func (_m *Manager) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error {
-	ret := _m.Called(ctx, authReq)
-
-	var r0 error
-	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.AuthReq) error); ok {
-		r0 = rf(ctx, authReq)
-	} else {
-		r0 = ret.Error(0)
-	}
-
-	return r0
-}
-
 // GetNamespaces provides a mock function with given fields: ctx
 func (_m *Manager) GetNamespaces(ctx context.Context) ([]*core.Namespace, error) {
 	ret := _m.Called(ctx)
diff --git a/mocks/orchestratormocks/orchestrator.go b/mocks/orchestratormocks/orchestrator.go
index 38c5afe8f..cfb6babde 100644
--- a/mocks/orchestratormocks/orchestrator.go
+++ b/mocks/orchestratormocks/orchestrator.go
@@ -22,8 +22,6 @@ import (
 
 	events "github.com/hyperledger/firefly/internal/events"
 
-	fftypes "github.com/hyperledger/firefly-common/pkg/fftypes"
-
 	mock "github.com/stretchr/testify/mock"
 
 	multiparty "github.com/hyperledger/firefly/internal/multiparty"
@@ -56,20 +54,6 @@ func (_m *Orchestrator) Assets() assets.Manager {
 	return r0
 }
 
-// Authorize provides a mock function with given fields: ctx, authReq
-func (_m *Orchestrator) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error {
-	ret := _m.Called(ctx, authReq)
-
-	var r0 error
-	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.AuthReq) error); ok {
-		r0 = rf(ctx, authReq)
-	} else {
-		r0 = ret.Error(0)
-	}
-
-	return r0
-}
-
 // BatchManager provides a mock function with given fields:
 func (_m *Orchestrator) BatchManager() batch.Manager {
 	ret := _m.Called()
diff --git a/pkg/core/authorizer.go b/pkg/core/authorizer.go
deleted file mode 100644
index 76b7586cf..000000000
--- a/pkg/core/authorizer.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright © 2022 Kaleido, Inc.
-//
-// SPDX-License-Identifier: Apache-2.0
-//
-// 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
-//
-//     http://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 core
-
-import (
-	"context"
-
-	"github.com/hyperledger/firefly-common/pkg/fftypes"
-)
-
-type Authorizer interface {
-	Authorize(ctx context.Context, authReq *fftypes.AuthReq) error
-}
diff --git a/pkg/events/plugin.go b/pkg/events/plugin.go
index 29a1badbe..8697f4d47 100644
--- a/pkg/events/plugin.go
+++ b/pkg/events/plugin.go
@@ -55,7 +55,7 @@ type SubscriptionMatcher func(core.SubscriptionRef) bool
 
 type Callbacks interface {
 
-	// RegisterConnection can be fired as often as required.
+	// RegisterConnection can be fired as often as requied.
 	// Dispatchers will be started against this connection for all persisted subscriptions that match via the supplied function.
 	// It can be fired multiple times for the same connection ID, to update the subscription list
 	// For a "connect-out" style plugin (MQTT/AMQP/JMS broker), you might fire it at startup (from Init) for each target queue, with a subscription match


Test patch:
diff --git a/internal/apiserver/route_delete_contract_listener_test.go b/internal/apiserver/route_delete_contract_listener_test.go
index ad455f175..4ed6362a2 100644
--- a/internal/apiserver/route_delete_contract_listener_test.go
+++ b/internal/apiserver/route_delete_contract_listener_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestDeleteContractListenerByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	id := fftypes.NewUUID()
diff --git a/internal/apiserver/route_delete_subscription_test.go b/internal/apiserver/route_delete_subscription_test.go
index 6d6bbd0fd..7b1cb602d 100644
--- a/internal/apiserver/route_delete_subscription_test.go
+++ b/internal/apiserver/route_delete_subscription_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestDeleteSubscription(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	input := core.Subscription{}
 	var buf bytes.Buffer
 	json.NewEncoder(&buf).Encode(&input)
diff --git a/internal/apiserver/route_get_batch_by_id_test.go b/internal/apiserver/route_get_batch_by_id_test.go
index 9c100b8c0..0ec457590 100644
--- a/internal/apiserver/route_get_batch_by_id_test.go
+++ b/internal/apiserver/route_get_batch_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetBatchByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/batches/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_batches_test.go b/internal/apiserver/route_get_batches_test.go
index ede425331..10a91cbe1 100644
--- a/internal/apiserver/route_get_batches_test.go
+++ b/internal/apiserver/route_get_batches_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetBatches(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/batches", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_blockchain_event_by_id_test.go b/internal/apiserver/route_get_blockchain_event_by_id_test.go
index 3febe51bb..4b8e0a485 100644
--- a/internal/apiserver/route_get_blockchain_event_by_id_test.go
+++ b/internal/apiserver/route_get_blockchain_event_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetBlockchainEventByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/blockchainevents/id12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_blockchain_events_test.go b/internal/apiserver/route_get_blockchain_events_test.go
index 5f7cf85f7..d5833a1ae 100644
--- a/internal/apiserver/route_get_blockchain_events_test.go
+++ b/internal/apiserver/route_get_blockchain_events_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetBlockchainEvents(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/blockchainevents", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_chart_histogram_test.go b/internal/apiserver/route_get_chart_histogram_test.go
index 84e098f38..d9c6575fa 100644
--- a/internal/apiserver/route_get_chart_histogram_test.go
+++ b/internal/apiserver/route_get_chart_histogram_test.go
@@ -28,8 +28,7 @@ import (
 )
 
 func TestGetChartHistogramBadStartTime(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/charts/histogram/test?startTime=abc&endTime=456&buckets=30", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -40,8 +39,7 @@ func TestGetChartHistogramBadStartTime(t *testing.T) {
 }
 
 func TestGetChartHistogramBadEndTime(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/charts/histogram/test?startTime=123&endTime=abc&buckets=30", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -52,8 +50,7 @@ func TestGetChartHistogramBadEndTime(t *testing.T) {
 }
 
 func TestGetChartHistogramBadBuckets(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/charts/histogram/test?startTime=123&endTime=456&buckets=abc", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -65,7 +62,6 @@ func TestGetChartHistogramBadBuckets(t *testing.T) {
 
 func TestGetChartHistogramSuccess(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/charts/histogram/test?startTime=1234567890&endTime=1234567891&buckets=30", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_contract_api_by_name_test.go b/internal/apiserver/route_get_contract_api_by_name_test.go
index 4c9cd6c72..1dad43de8 100644
--- a/internal/apiserver/route_get_contract_api_by_name_test.go
+++ b/internal/apiserver/route_get_contract_api_by_name_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestGetContractAPIByName(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_api_interface_test.go b/internal/apiserver/route_get_contract_api_interface_test.go
index 2583a00f0..59ef0e5ab 100644
--- a/internal/apiserver/route_get_contract_api_interface_test.go
+++ b/internal/apiserver/route_get_contract_api_interface_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestGetContractAPIInterface(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_api_listeners_test.go b/internal/apiserver/route_get_contract_api_listeners_test.go
index cb08f5938..133cb0960 100644
--- a/internal/apiserver/route_get_contract_api_listeners_test.go
+++ b/internal/apiserver/route_get_contract_api_listeners_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestGetContractAPIListeners(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_apis_test.go b/internal/apiserver/route_get_contract_apis_test.go
index c9105c372..6405c0b06 100644
--- a/internal/apiserver/route_get_contract_apis_test.go
+++ b/internal/apiserver/route_get_contract_apis_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestGetContractAPIs(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_interface_name_version_test.go b/internal/apiserver/route_get_contract_interface_name_version_test.go
index b35de1773..855279c8c 100644
--- a/internal/apiserver/route_get_contract_interface_name_version_test.go
+++ b/internal/apiserver/route_get_contract_interface_name_version_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestGetContractInterfaceNameVersion(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
@@ -50,7 +49,6 @@ func TestGetContractInterfaceNameVersion(t *testing.T) {
 
 func TestGetContractInterfaceNameVersionWithChildren(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_interface_test.go b/internal/apiserver/route_get_contract_interface_test.go
index 7d4b60e6e..b1bd18b5b 100644
--- a/internal/apiserver/route_get_contract_interface_test.go
+++ b/internal/apiserver/route_get_contract_interface_test.go
@@ -30,8 +30,7 @@ import (
 )
 
 func TestGetContractInterfaceBadID(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	input := core.Datatype{}
 	var buf bytes.Buffer
 	json.NewEncoder(&buf).Encode(&input)
@@ -46,7 +45,6 @@ func TestGetContractInterfaceBadID(t *testing.T) {
 
 func TestGetContractInterface(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
@@ -66,7 +64,6 @@ func TestGetContractInterface(t *testing.T) {
 
 func TestGetContractInterfaceWithChildren(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_interfaces_test.go b/internal/apiserver/route_get_contract_interfaces_test.go
index 5c5dfa002..6be1caec0 100644
--- a/internal/apiserver/route_get_contract_interfaces_test.go
+++ b/internal/apiserver/route_get_contract_interfaces_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestGetContractInterfaces(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_get_contract_listener_by_name_or_id_test.go b/internal/apiserver/route_get_contract_listener_by_name_or_id_test.go
index f7ba336db..360ab2bfd 100644
--- a/internal/apiserver/route_get_contract_listener_by_name_or_id_test.go
+++ b/internal/apiserver/route_get_contract_listener_by_name_or_id_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestGetContractListenerByNameOrID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	id := fftypes.NewUUID()
diff --git a/internal/apiserver/route_get_contract_listener_test.go b/internal/apiserver/route_get_contract_listener_test.go
index 188c9ead9..23cf97b7b 100644
--- a/internal/apiserver/route_get_contract_listener_test.go
+++ b/internal/apiserver/route_get_contract_listener_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetContractListener(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/contracts/listeners", nil)
diff --git a/internal/apiserver/route_get_data_blob_test.go b/internal/apiserver/route_get_data_blob_test.go
index 4ad1c931d..01086c9af 100644
--- a/internal/apiserver/route_get_data_blob_test.go
+++ b/internal/apiserver/route_get_data_blob_test.go
@@ -32,7 +32,6 @@ import (
 
 func TestGetDataBlob(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("Data").Return(mdm)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
diff --git a/internal/apiserver/route_get_data_by_id_test.go b/internal/apiserver/route_get_data_by_id_test.go
index a949c1918..e2bdb3cc5 100644
--- a/internal/apiserver/route_get_data_by_id_test.go
+++ b/internal/apiserver/route_get_data_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetDataByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/data/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_data_msgs_test.go b/internal/apiserver/route_get_data_msgs_test.go
index 4632fdc26..f99d3797e 100644
--- a/internal/apiserver/route_get_data_msgs_test.go
+++ b/internal/apiserver/route_get_data_msgs_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetMessagesForData(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/data/abcd1234/messages", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_data_test.go b/internal/apiserver/route_get_data_test.go
index 3436fe319..14ced83ae 100644
--- a/internal/apiserver/route_get_data_test.go
+++ b/internal/apiserver/route_get_data_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetData(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/data", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_datatype_by_name_test.go b/internal/apiserver/route_get_datatype_by_name_test.go
index 40e4a42fe..f0877c9e5 100644
--- a/internal/apiserver/route_get_datatype_by_name_test.go
+++ b/internal/apiserver/route_get_datatype_by_name_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetDatatypeByName(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/datatypes/abcd/123", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_datatypes_test.go b/internal/apiserver/route_get_datatypes_test.go
index 718f03f3b..eeb7296e8 100644
--- a/internal/apiserver/route_get_datatypes_test.go
+++ b/internal/apiserver/route_get_datatypes_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetDatatypes(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/datatypes", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_event_by_id_test.go b/internal/apiserver/route_get_event_by_id_test.go
index 4a189bd7f..6c49f8161 100644
--- a/internal/apiserver/route_get_event_by_id_test.go
+++ b/internal/apiserver/route_get_event_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetEventByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/events/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_events_test.go b/internal/apiserver/route_get_events_test.go
index fb605cc27..31edf10f0 100644
--- a/internal/apiserver/route_get_events_test.go
+++ b/internal/apiserver/route_get_events_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestGetEvents(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/events", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -43,7 +42,6 @@ func TestGetEvents(t *testing.T) {
 
 func TestGetEventsWithReferences(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/events?fetchreferences", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_group_by_id_test.go b/internal/apiserver/route_get_group_by_id_test.go
index 093fdbf65..256508995 100644
--- a/internal/apiserver/route_get_group_by_id_test.go
+++ b/internal/apiserver/route_get_group_by_id_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetGroupByHash(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/groups/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_groups_test.go b/internal/apiserver/route_get_groups_test.go
index 90468e1c8..fde6a2072 100644
--- a/internal/apiserver/route_get_groups_test.go
+++ b/internal/apiserver/route_get_groups_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetGroups(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/groups", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_identities_test.go b/internal/apiserver/route_get_identities_test.go
index 905f8feef..be9be4594 100644
--- a/internal/apiserver/route_get_identities_test.go
+++ b/internal/apiserver/route_get_identities_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetIdentities(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities", nil)
@@ -43,7 +42,6 @@ func TestGetIdentities(t *testing.T) {
 
 func TestGetIdentitiesWithVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities?fetchverifiers", nil)
diff --git a/internal/apiserver/route_get_identity_by_did_test.go b/internal/apiserver/route_get_identity_by_did_test.go
index 7052a2a70..99b4501b9 100644
--- a/internal/apiserver/route_get_identity_by_did_test.go
+++ b/internal/apiserver/route_get_identity_by_did_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetIdentityByDID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/identities/did:firefly:org/org_1", nil)
@@ -44,7 +43,6 @@ func TestGetIdentityByDID(t *testing.T) {
 
 func TestGetIdentityByDIDWithVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/identities/did:firefly:org/org_1?fetchverifiers", nil)
diff --git a/internal/apiserver/route_get_identity_by_id_test.go b/internal/apiserver/route_get_identity_by_id_test.go
index b5c1b7828..ba1ce5144 100644
--- a/internal/apiserver/route_get_identity_by_id_test.go
+++ b/internal/apiserver/route_get_identity_by_id_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetIdentityByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities/id1", nil)
@@ -43,7 +42,6 @@ func TestGetIdentityByID(t *testing.T) {
 
 func TestGetIdentityByIDWithVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities/id1?fetchverifiers", nil)
diff --git a/internal/apiserver/route_get_identity_did_test.go b/internal/apiserver/route_get_identity_did_test.go
index 579736183..21c855873 100644
--- a/internal/apiserver/route_get_identity_did_test.go
+++ b/internal/apiserver/route_get_identity_did_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetIdentityDID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities/id1/did", nil)
diff --git a/internal/apiserver/route_get_identity_verifiers_test.go b/internal/apiserver/route_get_identity_verifiers_test.go
index 30a45fc17..5b11aef3c 100644
--- a/internal/apiserver/route_get_identity_verifiers_test.go
+++ b/internal/apiserver/route_get_identity_verifiers_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetIdentityVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/identities/id1/verifiers", nil)
diff --git a/internal/apiserver/route_get_msg_by_id_test.go b/internal/apiserver/route_get_msg_by_id_test.go
index 9e8a5cb26..1756a707b 100644
--- a/internal/apiserver/route_get_msg_by_id_test.go
+++ b/internal/apiserver/route_get_msg_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetMessageByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -41,7 +40,6 @@ func TestGetMessageByID(t *testing.T) {
 
 func TestGetMessageByIDWithData(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages/abcd12345?fetchdata", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_msg_data_test.go b/internal/apiserver/route_get_msg_data_test.go
index 2ed67912c..c5bb19aef 100644
--- a/internal/apiserver/route_get_msg_data_test.go
+++ b/internal/apiserver/route_get_msg_data_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetMessageData(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages/uuid1/data", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_msg_events_test.go b/internal/apiserver/route_get_msg_events_test.go
index b027ada2f..e133cbfaa 100644
--- a/internal/apiserver/route_get_msg_events_test.go
+++ b/internal/apiserver/route_get_msg_events_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetMessageEvents(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages/uuid1/events", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_msg_txn_test.go b/internal/apiserver/route_get_msg_txn_test.go
index 720d602d8..e61c0086d 100644
--- a/internal/apiserver/route_get_msg_txn_test.go
+++ b/internal/apiserver/route_get_msg_txn_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetMessageTransaction(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages/uuid1/transaction", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_msgs_test.go b/internal/apiserver/route_get_msgs_test.go
index d0db93e14..79b39ffd2 100644
--- a/internal/apiserver/route_get_msgs_test.go
+++ b/internal/apiserver/route_get_msgs_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestGetMessages(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -43,7 +42,6 @@ func TestGetMessages(t *testing.T) {
 
 func TestGetMessagesWithCount(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages?count", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
@@ -66,7 +64,6 @@ func TestGetMessagesWithCount(t *testing.T) {
 
 func TestGetMessagesWithCountAndData(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/messages?count&fetchdata", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_namespace_test.go b/internal/apiserver/route_get_namespace_test.go
index 2b2ca9241..56cd28b44 100644
--- a/internal/apiserver/route_get_namespace_test.go
+++ b/internal/apiserver/route_get_namespace_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetNamespace(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_net_did_test.go b/internal/apiserver/route_get_net_did_test.go
index cbf932ec1..4eb25e0df 100644
--- a/internal/apiserver/route_get_net_did_test.go
+++ b/internal/apiserver/route_get_net_did_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetNetIdentityByDID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/network/identities/did:firefly:org/org_1", nil)
@@ -44,7 +43,6 @@ func TestGetNetIdentityByDID(t *testing.T) {
 
 func TestGetNetIdentityByDIDWithVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/network/identities/did:firefly:org/org_1?fetchverifiers", nil)
diff --git a/internal/apiserver/route_get_net_diddoc_test.go b/internal/apiserver/route_get_net_diddoc_test.go
index 55ccc040e..a836d9f34 100644
--- a/internal/apiserver/route_get_net_diddoc_test.go
+++ b/internal/apiserver/route_get_net_diddoc_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetDIDDocByDID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/network/diddocs/did:firefly:org/org_1", nil)
diff --git a/internal/apiserver/route_get_net_identities_test.go b/internal/apiserver/route_get_net_identities_test.go
index 3b70e8f95..91c0cc750 100644
--- a/internal/apiserver/route_get_net_identities_test.go
+++ b/internal/apiserver/route_get_net_identities_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetNetIdentities(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/network/identities", nil)
@@ -43,7 +42,6 @@ func TestGetNetIdentities(t *testing.T) {
 
 func TestGetNetIdentitiesWithVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/network/identities?fetchverifiers", nil)
diff --git a/internal/apiserver/route_get_net_node_test.go b/internal/apiserver/route_get_net_node_test.go
index 4982e071e..c3768dc01 100644
--- a/internal/apiserver/route_get_net_node_test.go
+++ b/internal/apiserver/route_get_net_node_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetNode(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/network/nodes/node12345", nil)
diff --git a/internal/apiserver/route_get_net_nodes_test.go b/internal/apiserver/route_get_net_nodes_test.go
index e13795e2b..63ac9f591 100644
--- a/internal/apiserver/route_get_net_nodes_test.go
+++ b/internal/apiserver/route_get_net_nodes_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetNodess(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/network/nodes", nil)
diff --git a/internal/apiserver/route_get_net_org_test.go b/internal/apiserver/route_get_net_org_test.go
index f56b8dbac..bea14bb6f 100644
--- a/internal/apiserver/route_get_net_org_test.go
+++ b/internal/apiserver/route_get_net_org_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetOrg(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	nmn := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(nmn)
 	req := httptest.NewRequest("GET", "/api/v1/network/organizations/org12345", nil)
diff --git a/internal/apiserver/route_get_net_orgs_test.go b/internal/apiserver/route_get_net_orgs_test.go
index ec4d3eb24..e995b30fb 100644
--- a/internal/apiserver/route_get_net_orgs_test.go
+++ b/internal/apiserver/route_get_net_orgs_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetOrganizations(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/network/organizations", nil)
diff --git a/internal/apiserver/route_get_op_by_id_test.go b/internal/apiserver/route_get_op_by_id_test.go
index c4289f2d6..a7c19e5bc 100644
--- a/internal/apiserver/route_get_op_by_id_test.go
+++ b/internal/apiserver/route_get_op_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetOperationByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/operations/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_ops_test.go b/internal/apiserver/route_get_ops_test.go
index 8fa755dcc..da09326f1 100644
--- a/internal/apiserver/route_get_ops_test.go
+++ b/internal/apiserver/route_get_ops_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetOperations(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/operations", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_pins_test.go b/internal/apiserver/route_get_pins_test.go
index 780fff32b..4bcf05228 100644
--- a/internal/apiserver/route_get_pins_test.go
+++ b/internal/apiserver/route_get_pins_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetPins(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/pins", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_status_batchmanager_test.go b/internal/apiserver/route_get_status_batchmanager_test.go
index b47104dcf..07380af68 100644
--- a/internal/apiserver/route_get_status_batchmanager_test.go
+++ b/internal/apiserver/route_get_status_batchmanager_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetStatusBatching(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/status/batchmanager", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_status_test.go b/internal/apiserver/route_get_status_test.go
index 7fc6f87e9..e64a1169d 100644
--- a/internal/apiserver/route_get_status_test.go
+++ b/internal/apiserver/route_get_status_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetStatus(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/status", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_subscription_by_id_test.go b/internal/apiserver/route_get_subscription_by_id_test.go
index d1a8d3337..0a84a35e6 100644
--- a/internal/apiserver/route_get_subscription_by_id_test.go
+++ b/internal/apiserver/route_get_subscription_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetSubscriptionByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/subscriptions/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_subscriptions_test.go b/internal/apiserver/route_get_subscriptions_test.go
index 1ce50c163..68801187b 100644
--- a/internal/apiserver/route_get_subscriptions_test.go
+++ b/internal/apiserver/route_get_subscriptions_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetSubscriptions(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/subscriptions", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_token_account_pools_test.go b/internal/apiserver/route_get_token_account_pools_test.go
index 928d55eae..c5b961eae 100644
--- a/internal/apiserver/route_get_token_account_pools_test.go
+++ b/internal/apiserver/route_get_token_account_pools_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenAccountPools(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/accounts/0x1/pools", nil)
diff --git a/internal/apiserver/route_get_token_accounts_test.go b/internal/apiserver/route_get_token_accounts_test.go
index f279eff66..f7991db90 100644
--- a/internal/apiserver/route_get_token_accounts_test.go
+++ b/internal/apiserver/route_get_token_accounts_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenAccounts(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/accounts", nil)
diff --git a/internal/apiserver/route_get_token_approvals_test.go b/internal/apiserver/route_get_token_approvals_test.go
index a8981e54e..d09d40185 100644
--- a/internal/apiserver/route_get_token_approvals_test.go
+++ b/internal/apiserver/route_get_token_approvals_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenApprovals(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/approvals", nil)
diff --git a/internal/apiserver/route_get_token_balances_test.go b/internal/apiserver/route_get_token_balances_test.go
index 905e853d7..a8c878723 100644
--- a/internal/apiserver/route_get_token_balances_test.go
+++ b/internal/apiserver/route_get_token_balances_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenBalances(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/balances", nil)
diff --git a/internal/apiserver/route_get_token_connectors_test.go b/internal/apiserver/route_get_token_connectors_test.go
index 63f1490d4..73c035e50 100644
--- a/internal/apiserver/route_get_token_connectors_test.go
+++ b/internal/apiserver/route_get_token_connectors_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenConnectors(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/connectors", nil)
diff --git a/internal/apiserver/route_get_token_pool_by_name_or_id_test.go b/internal/apiserver/route_get_token_pool_by_name_or_id_test.go
index 5a8740026..cc7593927 100644
--- a/internal/apiserver/route_get_token_pool_by_name_or_id_test.go
+++ b/internal/apiserver/route_get_token_pool_by_name_or_id_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenPoolByNameOrID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/pools/abc", nil)
diff --git a/internal/apiserver/route_get_token_pools_test.go b/internal/apiserver/route_get_token_pools_test.go
index 5bfa821fd..47699732d 100644
--- a/internal/apiserver/route_get_token_pools_test.go
+++ b/internal/apiserver/route_get_token_pools_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenPools(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/pools", nil)
diff --git a/internal/apiserver/route_get_token_transfer_by_id_test.go b/internal/apiserver/route_get_token_transfer_by_id_test.go
index 104f1fff9..69f027a9f 100644
--- a/internal/apiserver/route_get_token_transfer_by_id_test.go
+++ b/internal/apiserver/route_get_token_transfer_by_id_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetTokenTransferByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/transfers/id1", nil)
diff --git a/internal/apiserver/route_get_token_transfers_test.go b/internal/apiserver/route_get_token_transfers_test.go
index 2b21a8c24..827149efd 100644
--- a/internal/apiserver/route_get_token_transfers_test.go
+++ b/internal/apiserver/route_get_token_transfers_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestGetTokenTransfers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/transfers", nil)
@@ -45,7 +44,6 @@ func TestGetTokenTransfers(t *testing.T) {
 
 func TestGetTokenTransfersFromOrTo(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/tokens/transfers?fromOrTo=0x1", nil)
diff --git a/internal/apiserver/route_get_txn_blockchainevents_test.go b/internal/apiserver/route_get_txn_blockchainevents_test.go
index 86e8237ab..3245224f5 100644
--- a/internal/apiserver/route_get_txn_blockchainevents_test.go
+++ b/internal/apiserver/route_get_txn_blockchainevents_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetTxnBlockchainEvents(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/transactions/abcd12345/blockchainevents", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_txn_by_id_test.go b/internal/apiserver/route_get_txn_by_id_test.go
index 5ccb93b33..9cec72328 100644
--- a/internal/apiserver/route_get_txn_by_id_test.go
+++ b/internal/apiserver/route_get_txn_by_id_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetTXByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/transactions/abcd12345", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_txn_ops_test.go b/internal/apiserver/route_get_txn_ops_test.go
index df807226c..d5c6ef362 100644
--- a/internal/apiserver/route_get_txn_ops_test.go
+++ b/internal/apiserver/route_get_txn_ops_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetTxnOps(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/transactions/abcd12345/operations", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_txn_status_test.go b/internal/apiserver/route_get_txn_status_test.go
index 7e4678b82..acdb08e75 100644
--- a/internal/apiserver/route_get_txn_status_test.go
+++ b/internal/apiserver/route_get_txn_status_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetTxnStatus(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/transactions/abcd12345/status", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_txns_test.go b/internal/apiserver/route_get_txns_test.go
index 6685e4796..496c55a8a 100644
--- a/internal/apiserver/route_get_txns_test.go
+++ b/internal/apiserver/route_get_txns_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestGetTxns(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/mynamespace/transactions", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/route_get_verifier_by_id_test.go b/internal/apiserver/route_get_verifier_by_id_test.go
index f0172814b..440134369 100644
--- a/internal/apiserver/route_get_verifier_by_id_test.go
+++ b/internal/apiserver/route_get_verifier_by_id_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetVerifierByID(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/verifiers/hashid1", nil)
diff --git a/internal/apiserver/route_get_verifiers_test.go b/internal/apiserver/route_get_verifiers_test.go
index 606654910..f8cc7fa1a 100644
--- a/internal/apiserver/route_get_verifiers_test.go
+++ b/internal/apiserver/route_get_verifiers_test.go
@@ -28,7 +28,6 @@ import (
 
 func TestGetVerifiers(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	req := httptest.NewRequest("GET", "/api/v1/namespaces/ns1/verifiers", nil)
diff --git a/internal/apiserver/route_get_websockets_test.go b/internal/apiserver/route_get_websockets_test.go
index cd14e6be7..183f37416 100644
--- a/internal/apiserver/route_get_websockets_test.go
+++ b/internal/apiserver/route_get_websockets_test.go
@@ -23,12 +23,10 @@ import (
 	"github.com/hyperledger/firefly/mocks/eventmocks"
 	"github.com/hyperledger/firefly/pkg/core"
 	"github.com/stretchr/testify/assert"
-	"github.com/stretchr/testify/mock"
 )
 
 func TestGetWebSockets(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mem := &eventmocks.EventManager{}
 	o.On("Events").Return(mem)
 	req := httptest.NewRequest("GET", "/api/v1/websockets", nil)
diff --git a/internal/apiserver/route_patch_update_identity_test.go b/internal/apiserver/route_patch_update_identity_test.go
index 9ab7cceae..e017a4f2d 100644
--- a/internal/apiserver/route_patch_update_identity_test.go
+++ b/internal/apiserver/route_patch_update_identity_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestUpdateIdentity(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	input := core.Identity{}
diff --git a/internal/apiserver/route_post_contract_api_invoke_test.go b/internal/apiserver/route_post_contract_api_invoke_test.go
index e60308fc4..e38d93c51 100644
--- a/internal/apiserver/route_post_contract_api_invoke_test.go
+++ b/internal/apiserver/route_post_contract_api_invoke_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostContractAPIInvoke(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_contract_api_listeners_test.go b/internal/apiserver/route_post_contract_api_listeners_test.go
index 30ad0ddfa..ff70fcb53 100644
--- a/internal/apiserver/route_post_contract_api_listeners_test.go
+++ b/internal/apiserver/route_post_contract_api_listeners_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostContractAPIListen(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_contract_api_query_test.go b/internal/apiserver/route_post_contract_api_query_test.go
index 16fcbcba1..ee616da70 100644
--- a/internal/apiserver/route_post_contract_api_query_test.go
+++ b/internal/apiserver/route_post_contract_api_query_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostContractAPIQuery(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_contract_interface_generate_test.go b/internal/apiserver/route_post_contract_interface_generate_test.go
index fe5a9e44f..1a08ccc64 100644
--- a/internal/apiserver/route_post_contract_interface_generate_test.go
+++ b/internal/apiserver/route_post_contract_interface_generate_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestPostContractInterfaceGenerate(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_contract_invoke_test.go b/internal/apiserver/route_post_contract_invoke_test.go
index 790f81af6..be0a5e47b 100644
--- a/internal/apiserver/route_post_contract_invoke_test.go
+++ b/internal/apiserver/route_post_contract_invoke_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostContractInvoke(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_contract_query_test.go b/internal/apiserver/route_post_contract_query_test.go
index 908adf6ef..fa3787b22 100644
--- a/internal/apiserver/route_post_contract_query_test.go
+++ b/internal/apiserver/route_post_contract_query_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostContractQuery(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_data_test.go b/internal/apiserver/route_post_data_test.go
index 43df02170..b3b38333a 100644
--- a/internal/apiserver/route_post_data_test.go
+++ b/internal/apiserver/route_post_data_test.go
@@ -34,7 +34,6 @@ import (
 
 func TestPostDataJSON(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -54,7 +53,6 @@ func TestPostDataJSON(t *testing.T) {
 
 func TestPostDataJSONDefaultNS(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -76,7 +74,6 @@ func TestPostDataBinary(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -103,7 +100,6 @@ func TestPostDataBinaryObjAutoMeta(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -151,7 +147,6 @@ func TestPostDataBinaryStringMetadata(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -186,7 +181,6 @@ func TestPostDataTrailingMetadata(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -219,7 +213,6 @@ func TestPostDataBinaryMissing(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
@@ -245,7 +238,6 @@ func TestPostDataBadForm(t *testing.T) {
 	log.SetLevel("debug")
 
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mdm := &datamocks.Manager{}
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	o.On("Data").Return(mdm)
diff --git a/internal/apiserver/route_post_network_action_test.go b/internal/apiserver/route_post_network_action_test.go
index c6b78b77c..0c56f813e 100644
--- a/internal/apiserver/route_post_network_action_test.go
+++ b/internal/apiserver/route_post_network_action_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNetworkAction(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
 	input := core.NetworkAction{}
 	var buf bytes.Buffer
diff --git a/internal/apiserver/route_post_new_contract_api_test.go b/internal/apiserver/route_post_new_contract_api_test.go
index ec8ba24f1..e28729174 100644
--- a/internal/apiserver/route_post_new_contract_api_test.go
+++ b/internal/apiserver/route_post_new_contract_api_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewContractAPI(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
@@ -48,7 +47,6 @@ func TestPostNewContractAPI(t *testing.T) {
 
 func TestPostNewContractAPISync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_new_contract_interface_test.go b/internal/apiserver/route_post_new_contract_interface_test.go
index b46ceb57e..8b7bba56d 100644
--- a/internal/apiserver/route_post_new_contract_interface_test.go
+++ b/internal/apiserver/route_post_new_contract_interface_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewContractInterface(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
@@ -48,7 +47,6 @@ func TestPostNewContractInterface(t *testing.T) {
 
 func TestPostNewContractInterfaceSync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_post_new_contract_listener_test.go b/internal/apiserver/route_post_new_contract_listener_test.go
index 048528de9..25e39e69a 100644
--- a/internal/apiserver/route_post_new_contract_listener_test.go
+++ b/internal/apiserver/route_post_new_contract_listener_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewContractListener(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mcm := &contractmocks.Manager{}
 	o.On("Contracts").Return(mcm)
 	input := core.ContractListenerInput{}
diff --git a/internal/apiserver/route_post_new_datatype_test.go b/internal/apiserver/route_post_new_datatype_test.go
index fd6b4ccba..c8753f2ff 100644
--- a/internal/apiserver/route_post_new_datatype_test.go
+++ b/internal/apiserver/route_post_new_datatype_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestPostNewDatatypes(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
@@ -50,7 +49,6 @@ func TestPostNewDatatypes(t *testing.T) {
 
 func TestPostNewDatatypesSync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
diff --git a/internal/apiserver/route_post_new_identity_test.go b/internal/apiserver/route_post_new_identity_test.go
index 98a7cca8f..c74bfadae 100644
--- a/internal/apiserver/route_post_new_identity_test.go
+++ b/internal/apiserver/route_post_new_identity_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestNewIdentity(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	input := core.Identity{}
diff --git a/internal/apiserver/route_post_new_message_broadcast_test.go b/internal/apiserver/route_post_new_message_broadcast_test.go
index 8b3c0f81f..cbebf75d6 100644
--- a/internal/apiserver/route_post_new_message_broadcast_test.go
+++ b/internal/apiserver/route_post_new_message_broadcast_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewMessageBroadcast(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mbm := &broadcastmocks.Manager{}
 	o.On("Broadcast").Return(mbm)
 	input := core.MessageInOut{}
@@ -49,7 +48,6 @@ func TestPostNewMessageBroadcast(t *testing.T) {
 
 func TestPostNewMessageBroadcastSync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mbm := &broadcastmocks.Manager{}
 	o.On("Broadcast").Return(mbm)
 	input := core.MessageInOut{}
diff --git a/internal/apiserver/route_post_new_message_private_test.go b/internal/apiserver/route_post_new_message_private_test.go
index 7b12dae1f..aa0675393 100644
--- a/internal/apiserver/route_post_new_message_private_test.go
+++ b/internal/apiserver/route_post_new_message_private_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewMessagePrivate(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mpm := &privatemessagingmocks.Manager{}
 	o.On("PrivateMessaging").Return(mpm)
 	input := core.MessageInOut{}
@@ -49,7 +48,6 @@ func TestPostNewMessagePrivate(t *testing.T) {
 
 func TestPostNewMessagePrivateSync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mpm := &privatemessagingmocks.Manager{}
 	o.On("PrivateMessaging").Return(mpm)
 	input := core.MessageInOut{}
diff --git a/internal/apiserver/route_post_new_message_requestreply_test.go b/internal/apiserver/route_post_new_message_requestreply_test.go
index e71587bef..d8e43c7b1 100644
--- a/internal/apiserver/route_post_new_message_requestreply_test.go
+++ b/internal/apiserver/route_post_new_message_requestreply_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostNewMessageRequestReply(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	o.On("PrivateMessaging").Return(&privatemessagingmocks.Manager{})
 	o.On("RequestReply", mock.Anything, mock.Anything).Return(&core.MessageInOut{}, nil)
 	input := &core.MessageInOut{}
diff --git a/internal/apiserver/route_post_new_node_self_test.go b/internal/apiserver/route_post_new_node_self_test.go
index feea86e9e..66aa6f4c3 100644
--- a/internal/apiserver/route_post_new_node_self_test.go
+++ b/internal/apiserver/route_post_new_node_self_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestPostNewNodeSelf(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
diff --git a/internal/apiserver/route_post_new_organization_self_test.go b/internal/apiserver/route_post_new_organization_self_test.go
index 9472125d7..e97962cb6 100644
--- a/internal/apiserver/route_post_new_organization_self_test.go
+++ b/internal/apiserver/route_post_new_organization_self_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestNewOrganizationSelf(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	o.On("MultiParty").Return(&multipartymocks.Manager{})
diff --git a/internal/apiserver/route_post_new_organization_test.go b/internal/apiserver/route_post_new_organization_test.go
index e30912d5c..bdcaaadd7 100644
--- a/internal/apiserver/route_post_new_organization_test.go
+++ b/internal/apiserver/route_post_new_organization_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestNewOrganization(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mnm := &networkmapmocks.Manager{}
 	o.On("NetworkMap").Return(mnm)
 	input := core.Identity{}
diff --git a/internal/apiserver/route_post_new_subscription_test.go b/internal/apiserver/route_post_new_subscription_test.go
index 1355cd071..00ce58e61 100644
--- a/internal/apiserver/route_post_new_subscription_test.go
+++ b/internal/apiserver/route_post_new_subscription_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestPostNewSubscription(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	input := core.Subscription{}
 	var buf bytes.Buffer
 	json.NewEncoder(&buf).Encode(&input)
diff --git a/internal/apiserver/route_post_op_retry_test.go b/internal/apiserver/route_post_op_retry_test.go
index 1b287e837..308dc4d76 100644
--- a/internal/apiserver/route_post_op_retry_test.go
+++ b/internal/apiserver/route_post_op_retry_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestPostOpRetry(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mom := &operationmocks.Manager{}
 	o.On("Operations").Return(mom)
 	input := core.EmptyInput{}
@@ -50,8 +49,7 @@ func TestPostOpRetry(t *testing.T) {
 }
 
 func TestPostOpRetryBadID(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	input := core.EmptyInput{}
 	var buf bytes.Buffer
 	json.NewEncoder(&buf).Encode(&input)
diff --git a/internal/apiserver/route_post_token_approval_test.go b/internal/apiserver/route_post_token_approval_test.go
index 37b8b2f37..395ebc5a3 100644
--- a/internal/apiserver/route_post_token_approval_test.go
+++ b/internal/apiserver/route_post_token_approval_test.go
@@ -31,7 +31,6 @@ import (
 
 func TestPostTokenApproval(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := fftypes.JSONObject{}
@@ -51,7 +50,6 @@ func TestPostTokenApproval(t *testing.T) {
 
 func TestPostTokenApprovalUnapprove(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := fftypes.JSONObject{"approved": false}
diff --git a/internal/apiserver/route_post_token_burn_test.go b/internal/apiserver/route_post_token_burn_test.go
index faa07983b..f62b8c521 100644
--- a/internal/apiserver/route_post_token_burn_test.go
+++ b/internal/apiserver/route_post_token_burn_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostTokenBurn(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := core.TokenTransferInput{}
diff --git a/internal/apiserver/route_post_token_mint_test.go b/internal/apiserver/route_post_token_mint_test.go
index b613c05a6..cf00925a4 100644
--- a/internal/apiserver/route_post_token_mint_test.go
+++ b/internal/apiserver/route_post_token_mint_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostTokenMint(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := core.TokenTransferInput{}
diff --git a/internal/apiserver/route_post_token_pool_test.go b/internal/apiserver/route_post_token_pool_test.go
index f669b3aa5..7fcb89a5d 100644
--- a/internal/apiserver/route_post_token_pool_test.go
+++ b/internal/apiserver/route_post_token_pool_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostTokenPool(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := core.TokenPool{}
diff --git a/internal/apiserver/route_post_token_transfer_test.go b/internal/apiserver/route_post_token_transfer_test.go
index 1c2593d77..d65a3458c 100644
--- a/internal/apiserver/route_post_token_transfer_test.go
+++ b/internal/apiserver/route_post_token_transfer_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPostTokenTransfer(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mam := &assetmocks.Manager{}
 	o.On("Assets").Return(mam)
 	input := core.TokenTransferInput{}
diff --git a/internal/apiserver/route_put_contract_api_test.go b/internal/apiserver/route_put_contract_api_test.go
index 021a1738d..90754491d 100644
--- a/internal/apiserver/route_put_contract_api_test.go
+++ b/internal/apiserver/route_put_contract_api_test.go
@@ -30,7 +30,6 @@ import (
 
 func TestPutContractAPI(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
@@ -48,7 +47,6 @@ func TestPutContractAPI(t *testing.T) {
 
 func TestPutContractAPISync(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	mds := &definitionsmocks.Sender{}
 	o.On("DefinitionSender").Return(mds)
 	input := core.Datatype{}
diff --git a/internal/apiserver/route_put_subscription_test.go b/internal/apiserver/route_put_subscription_test.go
index 8c473339e..0cb858b01 100644
--- a/internal/apiserver/route_put_subscription_test.go
+++ b/internal/apiserver/route_put_subscription_test.go
@@ -29,7 +29,6 @@ import (
 
 func TestPutSubscription(t *testing.T) {
 	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	input := core.Subscription{}
 	var buf bytes.Buffer
 	json.NewEncoder(&buf).Encode(&input)
diff --git a/internal/apiserver/route_spi_get_ops_test.go b/internal/apiserver/route_spi_get_ops_test.go
index 44cba7013..49ef90549 100644
--- a/internal/apiserver/route_spi_get_ops_test.go
+++ b/internal/apiserver/route_spi_get_ops_test.go
@@ -27,7 +27,6 @@ import (
 
 func TestSPIGetOperations(t *testing.T) {
 	or, r := newTestSPIServer()
-	or.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	req := httptest.NewRequest("GET", "/spi/v1/namespaces/ns1/operations", nil)
 	req.Header.Set("Content-Type", "application/json; charset=utf-8")
 	res := httptest.NewRecorder()
diff --git a/internal/apiserver/server_test.go b/internal/apiserver/server_test.go
index ca46432dd..0218b5ca8 100644
--- a/internal/apiserver/server_test.go
+++ b/internal/apiserver/server_test.go
@@ -33,7 +33,6 @@ import (
 	"github.com/hyperledger/firefly-common/pkg/config"
 	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly-common/pkg/httpserver"
-	"github.com/hyperledger/firefly-common/pkg/i18n"
 	"github.com/hyperledger/firefly/internal/coreconfig"
 	"github.com/hyperledger/firefly/internal/metrics"
 	"github.com/hyperledger/firefly/mocks/apiservermocks"
@@ -176,8 +175,7 @@ func TestNotFound(t *testing.T) {
 }
 
 func TestFilterTooMany(t *testing.T) {
-	mgr, o, as := newTestServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	mgr, _, as := newTestServer()
 	handler := as.routeHandler(as.handlerFactory(), mgr, "", getBatches)
 
 	req := httptest.NewRequest("GET", "http://localhost:12345/test?limit=99999999999", nil)
@@ -189,20 +187,6 @@ func TestFilterTooMany(t *testing.T) {
 	assert.Regexp(t, "FF10184", resJSON["error"])
 }
 
-func TestUnauthorized(t *testing.T) {
-	mgr, o, as := newTestServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(i18n.NewError(context.Background(), i18n.MsgUnauthorized))
-	handler := as.routeHandler(as.handlerFactory(), mgr, "", getBatches)
-
-	req := httptest.NewRequest("GET", "http://localhost:12345/test", nil)
-	res := httptest.NewRecorder()
-	handler.ServeHTTP(res, req)
-	assert.Equal(t, 401, res.Result().StatusCode)
-	var resJSON map[string]interface{}
-	json.NewDecoder(res.Body).Decode(&resJSON)
-	assert.Regexp(t, "FF00169", resJSON["error"])
-}
-
 func TestSwaggerYAML(t *testing.T) {
 	_, _, as := newTestServer()
 	handler := as.handlerFactory().APIWrapper(as.swaggerHandler(as.swaggerGenerator(routes, "http://localhost:12345/api/v1")))
@@ -220,8 +204,7 @@ func TestSwaggerYAML(t *testing.T) {
 }
 
 func TestSwaggerJSON(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	s := httptest.NewServer(r)
 	defer s.Close()
 
@@ -359,8 +342,7 @@ func TestContractAPISwaggerJSONBadNamespace(t *testing.T) {
 }
 
 func TestContractAPISwaggerUI(t *testing.T) {
-	o, r := newTestAPIServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
+	_, r := newTestAPIServer()
 	s := httptest.NewServer(r)
 	defer s.Close()
 
@@ -414,7 +396,6 @@ func TestFormDataBadNamespace(t *testing.T) {
 
 func TestJSONDisabledRoute(t *testing.T) {
 	mgr, o, as := newTestServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	r := as.createMuxRouter(context.Background(), mgr)
 	s := httptest.NewServer(r)
 	defer s.Close()
@@ -433,7 +414,6 @@ func TestJSONDisabledRoute(t *testing.T) {
 
 func TestFormDataDisabledRoute(t *testing.T) {
 	mgr, o, as := newTestServer()
-	o.On("Authorize", mock.Anything, mock.Anything).Return(nil)
 	r := as.createMuxRouter(context.Background(), mgr)
 	s := httptest.NewServer(r)
 	defer s.Close()
diff --git a/internal/events/websockets/websockets_test.go b/internal/events/websockets/websockets_test.go
index 12f8fbfcf..5800357d6 100644
--- a/internal/events/websockets/websockets_test.go
+++ b/internal/events/websockets/websockets_test.go
@@ -29,7 +29,6 @@ import (
 	"github.com/hyperledger/firefly-common/pkg/config"
 	"github.com/hyperledger/firefly-common/pkg/ffresty"
 	"github.com/hyperledger/firefly-common/pkg/fftypes"
-	"github.com/hyperledger/firefly-common/pkg/i18n"
 	"github.com/hyperledger/firefly-common/pkg/log"
 	"github.com/hyperledger/firefly-common/pkg/wsclient"
 	"github.com/hyperledger/firefly/internal/coreconfig"
@@ -40,16 +39,7 @@ import (
 	"github.com/stretchr/testify/mock"
 )
 
-type testAuthorizer struct{}
-
-func (t *testAuthorizer) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error {
-	if authReq.Namespace == "ns1" {
-		return nil
-	}
-	return i18n.NewError(ctx, i18n.MsgUnauthorized)
-}
-
-func newTestWebsockets(t *testing.T, cbs *eventsmocks.Callbacks, authorizer core.Authorizer, queryParams ...string) (ws *WebSockets, wsc wsclient.WSClient, cancel func()) {
+func newTestWebsockets(t *testing.T, cbs *eventsmocks.Callbacks, queryParams ...string) (ws *WebSockets, wsc wsclient.WSClient, cancel func()) {
 	coreconfig.Reset()
 
 	ws = &WebSockets{}
@@ -58,7 +48,6 @@ func newTestWebsockets(t *testing.T, cbs *eventsmocks.Callbacks, authorizer core
 	ws.InitConfig(svrConfig)
 	ws.Init(ctx, svrConfig)
 	ws.SetHandler("ns1", cbs)
-	ws.SetAuthorizer(authorizer)
 	assert.Equal(t, "websockets", ws.Name())
 	assert.NotNil(t, ws.Capabilities())
 	cbs.On("ConnectionClosed", mock.Anything).Return(nil).Maybe()
@@ -86,9 +75,10 @@ func newTestWebsockets(t *testing.T, cbs *eventsmocks.Callbacks, authorizer core
 		svr.Close()
 	}
 }
+
 func TestValidateOptionsFail(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	ws, _, cancel := newTestWebsockets(t, cbs, nil)
+	ws, _, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	yes := true
@@ -102,7 +92,7 @@ func TestValidateOptionsFail(t *testing.T) {
 
 func TestValidateOptionsOk(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	ws, _, cancel := newTestWebsockets(t, cbs, nil)
+	ws, _, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	opts := &core.SubscriptionOptions{}
@@ -113,7 +103,7 @@ func TestValidateOptionsOk(t *testing.T) {
 
 func TestSendBadData(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	_, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	cbs.On("ConnectionClosed", mock.Anything).Return(nil)
@@ -130,7 +120,7 @@ func TestSendBadData(t *testing.T) {
 
 func TestSendBadAction(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	_, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 	cbs.On("ConnectionClosed", mock.Anything).Return(nil)
 
@@ -146,7 +136,7 @@ func TestSendBadAction(t *testing.T) {
 
 func TestSendEmptyStartAction(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	_, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 	cbs.On("ConnectionClosed", mock.Anything).Return(nil)
 
@@ -164,7 +154,7 @@ func TestStartReceiveAckEphemeral(t *testing.T) {
 	log.SetLevel("trace")
 
 	cbs := &eventsmocks.Callbacks{}
-	ws, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	ws, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 	var connID string
 	sub := cbs.On("EphemeralSubscription",
@@ -212,7 +202,7 @@ func TestStartReceiveAckEphemeral(t *testing.T) {
 
 func TestStartReceiveDurable(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	ws, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	ws, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 	var connID string
 	sub := cbs.On("RegisterConnection",
@@ -290,122 +280,6 @@ func TestStartReceiveDurable(t *testing.T) {
 	cbs.AssertExpectations(t)
 }
 
-func TestStartReceiveDurableWithAuth(t *testing.T) {
-	cbs := &eventsmocks.Callbacks{}
-	ws, wsc, cancel := newTestWebsockets(t, cbs, &testAuthorizer{})
-	defer cancel()
-	var connID string
-	sub := cbs.On("RegisterConnection",
-		mock.MatchedBy(func(s string) bool { connID = s; return true }),
-		mock.MatchedBy(func(subMatch events.SubscriptionMatcher) bool {
-			return subMatch(core.SubscriptionRef{Namespace: "ns1", Name: "sub1"}) &&
-				!subMatch(core.SubscriptionRef{Namespace: "ns2", Name: "sub1"}) &&
-				!subMatch(core.SubscriptionRef{Namespace: "ns1", Name: "sub2"})
-		}),
-	).Return(nil)
-	ack := cbs.On("DeliveryResponse",
-		mock.MatchedBy(func(s string) bool { return s == connID }),
-		mock.Anything).Return(nil)
-
-	waitSubscribed := make(chan struct{})
-	sub.RunFn = func(a mock.Arguments) {
-		close(waitSubscribed)
-	}
-
-	waitAcked := make(chan struct{})
-	ack.RunFn = func(a mock.Arguments) {
-		close(waitAcked)
-	}
-
-	err := wsc.Send(context.Background(), []byte(`{"type":"start","namespace":"ns1","name":"sub1"}`))
-	assert.NoError(t, err)
-
-	<-waitSubscribed
-	ws.DeliveryRequest(connID, nil, &core.EventDelivery{
-		EnrichedEvent: core.EnrichedEvent{
-			Event: core.Event{ID: fftypes.NewUUID()},
-		},
-		Subscription: core.SubscriptionRef{
-			ID:        fftypes.NewUUID(),
-			Namespace: "ns1",
-			Name:      "sub1",
-		},
-	}, nil)
-	// Put a second in flight
-	ws.DeliveryRequest(connID, nil, &core.EventDelivery{
-		EnrichedEvent: core.EnrichedEvent{
-			Event: core.Event{ID: fftypes.NewUUID()},
-		},
-		Subscription: core.SubscriptionRef{
-			ID:        fftypes.NewUUID(),
-			Namespace: "ns1",
-			Name:      "sub2",
-		},
-	}, nil)
-
-	b := <-wsc.Receive()
-	var res core.EventDelivery
-	err = json.Unmarshal(b, &res)
-	assert.NoError(t, err)
-
-	assert.Equal(t, "ns1", res.Subscription.Namespace)
-	assert.Equal(t, "sub1", res.Subscription.Name)
-	err = wsc.Send(context.Background(), []byte(fmt.Sprintf(`{
-		"type":"ack",
-		"id": "%s",
-		"subscription": {
-			"namespace": "ns1",
-			"name": "sub1"
-		}
-	}`, res.ID)))
-	assert.NoError(t, err)
-
-	<-waitAcked
-
-	// Check we left the right one behind
-	conn := ws.connections[connID]
-	assert.Equal(t, 1, len(conn.inflight))
-	assert.Equal(t, "sub2", conn.inflight[0].Subscription.Name)
-
-	cbs.AssertExpectations(t)
-}
-
-func TestStartReceiveDurableUnauthorized(t *testing.T) {
-	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, &testAuthorizer{})
-	defer cancel()
-	var connID string
-	sub := cbs.On("RegisterConnection",
-		mock.MatchedBy(func(s string) bool { connID = s; return true }),
-		mock.MatchedBy(func(subMatch events.SubscriptionMatcher) bool {
-			return subMatch(core.SubscriptionRef{Namespace: "ns2", Name: "sub1"}) &&
-				!subMatch(core.SubscriptionRef{Namespace: "ns1", Name: "sub2"})
-		}),
-	).Return(nil)
-	ack := cbs.On("DeliveryResponse",
-		mock.MatchedBy(func(s string) bool { return s == connID }),
-		mock.Anything).Return(nil)
-
-	waitSubscribed := make(chan struct{})
-	sub.RunFn = func(a mock.Arguments) {
-		close(waitSubscribed)
-	}
-
-	waitAcked := make(chan struct{})
-	ack.RunFn = func(a mock.Arguments) {
-		close(waitAcked)
-	}
-
-	err := wsc.Send(context.Background(), []byte(`{"type":"start","namespace":"ns2","name":"sub1"}`))
-	assert.NoError(t, err)
-
-	b := <-wsc.Receive()
-	var res fftypes.JSONObject
-	err = json.Unmarshal(b, &res)
-	assert.NoError(t, err)
-	assert.Regexp(t, "FF00169", res.GetString("error"))
-}
-
 func TestAutoStartReceiveAckEphemeral(t *testing.T) {
 	var connID string
 	cbs := &eventsmocks.Callbacks{}
@@ -426,7 +300,7 @@ func TestAutoStartReceiveAckEphemeral(t *testing.T) {
 		close(waitAcked)
 	}
 
-	ws, wsc, cancel := newTestWebsockets(t, cbs, nil, "ephemeral", "namespace=ns1")
+	ws, wsc, cancel := newTestWebsockets(t, cbs, "ephemeral", "namespace=ns1")
 	defer cancel()
 
 	<-waitSubscribed
@@ -454,7 +328,7 @@ func TestAutoStartReceiveAckEphemeral(t *testing.T) {
 
 func TestAutoStartBadOptions(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil, "name=missingnamespace")
+	_, wsc, cancel := newTestWebsockets(t, cbs, "name=missingnamespace")
 	defer cancel()
 
 	b := <-wsc.Receive()
@@ -467,7 +341,7 @@ func TestAutoStartBadOptions(t *testing.T) {
 
 func TestAutoStartBadNamespace(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil, "ephemeral", "namespace=ns2")
+	_, wsc, cancel := newTestWebsockets(t, cbs, "ephemeral", "namespace=ns2")
 	defer cancel()
 
 	b := <-wsc.Receive()
@@ -580,7 +454,7 @@ func TestProtocolErrorSwallowsSendError(t *testing.T) {
 
 func TestSendLoopBadData(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	ws, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	ws, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	subscribedConn := make(chan string, 1)
@@ -605,7 +479,7 @@ func TestSendLoopBadData(t *testing.T) {
 
 func TestUpgradeFail(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	_, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	_, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	u, _ := url.Parse(wsc.URL())
@@ -662,7 +536,7 @@ func TestDispatchAutoAck(t *testing.T) {
 
 func TestWebsocketSendAfterClose(t *testing.T) {
 	cbs := &eventsmocks.Callbacks{}
-	ws, wsc, cancel := newTestWebsockets(t, cbs, nil)
+	ws, wsc, cancel := newTestWebsockets(t, cbs)
 	defer cancel()
 
 	subscribedConn := make(chan string, 1)
diff --git a/internal/namespace/manager_test.go b/internal/namespace/manager_test.go
index 7c49f5b21..421d07f24 100644
--- a/internal/namespace/manager_test.go
+++ b/internal/namespace/manager_test.go
@@ -22,8 +22,6 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/hyperledger/firefly-common/mocks/authmocks"
-	"github.com/hyperledger/firefly-common/pkg/auth/authfactory"
 	"github.com/hyperledger/firefly-common/pkg/config"
 	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly/internal/blockchain/bifactory"
@@ -31,7 +29,6 @@ import (
 	"github.com/hyperledger/firefly/internal/database/difactory"
 	"github.com/hyperledger/firefly/internal/dataexchange/dxfactory"
 	"github.com/hyperledger/firefly/internal/identity/iifactory"
-	"github.com/hyperledger/firefly/internal/orchestrator"
 	"github.com/hyperledger/firefly/internal/sharedstorage/ssfactory"
 	"github.com/hyperledger/firefly/internal/tokens/tifactory"
 	"github.com/hyperledger/firefly/mocks/blockchainmocks"
@@ -56,15 +53,14 @@ import (
 
 type testNamespaceManager struct {
 	namespaceManager
-	mmi  *metricsmocks.Manager
-	mae  *spieventsmocks.Manager
-	mbi  *blockchainmocks.Plugin
-	mdi  *databasemocks.Plugin
-	mdx  *dataexchangemocks.Plugin
-	mps  *sharedstoragemocks.Plugin
-	mti  *tokenmocks.Plugin
-	mev  *eventsmocks.Plugin
-	auth *authmocks.Plugin
+	mmi *metricsmocks.Manager
+	mae *spieventsmocks.Manager
+	mbi *blockchainmocks.Plugin
+	mdi *databasemocks.Plugin
+	mdx *dataexchangemocks.Plugin
+	mps *sharedstoragemocks.Plugin
+	mti *tokenmocks.Plugin
+	mev *eventsmocks.Plugin
 }
 
 func (nm *testNamespaceManager) cleanup(t *testing.T) {
@@ -75,7 +71,6 @@ func (nm *testNamespaceManager) cleanup(t *testing.T) {
 	nm.mdx.AssertExpectations(t)
 	nm.mps.AssertExpectations(t)
 	nm.mti.AssertExpectations(t)
-	nm.auth.AssertExpectations(t)
 }
 
 func newTestNamespaceManager(resetConfig bool) *testNamespaceManager {
@@ -85,15 +80,14 @@ func newTestNamespaceManager(resetConfig bool) *testNamespaceManager {
 		namespaceConfig.AddKnownKey("predefined.0.multiparty.enabled", true)
 	}
 	nm := &testNamespaceManager{
-		mmi:  &metricsmocks.Manager{},
-		mae:  &spieventsmocks.Manager{},
-		mbi:  &blockchainmocks.Plugin{},
-		mdi:  &databasemocks.Plugin{},
-		mdx:  &dataexchangemocks.Plugin{},
-		mps:  &sharedstoragemocks.Plugin{},
-		mti:  &tokenmocks.Plugin{},
-		mev:  &eventsmocks.Plugin{},
-		auth: &authmocks.Plugin{},
+		mmi: &metricsmocks.Manager{},
+		mae: &spieventsmocks.Manager{},
+		mbi: &blockchainmocks.Plugin{},
+		mdi: &databasemocks.Plugin{},
+		mdx: &dataexchangemocks.Plugin{},
+		mps: &sharedstoragemocks.Plugin{},
+		mti: &tokenmocks.Plugin{},
+		mev: &eventsmocks.Plugin{},
 		namespaceManager: namespaceManager{
 			ctx:         context.Background(),
 			namespaces:  make(map[string]*namespace),
@@ -121,9 +115,6 @@ func newTestNamespaceManager(resetConfig bool) *testNamespaceManager {
 	nm.plugins.events = map[string]eventsPlugin{
 		"websockets": {plugin: nm.mev},
 	}
-	nm.plugins.auth = map[string]authPlugin{
-		"basicauth": {plugin: nm.auth},
-	}
 	nm.namespaceManager.metrics = nm.mmi
 	nm.namespaceManager.adminEvents = nm.mae
 	return nm
@@ -152,7 +143,6 @@ func TestInit(t *testing.T) {
 	nm.mps.On("Init", mock.Anything, mock.Anything).Return(nil)
 	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 
 	ctx, cancelCtx := context.WithCancel(context.Background())
 	err := nm.Init(ctx, cancelCtx)
@@ -262,26 +252,6 @@ func TestInitEventsFail(t *testing.T) {
 	assert.EqualError(t, err, "pop")
 }
 
-func TestInitAuthFail(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-
-	nm.utOrchestrator = &orchestratormocks.Orchestrator{}
-
-	nm.mdi.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.mdi.On("SetHandler", database.GlobalHandler, mock.Anything).Return()
-	nm.mbi.On("Init", mock.Anything, mock.Anything, nm.mmi).Return(nil)
-	nm.mdx.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.mps.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
-	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(fmt.Errorf("pop"))
-
-	ctx, cancelCtx := context.WithCancel(context.Background())
-	err := nm.Init(ctx, cancelCtx)
-	assert.EqualError(t, err, "pop")
-}
-
 func TestInitOrchestratorFail(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
@@ -297,7 +267,6 @@ func TestInitOrchestratorFail(t *testing.T) {
 	nm.mps.On("SetHandler", "default", mock.Anything).Return()
 	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 
 	ctx, cancelCtx := context.WithCancel(context.Background())
 	err := nm.Init(ctx, cancelCtx)
@@ -325,7 +294,6 @@ func TestInitVersion1(t *testing.T) {
 	nm.mps.On("Init", mock.Anything, mock.Anything).Return(nil)
 	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 
 	ctx, cancelCtx := context.WithCancel(context.Background())
 	err := nm.Init(ctx, cancelCtx)
@@ -359,7 +327,6 @@ func TestInitVersion1Fail(t *testing.T) {
 	nm.mps.On("Init", mock.Anything, mock.Anything).Return(nil)
 	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 
 	ctx, cancelCtx := context.WithCancel(context.Background())
 	err := nm.Init(ctx, cancelCtx)
@@ -731,43 +698,6 @@ func TestEventsPluginDefaults(t *testing.T) {
 	assert.NoError(t, err)
 }
 
-func TestAuthPlugin(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-	authfactory.InitConfigArray(authConfig)
-	config.Set("plugins.auth", []fftypes.JSONObject{{}})
-	authConfig.AddKnownKey(coreconfig.PluginConfigName, "basicauth")
-	authConfig.AddKnownKey(coreconfig.PluginConfigType, "basic")
-	plugins, err := nm.getAuthPlugin(context.Background())
-	assert.Equal(t, 1, len(plugins))
-	assert.NoError(t, err)
-}
-
-func TestAuthPluginBadType(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-	nm.plugins.auth = nil
-	authfactory.InitConfigArray(authConfig)
-	config.Set("plugins.auth", []fftypes.JSONObject{{}})
-	authConfig.AddKnownKey(coreconfig.PluginConfigName, "basicauth")
-	authConfig.AddKnownKey(coreconfig.PluginConfigType, "wrong")
-	ctx, cancelCtx := context.WithCancel(context.Background())
-	err := nm.Init(ctx, cancelCtx)
-	assert.Error(t, err)
-}
-
-func TestAuthPluginInvalid(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-	authfactory.InitConfigArray(authConfig)
-	config.Set("plugins.auth", []fftypes.JSONObject{{}})
-	authConfig.AddKnownKey(coreconfig.PluginConfigName, "bad name not allowed")
-	authConfig.AddKnownKey(coreconfig.PluginConfigType, "basic")
-	plugins, err := nm.getAuthPlugin(context.Background())
-	assert.Equal(t, 0, len(plugins))
-	assert.Error(t, err)
-}
-
 func TestEventsPluginBadType(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
@@ -791,7 +721,6 @@ func TestInitBadNamespace(t *testing.T) {
 	nm.mps.On("Init", mock.Anything, mock.Anything).Return(nil)
 	nm.mti.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 	nm.mev.On("Init", mock.Anything, mock.Anything).Return(nil)
-	nm.auth.On("Init", mock.Anything, mock.Anything, mock.Anything).Return(nil)
 
 	viper.SetConfigType("yaml")
 	err := viper.ReadConfig(strings.NewReader(`
@@ -1017,46 +946,6 @@ func TestLoadNamespacesMultipartyMultipleDB(t *testing.T) {
 	assert.Regexp(t, "FF10394.*database", err)
 }
 
-func TestLoadNamespacesMultipartyWithAuth(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-
-	viper.SetConfigType("yaml")
-	err := viper.ReadConfig(strings.NewReader(`
-  namespaces:
-    default: ns1
-    predefined:
-    - name: ns1
-      plugins: [ethereum, postgres, ipfs, ffdx, basicauth]
-      multiparty:
-        enabled: true
-  `))
-	assert.NoError(t, err)
-
-	err = nm.loadNamespaces(context.Background())
-	assert.NoError(t, err)
-}
-
-func TestLoadNamespacesNonMultipartyWithAuth(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-
-	viper.SetConfigType("yaml")
-	err := viper.ReadConfig(strings.NewReader(`
-  namespaces:
-    default: ns1
-    predefined:
-    - name: ns1
-      plugins: [ethereum, postgres, basicauth]
-      multiparty:
-        enabled: false
-  `))
-	assert.NoError(t, err)
-
-	err = nm.loadNamespaces(context.Background())
-	assert.NoError(t, err)
-}
-
 func TestLoadNamespacesMultipartyContract(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
@@ -1227,6 +1116,9 @@ func TestStart(t *testing.T) {
 	nm.namespaces = map[string]*namespace{
 		"ns": {orchestrator: mo},
 	}
+	nm.plugins.blockchain = nil
+	nm.plugins.dataexchange = nil
+	nm.plugins.tokens = nil
 	nm.metricsEnabled = true
 
 	mo.On("Start").Return(nil)
@@ -1241,16 +1133,14 @@ func TestStartBlockchainFail(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
 
+	mo := &orchestratormocks.Orchestrator{}
 	nm.namespaces = map[string]*namespace{
 		"ns": {
-			plugins: orchestrator.Plugins{
-				Blockchain: orchestrator.BlockchainPlugin{
-					Plugin: nm.mbi,
-				},
-			},
+			orchestrator: mo,
 		},
 	}
 
+	mo.On("Start").Return(nil)
 	nm.mbi.On("Start").Return(fmt.Errorf("pop"))
 
 	err := nm.Start()
@@ -1262,16 +1152,15 @@ func TestStartDataExchangeFail(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
 
+	mo := &orchestratormocks.Orchestrator{}
 	nm.namespaces = map[string]*namespace{
 		"ns": {
-			plugins: orchestrator.Plugins{
-				DataExchange: orchestrator.DataExchangePlugin{
-					Plugin: nm.mdx,
-				},
-			},
+			orchestrator: mo,
 		},
 	}
+	nm.plugins.blockchain = nil
 
+	mo.On("Start").Return(nil)
 	nm.mdx.On("Start").Return(fmt.Errorf("pop"))
 
 	err := nm.Start()
@@ -1283,16 +1172,16 @@ func TestStartTokensFail(t *testing.T) {
 	nm := newTestNamespaceManager(true)
 	defer nm.cleanup(t)
 
+	mo := &orchestratormocks.Orchestrator{}
 	nm.namespaces = map[string]*namespace{
 		"ns": {
-			plugins: orchestrator.Plugins{
-				Tokens: []orchestrator.TokensPlugin{{
-					Plugin: nm.mti,
-				}},
-			},
+			orchestrator: mo,
 		},
 	}
+	nm.plugins.blockchain = nil
+	nm.plugins.dataexchange = nil
 
+	mo.On("Start").Return(nil)
 	nm.mti.On("Start").Return(fmt.Errorf("pop"))
 
 	err := nm.Start()
@@ -1473,18 +1362,3 @@ func TestResolveOperationByNamespacedIDNoOrchestrator(t *testing.T) {
 
 	mo.AssertExpectations(t)
 }
-
-func TestAuthorize(t *testing.T) {
-	nm := newTestNamespaceManager(true)
-	defer nm.cleanup(t)
-	or := &orchestratormocks.Orchestrator{}
-	or.On("Authorize", mock.Anything, mock.Anything).Return(nil)
-	nm.namespaces["ns1"] = &namespace{
-		orchestrator: or,
-	}
-	nm.utOrchestrator = or
-	err := nm.Authorize(context.Background(), &fftypes.AuthReq{
-		Namespace: "ns1",
-	})
-	assert.NoError(t, err)
-}
diff --git a/internal/orchestrator/orchestrator_test.go b/internal/orchestrator/orchestrator_test.go
index aa48d5e66..266369827 100644
--- a/internal/orchestrator/orchestrator_test.go
+++ b/internal/orchestrator/orchestrator_test.go
@@ -21,8 +21,6 @@ import (
 	"fmt"
 	"testing"
 
-	"github.com/hyperledger/firefly-common/mocks/authmocks"
-	"github.com/hyperledger/firefly-common/pkg/fftypes"
 	"github.com/hyperledger/firefly/internal/coreconfig"
 	"github.com/hyperledger/firefly/internal/identity"
 	"github.com/hyperledger/firefly/mocks/assetmocks"
@@ -430,18 +428,3 @@ func TestNetworkActionNonMultiparty(t *testing.T) {
 	err := or.SubmitNetworkAction(context.Background(), &core.NetworkAction{Type: core.NetworkActionTerminate})
 	assert.Regexp(t, "FF10414", err)
 }
-
-func TestAuthorize(t *testing.T) {
-	or := newTestOrchestrator()
-	auth := &authmocks.Plugin{}
-	auth.On("Authorize", mock.Anything, mock.Anything).Return(nil)
-	or.plugins.Auth.Plugin = auth
-	err := or.Authorize(context.Background(), &fftypes.AuthReq{})
-	assert.NoError(t, err)
-}
-
-func TestAuthorizeNoPlugin(t *testing.T) {
-	or := newTestOrchestrator()
-	err := or.Authorize(context.Background(), &fftypes.AuthReq{})
-	assert.NoError(t, err)
-}