1
0
Fork 0
forked from External/ergo

Add LDAP support

This commit is contained in:
Matt Ouille 2020-02-09 00:17:10 -08:00 committed by Shivaram Lingamneni
parent 634470ba30
commit d4afb027e5
2 changed files with 98 additions and 1 deletions

View file

@ -68,6 +68,7 @@ type AccountConfig struct {
Exempted []string
exemptedNets []net.IPNet
} `yaml:"require-sasl"`
LDAP LDAPConfig
LoginThrottling struct {
Enabled bool
Duration time.Duration
@ -82,6 +83,28 @@ type AccountConfig struct {
VHosts VHostConfig
}
type LDAPConfig struct {
Timeout int
Enabled bool
AllowSignup bool `yaml:"allow-signup"`
BindDN string `yaml:"bind-dn"`
BindPwd string `yaml:"bind-password"`
SearchFilter string `yaml:"search-filter"`
SearchBaseDNs []string `yaml:"search-base-dns"`
Attributes map[string]string
Servers LDAPServerConfig
}
type LDAPServerConfig struct {
Host string
Port int
UseSSL bool `yaml:"use-ssl"`
StartTLS bool `yaml:"start-tls"`
SkipTLSVerify bool `yaml:"skip-tls-verify"`
ClientCert string `yaml:"client-cert"`
ClientKey string `yaml:"client-key"`
}
// AccountRegistrationConfig controls account registration.
type AccountRegistrationConfig struct {
Enabled bool