Adds an option to enable sAMAccountname logins when upndomain is set#146
Conversation
jimlambrt
left a comment
There was a problem hiding this comment.
Perhaps some unit tests?
|
A unit test is a great idea! I've attempted adding a test based on success-with-anon-bind-upn-domain by adding the |
|
I've added a few unit tests that sets Ideally I would have wanted to test the ldap filter by passing |
|
I did some digging and I agree that gldap needs some changes. I'm willing to accept this as is for now and then write a proper unit test in a future PR. |
jimlambrt
left a comment
There was a problem hiding this comment.
See comment: we need better unit tests in a future PR
Active Directory allows LDAP binds as
userprincipalname@upndomainas well assamaccountname@updomain.With the current LDAP filter
samaccountnamelogins fail when theupndomainconfiguration parameter is set, since the filter only only checks foruserprincipalname=username@updomain.This PR provides an
enable_samaccountname_loginoption that can be set in the LDAP Authentication method. This will cause the LDAP user search filter to match eitheruserprincipalnameorsamaccountnameattributes instead of just theuserprincipalnamewhen theupndomainconfiguration parameter is set.