Chore: Allow env overrides for the extended_jwt config (#77132)

Chore: Allow env overrides for the extended_jwt config
This commit is contained in:
Gabriel MABILLE 2023-10-25 14:28:12 +02:00 committed by GitHub
parent 9bf7eb5fbc
commit 20fc0cbf35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1630,7 +1630,7 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
cfg.JWTAuthSkipOrgRoleSync = authJWT.Key("skip_org_role_sync").MustBool(false)
// Extended JWT auth
authExtendedJWT := iniFile.Section("auth.extended_jwt")
authExtendedJWT := cfg.SectionWithEnvOverrides("auth.extended_jwt")
cfg.ExtendedJWTAuthEnabled = authExtendedJWT.Key("enabled").MustBool(false)
cfg.ExtendedJWTExpectAudience = authExtendedJWT.Key("expect_audience").MustString("")
cfg.ExtendedJWTExpectIssuer = authExtendedJWT.Key("expect_issuer").MustString("")