feat(auth): authenticate users via ldap

This commit is contained in:
kolaente
2025-01-27 14:40:09 +01:00
committed by konrad
parent 522f1cb596
commit 38bb8de4f1
8 changed files with 219 additions and 6 deletions

View File

@@ -78,6 +78,16 @@ const (
AuthOpenIDEnabled Key = `auth.openid.enabled`
AuthOpenIDProviders Key = `auth.openid.providers`
AuthLdapEnabled Key = `auth.ldap.enabled`
AuthLdapHost Key = `auth.ldap.host`
AuthLdapPort Key = `auth.ldap.port`
AuthLdapBaseDN Key = `auth.ldap.basedn`
AuthLdapUseTLS Key = `auth.ldap.usetls`
AuthLdapVerifyTLS Key = `auth.ldap.verifytls`
AuthLdapBindDN Key = `auth.ldap.binddn`
// #nosec G101
AuthLdapBindPassword Key = `auth.ldap.bindpassword`
LegalImprintURL Key = `legal.imprinturl`
LegalPrivacyURL Key = `legal.privacyurl`
@@ -333,6 +343,12 @@ func InitDefaultConfig() {
AuthLocalEnabled.setDefault(true)
AuthOpenIDEnabled.setDefault(false)
AuthLdapEnabled.setDefault(false)
AuthLdapHost.setDefault("localhost")
AuthLdapPort.setDefault(389)
AuthLdapUseTLS.setDefault(true)
AuthLdapVerifyTLS.setDefault(true)
// Database
DatabaseType.setDefault("sqlite")
DatabaseHost.setDefault("localhost")