Skip to content

Commit

Permalink
enhance: report auth log to hook when grpc authenticate failed (milvu…
Browse files Browse the repository at this point in the history
…s-io#38943)

Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd authored Jan 14, 2025
1 parent 097d167 commit da07993
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/distributed/proxy/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit da07993

Please sign in to comment.