@@ -26,6 +26,7 @@ import (
26
26
neosynclogger "github.com/nucleuscloud/neosync/backend/internal/logger"
27
27
"github.com/nucleuscloud/neosync/backend/internal/nucleusdb"
28
28
clientmanager "github.com/nucleuscloud/neosync/backend/internal/temporal/client-manager"
29
+ v1alpha1_apikeyservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/api-key-service"
29
30
v1alpha1_authservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/auth-service"
30
31
v1alpha1_connectionservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/connection-service"
31
32
v1alpha1_jobservice "github.com/nucleuscloud/neosync/backend/services/mgmt/v1alpha1/job-service"
@@ -77,6 +78,7 @@ func serve(ctx context.Context) error {
77
78
mgmtv1alpha1connect .ConnectionServiceName ,
78
79
mgmtv1alpha1connect .JobServiceName ,
79
80
mgmtv1alpha1connect .TransformersServiceName ,
81
+ mgmtv1alpha1connect .ApiKeyServiceName ,
80
82
}
81
83
82
84
checker := grpchealth .NewStaticChecker (services ... )
@@ -214,6 +216,7 @@ func serve(ctx context.Context) error {
214
216
api .Handle (
215
217
mgmtv1alpha1connect .NewAuthServiceHandler (
216
218
authService ,
219
+ // auth service uses non-standard interceptors as we don't want to include the auth interceptor in this service
217
220
connect .WithInterceptors (
218
221
otelconnect .NewInterceptor (),
219
222
logger_interceptor .NewInterceptor (logger ),
@@ -222,6 +225,16 @@ func serve(ctx context.Context) error {
222
225
),
223
226
)
224
227
228
+ apiKeyService := v1alpha1_apikeyservice .New (& v1alpha1_apikeyservice.Config {
229
+ IsAuthEnabled : isAuthEnabled ,
230
+ }, db , useraccountService )
231
+ api .Handle (
232
+ mgmtv1alpha1connect .NewApiKeyServiceHandler (
233
+ apiKeyService ,
234
+ stdInterceptorConnectOpt ,
235
+ ),
236
+ )
237
+
225
238
mux .Handle ("/" , api )
226
239
227
240
httpServer := http.Server {
0 commit comments