2021-05-02 22:49:16 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
type Config struct {
|
2023-01-08 13:19:08 +00:00
|
|
|
// Core specific config
|
2023-12-12 10:23:50 +00:00
|
|
|
Storage StorageConfig `yaml:"storage"`
|
2024-01-10 22:39:27 +00:00
|
|
|
LogLevel string `yaml:"log_level" env:"AUTHENTIK_LOG_LEVEL, overwrite"`
|
|
|
|
ErrorReporting ErrorReportingConfig `yaml:"error_reporting" env:", prefix=AUTHENTIK_ERROR_REPORTING__"`
|
|
|
|
Redis RedisConfig `yaml:"redis" env:", prefix=AUTHENTIK_REDIS__"`
|
|
|
|
Outposts OutpostConfig `yaml:"outposts" env:", prefix=AUTHENTIK_OUTPOSTS__"`
|
2023-01-08 13:19:08 +00:00
|
|
|
|
2023-01-08 19:33:04 +00:00
|
|
|
// Config for core and embedded outpost
|
2024-01-10 22:39:27 +00:00
|
|
|
SecretKey string `yaml:"secret_key" env:"AUTHENTIK_SECRET_KEY, overwrite"`
|
2023-01-08 19:33:04 +00:00
|
|
|
|
2023-01-08 13:19:08 +00:00
|
|
|
// Config for both core and outposts
|
2024-01-10 22:39:27 +00:00
|
|
|
Debug bool `yaml:"debug" env:"AUTHENTIK_DEBUG, overwrite"`
|
|
|
|
Listen ListenConfig `yaml:"listen" env:", prefix=AUTHENTIK_LISTEN__"`
|
2023-01-08 13:19:08 +00:00
|
|
|
|
|
|
|
// 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
|
2023-02-19 16:35:25 +00:00
|
|
|
AuthentikHost string `env:"AUTHENTIK_HOST"`
|
|
|
|
AuthentikHostBrowser string `env:"AUTHENTIK_HOST_BROWSER"`
|
|
|
|
AuthentikToken string `env:"AUTHENTIK_TOKEN"`
|
|
|
|
AuthentikInsecure bool `env:"AUTHENTIK_INSECURE"`
|
2021-08-07 20:12:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type RedisConfig struct {
|
2024-01-10 22:39:27 +00:00
|
|
|
Host string `yaml:"host" env:"HOST, overwrite"`
|
|
|
|
Port int `yaml:"port" env:"PORT, overwrite"`
|
|
|
|
DB int `yaml:"db" env:"DB, overwrite"`
|
|
|
|
Username string `yaml:"username" env:"USERNAME, overwrite"`
|
|
|
|
Password string `yaml:"password" env:"PASSWORD, overwrite"`
|
|
|
|
TLS bool `yaml:"tls" env:"TLS, overwrite"`
|
|
|
|
TLSReqs string `yaml:"tls_reqs" env:"TLS_REQS, overwrite"`
|
2021-05-02 22:49:16 +00:00
|
|
|
}
|
|
|
|
|
2022-08-03 19:33:27 +00:00
|
|
|
type ListenConfig struct {
|
2024-01-10 22:39:27 +00:00
|
|
|
HTTP string `yaml:"listen_http" env:"HTTP, overwrite"`
|
|
|
|
HTTPS string `yaml:"listen_https" env:"HTTPS, overwrite"`
|
|
|
|
LDAP string `yaml:"listen_ldap" env:"LDAP, overwrite"`
|
|
|
|
LDAPS string `yaml:"listen_ldaps" env:"LDAPS, overwrite"`
|
|
|
|
Radius string `yaml:"listen_radius" env:"RADIUS, overwrite"`
|
|
|
|
Metrics string `yaml:"listen_metrics" env:"METRICS, overwrite"`
|
|
|
|
Debug string `yaml:"listen_debug" env:"DEBUG, overwrite"`
|
|
|
|
TrustedProxyCIDRs []string `yaml:"trusted_proxy_cidrs" env:"TRUSTED_PROXY_CIDRS, overwrite"`
|
2021-05-02 22:49:16 +00:00
|
|
|
}
|
|
|
|
|
2023-12-12 10:23:50 +00:00
|
|
|
type StorageConfig struct {
|
|
|
|
Media StorageMediaConfig `yaml:"media"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StorageMediaConfig struct {
|
|
|
|
Backend string `yaml:"backend" env:"AUTHENTIK_STORAGE_MEDIA_BACKEND"`
|
|
|
|
File StorageFileConfig `yaml:"file"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type StorageFileConfig struct {
|
|
|
|
Path string `yaml:"path" env:"AUTHENTIK_STORAGE_MEDIA_FILE_PATH"`
|
2021-05-02 22:49:16 +00:00
|
|
|
}
|
2021-05-04 12:28:48 +00:00
|
|
|
|
|
|
|
type ErrorReportingConfig struct {
|
2024-01-10 22:39:27 +00:00
|
|
|
Enabled bool `yaml:"enabled" env:"ENABLED, overwrite"`
|
|
|
|
SentryDSN string `yaml:"sentry_dsn" env:"SENTRY_DSN, overwrite"`
|
|
|
|
Environment string `yaml:"environment" env:"ENVIRONMENT, overwrite"`
|
|
|
|
SendPII bool `yaml:"send_pii" env:"SEND_PII, overwrite"`
|
|
|
|
SampleRate float64 `yaml:"sample_rate" env:"SAMPLE_RATE, overwrite"`
|
2021-05-04 12:28:48 +00:00
|
|
|
}
|
2022-08-05 22:24:49 +00:00
|
|
|
|
|
|
|
type OutpostConfig struct {
|
2024-01-10 22:39:27 +00:00
|
|
|
ContainerImageBase string `yaml:"container_image_base" env:"CONTAINER_IMAGE_BASE, overwrite"`
|
|
|
|
Discover bool `yaml:"discover" env:"DISCOVER, overwrite"`
|
|
|
|
DisableEmbeddedOutpost bool `yaml:"disable_embedded_outpost" env:"DISABLE_EMBEDDED_OUTPOST, overwrite"`
|
2022-08-05 22:24:49 +00:00
|
|
|
}
|