diff --git a/pkg/services/authn/grpcutils/config.go b/pkg/services/authn/grpcutils/config.go index 533815a403f..39325aed943 100644 --- a/pkg/services/authn/grpcutils/config.go +++ b/pkg/services/authn/grpcutils/config.go @@ -25,11 +25,11 @@ type GrpcServerConfig struct { AllowedAudiences []string } -func ReadGprcServerConfig(cfg *setting.Cfg) (*GrpcServerConfig, error) { +func ReadGprcServerConfig(cfg *setting.Cfg) *GrpcServerConfig { section := cfg.SectionWithEnvOverrides("grpc_server_authentication") return &GrpcServerConfig{ SigningKeysURL: section.Key("signing_keys_url").MustString(""), AllowedAudiences: section.Key("allowed_audiences").Strings(","), - }, nil + } } diff --git a/pkg/services/authz/client.go b/pkg/services/authz/client.go index 3e67d13c550..4b62f3bb19f 100644 --- a/pkg/services/authz/client.go +++ b/pkg/services/authz/client.go @@ -13,7 +13,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/grafana/grafana/pkg/apimachinery/identity" "github.com/grafana/grafana/pkg/infra/tracing" "github.com/grafana/grafana/pkg/services/accesscontrol" "github.com/grafana/grafana/pkg/services/featuremgmt" @@ -116,18 +115,8 @@ func newInProcLegacyClient(server *legacyServer) (authzlib.MultiTenantClient, er func newGrpcLegacyClient(authCfg *Cfg) (authzlib.MultiTenantClient, error) { // This client interceptor is a noop, as we don't send an access token - grpcClientConfig := authnlib.GrpcClientConfig{} - clientInterceptor, err := authnlib.NewGrpcClientInterceptor(&grpcClientConfig, - authnlib.WithDisableAccessTokenOption(), - authnlib.WithIDTokenExtractorOption(func(ctx context.Context) (string, error) { - r, err := identity.GetRequester(ctx) - if err != nil { - return "", err - } - token := r.GetIDToken() - return token, nil - }), - ) + clientConfig := authnlib.GrpcClientConfig{} + clientInterceptor, err := authnlib.NewGrpcClientInterceptor(&clientConfig, authnlib.WithDisableAccessTokenOption()) if err != nil { return nil, err }