internal: fix race condition with config loading on startup, add index on debug server

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2023-01-08 20:33:04 +01:00
parent 7eb6320d74
commit a9680d6088
8 changed files with 38 additions and 24 deletions

View File

@ -2,13 +2,15 @@ package config
type Config struct {
// Core specific config
SecretKey string `yaml:"secret_key" env:"AUTHENTIK_SECRET_KEY"`
Paths PathsConfig `yaml:"paths"`
LogLevel string `yaml:"log_level" env:"AUTHENTIK_LOG_LEVEL"`
ErrorReporting ErrorReportingConfig `yaml:"error_reporting"`
Redis RedisConfig `yaml:"redis"`
Outposts OutpostConfig `yaml:"outposts"`
// Config for core and embedded outpost
SecretKey string `yaml:"secret_key" env:"AUTHENTIK_SECRET_KEY"`
// Config for both core and outposts
Debug bool `yaml:"debug" env:"AUTHENTIK_DEBUG"`
Listen ListenConfig `yaml:"listen"`
@ -16,8 +18,9 @@ type Config struct {
// Outpost specific config
// These are only relevant for proxy/ldap outposts, and cannot be set via YAML
// They are loaded via this config loader to support file:// schemas
AuthentikHost string `env:"AUTHENTIK_HOST"`
AuthentikToken string `env:"AUTHENTIK_TOKEN"`
AuthentikHost string `env:"AUTHENTIK_HOST"`
AuthentikToken string `env:"AUTHENTIK_TOKEN"`
AuthentikInsecure bool `env:"AUTHENTIK_INSECURE"`
}
type RedisConfig struct {