cloudera/hue — pull request #18 by ottomata (2012-12-19 17:43:49+00:00)
Title: Attempting to get ldap syncing to work properly.

Hi guys!

We're trying to get Hue working with our LDAP setup at the Wikimedia Foundation. I've can authenticate just fine, but I'm having trouble getting groups synced over properly. After examining the LDAP and hue logs and making modifications, I was finally able to get this to work by making this change.

I'm both and LDAP and Hue noob, so perhaps what I'm doing is completely wrong here. But, as far as I can tell, setting 'distinguishedName=' in the search filter is not a valid way of searching by filter for an attribute. distinguishedName is not a valid attribute. Instead, I set the search_dn (previously base_dn in this code) to the provided sanitized username. This works on ldapsearch CLI, and also in my Hue installation for syncing groups.