Bind to lookup user after user auth to lookup ldap groups (#11357)

master
Aditya Manthramurthy 4 years ago committed by GitHub
parent fd3f02637a
commit e79829b5b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmd/config/identity/ldap/config.go

@ -283,6 +283,11 @@ func (l *Config) Bind(username, password string) (string, []string, error) {
errRet := fmt.Errorf("LDAP auth failed for DN %s: %v", bindDN, err)
return "", nil, errRet
}
// Bind to the lookup user account again to perform group search.
if err = l.lookupBind(conn); err != nil {
return "", nil, err
}
} else {
// Verify login credentials by checking the username formats.
bindDN, err = l.usernameFormatsBind(conn, username, password)

Loading…
Cancel
Save