st2-auth-backend-ldap icon indicating copy to clipboard operation
st2-auth-backend-ldap copied to clipboard

Bug: LDAP - Referrals being chased even though data is returned

Open jmwaldrip opened this issue 6 years ago • 2 comments

I am not sure if this is a bug or intended.

When attempting to use this module to Auth with our Active Directory, the first _ldap_search returns the payload with the data required to auth. But, for some reason it decides not to check that data and continues to chase referrals. This causes the results to always be null.

Setting "chase_referrals" to false seems to fix the issue and allow it to authenticate.

jmwaldrip avatar Aug 27 '18 19:08 jmwaldrip

Same as #14 maybe?

LindsayHill avatar Aug 27 '18 19:08 LindsayHill

I was thinking the same thing. But I had some different behavior.

LDAP Error: (authenticate) LDAP Error: {'info': u'000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1', 'desc': u'Operations error'} : Type <class 'ldap.OPERATIONS_ERROR'>

It was differentiating in my mind because the service does not hang for me. It loops through about 4 different URI's then throws that error and fails auth.

I also put in additional logging around _get_ldap_search_results and noticed that after the first query r_data had the results it needed but continued to chase referrals.

jmwaldrip avatar Aug 27 '18 19:08 jmwaldrip