anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

Disabling "Referrals" in LDAP is breaking our Active Directory connection #143

Closed jakeparis closed 3 years ago

jakeparis commented 3 years ago

In the LDAP connection code in user_model, LDAP_OPT_REFERRALS are turned off. That prevented us from making successful connection to our Active Directory. When we commented that line out, our connection worked as expected.

I looked through the repo history, but I don't see the reason for disabling referrals. In any case, we thought we'd mention it.

craigdietrich commented 3 years ago

Hi @jakeparis!

In local_settings.php, there is a config item for that:

https://github.com/anvc/scalar/blob/master/system/application/config/local_settings.php#L101

Setting it to true means that the LDAP_OPT_REFERRALS field doesn't get set to 0. Would that do what you're looking for, or does there need to be an explicit call to make LDAP_OPT_REFERALS set to 1?

jakeparis commented 3 years ago

That config item looks like it turns off Referrals whenever Active Directory is on. We want to have AD on, but we want Referrals on as well. There doesn't seem to be a config solution for this, other than to modify the core code.

craigdietrich commented 3 years ago

Hi @jakeparis,

Are you familiar enough with Scalar's login class to run a pull request? Or should we look into this on our end?