Zanzana: Fix namespace in remote client (#113433)

This commit is contained in:
Alexander Zobnin
2025-11-05 11:12:41 +01:00
committed by GitHub
parent 571e5c2e3c
commit 505e025d18
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ func ProvideStandaloneZanzanaClient(cfg *setting.Cfg, features featuremgmt.Featu
ServerCertFile: cfg.ZanzanaClient.ServerCertFile,
}
return NewRemoteZanzanaClient(fmt.Sprintf("stacks-%s", cfg.StackID), zanzanaConfig)
return NewRemoteZanzanaClient(cfg.ZanzanaClient.TokenNamespace, zanzanaConfig)
}
type ZanzanaClientConfig struct {
+6
View File
@@ -27,6 +27,8 @@ type ZanzanaClientSettings struct {
// URL called to perform exchange request.
// Only used when mode is set to client.
TokenExchangeURL string
// Namespace to use for the token.
TokenNamespace string
}
type ZanzanaServerSettings struct {
@@ -113,6 +115,10 @@ func (cfg *Cfg) readZanzanaSettings() {
zc.Addr = clientSec.Key("address").MustString("")
zc.ServerCertFile = clientSec.Key("tls_cert").MustString("")
// TODO: read Token and TokenExchangeURL from grpc_client_authentication section
grpcClientAuthSection := cfg.SectionWithEnvOverrides("grpc_client_authentication")
zc.TokenNamespace = grpcClientAuthSection.Key("token_namespace").MustString("stacks-" + cfg.StackID)
cfg.ZanzanaClient = zc
zs := ZanzanaServerSettings{}