From c76d1e04e85237ce6aed8a32e1614bdb69374c05 Mon Sep 17 00:00:00 2001 From: Gabriel MABILLE Date: Thu, 1 Aug 2024 15:30:13 +0200 Subject: [PATCH] Authz: Fix on-prem grpc authentication (#91341) * Authz: Fix on-prem grpc authentication Co-authored-by: Claudiu Dragalina-Paraipan * Remove noAuth override --------- Co-authored-by: Claudiu Dragalina-Paraipan --- pkg/services/authz/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/services/authz/client.go b/pkg/services/authz/client.go index d1c59cc6b61..dc6ef3aa514 100644 --- a/pkg/services/authz/client.go +++ b/pkg/services/authz/client.go @@ -104,6 +104,7 @@ func newInProcLegacyClient(server *legacyServer) (authzlib.MultiTenantClient, er return authzlib.NewLegacyClient( &authzlib.MultiTenantClientConfig{}, authzlib.WithGrpcConnectionLCOption(channel), + authzlib.WithNamespaceFormatterLCOption(authnlib.OnPremNamespaceFormatter), authzlib.WithDisableAccessTokenLCOption(), ) } @@ -126,6 +127,7 @@ func newGrpcLegacyClient(address string) (authzlib.MultiTenantClient, error) { grpc.WithUnaryInterceptor(clientInterceptor.UnaryClientInterceptor), grpc.WithStreamInterceptor(clientInterceptor.StreamClientInterceptor), ), + authzlib.WithNamespaceFormatterLCOption(authnlib.OnPremNamespaceFormatter), // TODO(drclau): remove this once we have access token support on-prem authzlib.WithDisableAccessTokenLCOption(), )