Page MenuHomePhabricator

Added the ability to configure the email attribute for LDAP

Authored by robloxianmany on Oct 7 2015, 6:59 PM.


Group Reviewers
Blessed Reviewers
Required Signatures
L28 Phacility Individual Contributor License Agreement

Added support for configuring the LDAP attribute used to search for a user's email to something other than mail.

Not all LDAP servers use mail as the email attribute, some use userPrincipalName as their email attribute.

Test Plan

Set the email attribute via the setEmailAttribute function.

Calling into LDAP to fetch data should result in the email being selected based on the provided value, falling back to mail if there is no attribute of the given name. You should be able to register and import users who do not have a mail attribute but do have an attribute of the given name.

Tested locally against my own LDAP server.

Diff Detail

rPHU libphutil
Lint Passed
Tests Passed
Build Status
Buildable 8205
Build 9382: arc lint + arc unit

Event Timeline

robloxianmany retitled this revision from to Added the ability to configure the email attribute for LDAP.
robloxianmany updated this object.
robloxianmany edited the test plan for this revision. (Show Details)
robloxianmany set the repository for this revision to rPHU libphutil.

I tested this. Perhaps I'm missing something, but with this patch, when a new user registers using ldap, the email address field is NOT populated. I thought this was the purpose of this change?

That was the original purpose of this change. It's been sitting for such a long duration, though, that I suspect it's no longer valid.

Marking as abandoned for those reasons, plus I no longer have the time to fix it.