fix: LDAP leere BindPassword schlägt Login fehl + install.sh Passwort-Extraktion
- auth.Manager.Login: LDAP-Fallback überspringen wenn URL oder BindPassword leer (verhindert go-ldap ErrorEmptyPassword Code 206 bei fehlerhaftem LDAP-Config-Eintrag) - install.sh: grep-Muster von variablenbreitem Lookbehind auf \K umgestellt (PCRE unterstützt keine variablen Lookbehinds — Passwörter wurden nie korrekt extrahiert) - install.sh: Wartezeit auf Backend-Start erhöht (bis zu 15s statt 2s) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ func (m *Manager) Login(username, password string) (token string, user *userstor
|
||||
tenantID, lookupErr := m.tenantLookup.GetTenantIDByDomain(ctx, domain)
|
||||
if lookupErr == nil && tenantID != nil {
|
||||
tcfg, tErr := m.tenantLdapStore.GetWithPassword(ctx, *tenantID)
|
||||
if tErr == nil && tcfg != nil && tcfg.Enabled {
|
||||
if tErr == nil && tcfg != nil && tcfg.Enabled && tcfg.URL != "" && tcfg.BindPassword != "" {
|
||||
attrs, authErr := ldapauth.Authenticate(ldapauth.Config{
|
||||
URL: tcfg.URL,
|
||||
BindDN: tcfg.BindDN,
|
||||
@@ -137,7 +137,7 @@ func (m *Manager) Login(username, password string) (token string, user *userstor
|
||||
// 3. Global LDAP fallback — only reached if no matching tenant LDAP config found.
|
||||
if m.ldapStore != nil {
|
||||
cfg, ldapErr := m.ldapStore.GetWithPassword(context.Background())
|
||||
if ldapErr == nil && cfg != nil && cfg.Enabled {
|
||||
if ldapErr == nil && cfg != nil && cfg.Enabled && cfg.URL != "" && cfg.BindPassword != "" {
|
||||
attrs, authErr := ldapauth.Authenticate(ldapauth.Config{
|
||||
URL: cfg.URL,
|
||||
BindDN: cfg.BindDN,
|
||||
|
||||
Reference in New Issue
Block a user