diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2021-03-22 20:04:09 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 20:04:09 +1100 |
| commit | a44f0cf959bfb2c20a3defe7c92f8018799ead86 (patch) | |
| tree | 14486e0df62df1a74ee55f34c0cb71832af5b268 /internal/configuration/reader.go | |
| parent | 7ccbaaffe39aa26dd60e7ae99998fd795b2d80cc (diff) | |
fix: redis sentinel secret missing (#1839)
* fix: redis sentinel secret missing
* refactor: use consts for authentication_backend.file.password errs
* fix: unit test for new default port
* test: cover additional misses
* test: fix windows/linux specific test error
* test: more windows specific tests
* test: remove superfluous url.IsAbs
* test: validator 100% coverage
Diffstat (limited to 'internal/configuration/reader.go')
| -rw-r--r-- | internal/configuration/reader.go | 12 |
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) |
