go-ldap / ldap

Basic LDAP v3 functionality for the GO programming language.
Other
2.19k stars 352 forks source link

[req] Implement ExtendedRequest request as a prereq to enable fast bind for AD #514

Open filimonic opened 2 months ago

filimonic commented 2 months ago

Implement ExtendedRequest : rfc2251#section-4.12

Which adds ability to call something like ldap.Conn#ExtendedRequest(LDAP_SERVER_FAST_BIND_OID, nil) Which switches LDAP connection to LDAP_OPT_FAST_CONCURRENT_BIND mode Which reduces AD DS server load because

Unlike a normal LDAP bind, a concurrent bind does not determine a user group association or build a security token; it only determines if the user has a valid ID and password. This enables the concurrent bind to complete in a fraction of the time of a normal bind.

Ref: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ldap/using-ldap-for-password-authentication Ref: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/962a5f25-f541-48a6-b73c-da01f1b7fc69