From e88e95dfe8b736c9d2af619caf843658c7c8cc96 Mon Sep 17 00:00:00 2001 From: aoiasd Date: Thu, 2 Jan 2025 15:20:55 +0800 Subject: [PATCH] report auth log to hook when grpc authenticate failed Signed-off-by: aoiasd --- internal/distributed/proxy/service.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/distributed/proxy/service.go b/internal/distributed/proxy/service.go index 928fc4b7de538..acf1a39a1de56 100644 --- a/internal/distributed/proxy/service.go +++ b/internal/distributed/proxy/service.go @@ -31,7 +31,6 @@ import ( "github.com/gin-gonic/gin" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" - grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth" "github.com/soheilhy/cmux" clientv3 "go.etcd.io/etcd/client/v3" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" @@ -242,7 +241,7 @@ func (s *Server) startExternalGrpc(errChan chan error) { if enableCustomInterceptor { unaryServerOption = grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( accesslog.UnaryAccessLogInterceptor, - grpc_auth.UnaryServerInterceptor(proxy.AuthenticationInterceptor), + proxy.GrpcAuthInterceptor(proxy.AuthenticationInterceptor), proxy.DatabaseInterceptor(), proxy.UnaryServerHookInterceptor(), proxy.UnaryServerInterceptor(proxy.PrivilegeInterceptor),