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"`
|
2022-08-05 22:24:49 +00:00
|
|
|
LogLevel string `yaml:"log_level" env:"AUTHENTIK_LOG_LEVEL"`
|
|
|
|
ErrorReporting ErrorReportingConfig `yaml:"error_reporting"`
|
|
|
|
Redis RedisConfig `yaml:"redis"`
|
2023-01-08 13:19:08 +00:00
|
|
|
Outposts OutpostConfig `yaml:"outposts"`
|
|
|
|
|
2023-01-08 19:33:04 +00:00
|
|
|
// Config for core and embedded outpost
|
|
|
|
SecretKey string `yaml:"secret_key" env:"AUTHENTIK_SECRET_KEY"`
|
|
|
|
|
2023-01-08 13:19:08 +00:00
|
|
|
// Config for both core and outposts
|
|
|
|
Debug bool `yaml:"debug" env:"AUTHENTIK_DEBUG"`
|
|
|
|
Listen ListenConfig `yaml:"listen"`
|
|
|
|
|
|
|
|
// 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 {
|
2023-12-18 21:07:59 +00:00
|
|
|
Host string `yaml:"host" env:"AUTHENTIK_REDIS__HOST"`
|
|
|
|
Port int `yaml:"port" env:"AUTHENTIK_REDIS__PORT"`
|
|
|
|
DB int `yaml:"db" env:"AUTHENTIK_REDIS__DB"`
|
|
|
|
Username string `yaml:"username" env:"AUTHENTIK_REDIS__USERNAME"`
|
|
|
|
Password string `yaml:"password" env:"AUTHENTIK_REDIS__PASSWORD"`
|
|
|
|
TLS bool `yaml:"tls" env:"AUTHENTIK_REDIS__TLS"`
|
|
|
|
TLSReqs string `yaml:"tls_reqs" env:"AUTHENTIK_REDIS__TLS_REQS"`
|
2021-05-02 22:49:16 +00:00
|
|
|
}
|
|
|
|
|
2022-08-03 19:33:27 +00:00
|
|
|
type ListenConfig struct {
|
2023-07-06 16:16:26 +00:00
|
|
|
HTTP string `yaml:"listen_http" env:"AUTHENTIK_LISTEN__HTTP"`
|
|
|
|
HTTPS string `yaml:"listen_https" env:"AUTHENTIK_LISTEN__HTTPS"`
|
|
|
|
LDAP string `yaml:"listen_ldap" env:"AUTHENTIK_LISTEN__LDAP"`
|
|
|
|
LDAPS string `yaml:"listen_ldaps" env:"AUTHENTIK_LISTEN__LDAPS"`
|
|
|
|
Radius string `yaml:"listen_radius" env:"AUTHENTIK_LISTEN__RADIUS"`
|
|
|
|
Metrics string `yaml:"listen_metrics" env:"AUTHENTIK_LISTEN__METRICS"`
|
|
|
|
Debug string `yaml:"listen_debug" env:"AUTHENTIK_LISTEN__DEBUG"`
|
|
|
|
TrustedProxyCIDRs []string `yaml:"trusted_proxy_cidrs" env:"AUTHENTIK_LISTEN__TRUSTED_PROXY_CIDRS"`
|
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 {
|
2022-11-15 15:05:29 +00:00
|
|
|
Enabled bool `yaml:"enabled" env:"AUTHENTIK_ERROR_REPORTING__ENABLED"`
|
|
|
|
SentryDSN string `yaml:"sentry_dsn" env:"AUTHENTIK_ERROR_REPORTING__SENTRY_DSN"`
|
|
|
|
Environment string `yaml:"environment" env:"AUTHENTIK_ERROR_REPORTING__ENVIRONMENT"`
|
|
|
|
SendPII bool `yaml:"send_pii" env:"AUTHENTIK_ERROR_REPORTING__SEND_PII"`
|
2021-12-20 18:42:26 +00:00
|
|
|
SampleRate float64 `yaml:"sample_rate" env:"AUTHENTIK_ERROR_REPORTING__SAMPLE_RATE"`
|
2021-05-04 12:28:48 +00:00
|
|
|
}
|
2022-08-05 22:24:49 +00:00
|
|
|
|
|
|
|
type OutpostConfig struct {
|
|
|
|
ContainerImageBase string `yaml:"container_image_base" env:"AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE"`
|
|
|
|
Discover bool `yaml:"discover" env:"AUTHENTIK_OUTPOSTS__DISCOVER"`
|
|
|
|
DisableEmbeddedOutpost bool `yaml:"disable_embedded_outpost" env:"AUTHENTIK_OUTPOSTS__DISABLE_EMBEDDED_OUTPOST"`
|
|
|
|
}
|