Prometheus: Promote Azure auth flag to configuration (#53447)

This commit is contained in:
Andres Martinez Gotor
2022-08-11 16:12:57 +02:00
committed by GitHub
parent 806fb8ab7a
commit a31d96d20a
16 changed files with 50 additions and 32 deletions
+6
View File
@@ -115,6 +115,7 @@ var (
// HTTP auth
SigV4AuthEnabled bool
AzureAuthEnabled bool
AnonymousEnabled bool
@@ -287,6 +288,7 @@ type Cfg struct {
TokenRotationIntervalMinutes int
SigV4AuthEnabled bool
SigV4VerboseLogging bool
AzureAuthEnabled bool
BasicAuthEnabled bool
AdminUser string
AdminPassword string
@@ -1291,6 +1293,10 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
cfg.SigV4AuthEnabled = SigV4AuthEnabled
cfg.SigV4VerboseLogging = auth.Key("sigv4_verbose_logging").MustBool(false)
// Azure Auth
AzureAuthEnabled = auth.Key("azure_auth_enabled").MustBool(false)
cfg.AzureAuthEnabled = AzureAuthEnabled
// anonymous access
AnonymousEnabled = iniFile.Section("auth.anonymous").Key("enabled").MustBool(false)
cfg.AnonymousEnabled = AnonymousEnabled