Authn: use authenticator for grpc (#99573)
* Remove usage of grpc-authenticator * Cleanup client construction code
This commit is contained in:
@@ -81,11 +81,7 @@ func ProvideUnifiedStorageGrpcService(
|
||||
|
||||
// FIXME: This is a temporary solution while we are migrating to the new authn interceptor
|
||||
// grpcutils.NewGrpcAuthenticator should be used instead.
|
||||
fallback := &grpc.Authenticator{Tracer: tracing}
|
||||
authn, err := grpcutils.NewGrpcAuthenticatorWithFallback(cfg, reg, tracing, fallback)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
authn := grpcutils.NewAuthenticatorWithFallback(cfg, reg, tracing, &grpc.Authenticator{Tracer: tracing})
|
||||
|
||||
s := &service{
|
||||
cfg: cfg,
|
||||
|
||||
@@ -512,7 +512,7 @@ func TestClientServer(t *testing.T) {
|
||||
t.Run("Create a client", func(t *testing.T) {
|
||||
conn, err := grpc.NewClient(svc.GetAddress(), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
require.NoError(t, err)
|
||||
client, err = resource.NewGRPCResourceClient(tracing.NewNoopTracerService(), conn)
|
||||
client, err = resource.NewRemoteResourceClient(tracing.NewNoopTracerService(), conn, authn.GrpcClientConfig{}, true)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user