K8s: Set X-Remote- headers for SignedInUser (#82543)

This commit is contained in:
Todd Treece
2024-02-15 12:29:36 -05:00
committed by GitHub
parent 644d721cf0
commit f593161ef6
5 changed files with 148 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ import (
"github.com/grafana/grafana/pkg/modules"
"github.com/grafana/grafana/pkg/registry"
"github.com/grafana/grafana/pkg/services/apiserver/aggregator"
"github.com/grafana/grafana/pkg/services/apiserver/auth/authenticator"
"github.com/grafana/grafana/pkg/services/apiserver/auth/authorizer"
"github.com/grafana/grafana/pkg/services/apiserver/builder"
grafanaresponsewriter "github.com/grafana/grafana/pkg/services/apiserver/endpoints/responsewriter"
@@ -220,6 +221,7 @@ func (s *service) start(ctx context.Context) error {
return err
}
serverConfig.Authorization.Authorizer = s.authorizer
serverConfig.Authentication.Authenticator = authenticator.NewAuthenticator(serverConfig.Authentication.Authenticator)
serverConfig.TracerProvider = s.tracing.GetTracerProvider()
// setup loopback transport for the aggregator server