fix(configuration): incorrect key validation names (#3033)

This fixes an issue with key validation slice that has missing or extra keys that are not needed.
pull/3034/head^2
James Elliott 2022-03-17 23:20:49 +11:00 committed by GitHub
parent 17eef2c679
commit 05b8caa711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -38,7 +38,7 @@ type PasswordConfiguration struct {
Iterations int `koanf:"iterations"` Iterations int `koanf:"iterations"`
KeyLength int `koanf:"key_length"` KeyLength int `koanf:"key_length"`
SaltLength int `koanf:"salt_length"` SaltLength int `koanf:"salt_length"`
Algorithm string `koaanf:"algorithm"` Algorithm string `koanf:"algorithm"`
Memory int `koanf:"memory"` Memory int `koanf:"memory"`
Parallelism int `koanf:"parallelism"` Parallelism int `koanf:"parallelism"`
} }

View File

@ -319,6 +319,8 @@ var ValidKeys = []string{
// Access Control Keys. // Access Control Keys.
"access_control.default_policy", "access_control.default_policy",
"access_control.networks", "access_control.networks",
"access_control.networks[].name",
"access_control.networks[].networks",
"access_control.rules", "access_control.rules",
"access_control.rules[].domain", "access_control.rules[].domain",
"access_control.rules[].methods", "access_control.rules[].methods",
@ -351,14 +353,12 @@ var ValidKeys = []string{
"session.redis.high_availability.sentinel_username", "session.redis.high_availability.sentinel_username",
"session.redis.high_availability.sentinel_password", "session.redis.high_availability.sentinel_password",
"session.redis.high_availability.nodes", "session.redis.high_availability.nodes",
"session.redis.high_availability.nodes[].host",
"session.redis.high_availability.nodes[].port",
"session.redis.high_availability.route_by_latency", "session.redis.high_availability.route_by_latency",
"session.redis.high_availability.route_randomly", "session.redis.high_availability.route_randomly",
"session.redis.timeouts.dial",
"session.redis.timeouts.idle",
"session.redis.timeouts.pool",
"session.redis.timeouts.read",
"session.redis.timeouts.write",
// Storage Keys.
"storage.encryption_key", "storage.encryption_key",
// Local Storage Keys. // Local Storage Keys.
@ -459,12 +459,16 @@ var ValidKeys = []string{
"identity_providers.oidc.clients", "identity_providers.oidc.clients",
"identity_providers.oidc.clients[].id", "identity_providers.oidc.clients[].id",
"identity_providers.oidc.clients[].description", "identity_providers.oidc.clients[].description",
"identity_providers.oidc.clients[].public",
"identity_providers.oidc.clients[].secret", "identity_providers.oidc.clients[].secret",
"identity_providers.oidc.clients[].redirect_uris", "identity_providers.oidc.clients[].redirect_uris",
"identity_providers.oidc.clients[].authorization_policy", "identity_providers.oidc.clients[].authorization_policy",
"identity_providers.oidc.clients[].scopes", "identity_providers.oidc.clients[].scopes",
"identity_providers.oidc.clients[].audience",
"identity_providers.oidc.clients[].grant_types", "identity_providers.oidc.clients[].grant_types",
"identity_providers.oidc.clients[].response_types", "identity_providers.oidc.clients[].response_types",
"identity_providers.oidc.clients[].response_modes",
"identity_providers.oidc.clients[].userinfo_signing_algorithm",
// NTP keys. // NTP keys.
"ntp.address", "ntp.address",