Open Bug 284279 Opened 20 years ago Updated 15 years ago

[LDAP] Allow logins with both email and LDAP username

Categories

(Bugzilla :: User Accounts, enhancement)

enhancement
Not set
normal

Tracking

()

People

(Reporter: aleksey, Unassigned)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 I recently migrated bugzilla installation from DB authentication to LDAP authentication. One and the only one problem for the half of the users was the fact that now login name is not an email but just uid without "@xxxxxxxx.xxx" stuff at the end. I thought about making both LDAPuidattribute and LDAPmailattribute parameters to point to the same mail LDAP attribute. But at that time another half of the users already get used to a shorter uid login and did not want to go back :) Thus I ended up creating a tiny patch to bugzilla's LDAP auth module that modifies LDAP search to match the login username in both LDAPuidattribute and LDAPmailattribute (see attached patch). This should not impact performance much and it seems pretty safe to me. If you would like this change, feel free to use it :) Reproducible: Always Steps to Reproduce:
*** Bug 284280 has been marked as a duplicate of this bug. ***
Attached patch patchSplinter Review
search login name in both uid and email ldap attributes
Comment on attachment 175939 [details] [diff] [review] patch Thank you for the patch, Aleksey. Assuming that you want your patch reviewed, I asked for review for you :)
Attachment #175939 - Flags: review?
I'm really no LDAP guy, but I think that maybe this is a duplicate of bug 51188, or it may be related.
Summary: LDAP authentication for both uid and email → LDAP authentication for both uid and email
Partially "yes". Bug #51188 talks about using uid instead of email in *everywhere* while this bug and patch addresses only authentication part which is the most common for regular users.
Note that LDAP.pm is now in Bugzilla/Auth/Verify/LDAP.pm starting from 2.20 instead of Bugzilla/Auth/LDAP.pm (2.18).
As asked by LpSolit: By inspection, this patch seems to do what's intended: try to match the username with the LDAPuidattribute param or the LDAPmailattribute param. if both params are mandatory, that should be ok.
Assignee: user-accounts → aleksey
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #175939 - Flags: review? → review?(justdave)
Comment on attachment 175939 [details] [diff] [review] patch This patch must be updated due to the rewrite of the Auth stuff, see bug 300410.
Attachment #175939 - Flags: review?(justdave) → review-
Severity: normal → enhancement
OS: Windows XP → All
Hardware: PC → All
Summary: LDAP authentication for both uid and email → [LDAP] Allow logins with both email and LDAP username
Assignee: aleksey → user-accounts
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: