Update pkg/services/authz/config.go

This commit is contained in:
Gabriel MABILLE 2024-10-07 16:31:09 +02:00 committed by GitHub
parent 4fba5c9b32
commit 68af25fbc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,7 +44,7 @@ func ReadCfg(cfg *setting.Cfg) (*Cfg, error) {
token := grpcClientAuthSection.Key("token").MustString("") token := grpcClientAuthSection.Key("token").MustString("")
tokenExchangeURL := grpcClientAuthSection.Key("token_exchange_url").MustString("") tokenExchangeURL := grpcClientAuthSection.Key("token_exchange_url").MustString("")
tokenNamespace := grpcClientAuthSection.Key("token_namespace").MustString("stack-" + cfg.StackID) tokenNamespace := grpcClientAuthSection.Key("token_namespace").MustString("stacks-" + cfg.StackID)
// When running in cloud mode, the token and tokenExchangeURL are required. // When running in cloud mode, the token and tokenExchangeURL are required.
if cfg.StackID != "" && token == "" && tokenExchangeURL == "" { if cfg.StackID != "" && token == "" && tokenExchangeURL == "" {