fix(sts): keep "not found" in the LDAP auth failure so the console can log in root

Signed-off-by: Denis Babchuk <babchukdenis@icloud.com>
This commit is contained in:
Denis Babchuk
2026-11-02 00:15:06 +03:00
committed by Feng Ruohang
parent 6da8036eb3
commit a21f420de3
2 changed files with 15 additions and 1 deletions
+4 -1
View File
@@ -101,7 +101,10 @@ const (
)
var (
errLDAPAuthenticationFailed = errors.New("LDAP authentication failed")
// One message for unknown users and wrong passwords. The console tries
// the built-in login (root, access keys) only when the LDAP error says
// "not found", so the message keeps those words.
errLDAPAuthenticationFailed = errors.New("LDAP authentication failed: user not found or invalid password")
globalSTSLDAPLoginRateLimiter = newSTSLDAPLoginRateLimiter(time.Minute/time.Duration(stsLDAPLoginBurst), stsLDAPLoginBurst, stsLDAPLoginEntryTTL)
)