summaryrefslogtreecommitdiff
path: root/internal/configuration/reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/configuration/reader.go')
-rw-r--r--internal/configuration/reader.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/internal/configuration/reader.go b/internal/configuration/reader.go
index 588d7fd54..12a3ff1e1 100644
--- a/internal/configuration/reader.go
+++ b/internal/configuration/reader.go
@@ -55,14 +55,10 @@ func Read(configPath string) (*schema.Configuration, []error) {
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
- viper.BindEnv("authelia.jwt_secret.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.duo_api.secret_key.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.session.secret.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.authentication_backend.ldap.password.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.notifier.smtp.password.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.session.redis.password.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.storage.mysql.password.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
- viper.BindEnv("authelia.storage.postgres.password.file") //nolint:errcheck // TODO: Legacy code, consider refactoring time permitting.
+ // Dynamically load the secret env names from the SecretNames map.
+ for _, secretName := range validator.SecretNames {
+ _ = viper.BindEnv(validator.SecretNameToEnvName(secretName))
+ }
viper.SetConfigFile(configPath)