Page MenuHomePhabricator

Added the ability to configure the email attribute for LDAP
AbandonedPublic

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

Details

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

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

Repository
rPHU libphutil
Branch
ldapemail
Lint
Lint OK
Unit
Unit Tests OK
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.
kugel- added a subscriber: kugel-.Jan 16 2017, 1:48 PM

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?

robloxianmany abandoned this revision.Jan 18 2017, 8:23 PM

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.