Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #8916

Closed
Open
Created Mar 04, 2015 by Administrator@rootOwner

Append domain in auto-created users from LDAP login

Created by: godlike64

Hello,

I had previously set up Gitlab 7.7 (.1 I think) and I configured it to authenticate against my LDAP directory. A thing to note here is that I'm running a custom LDAP scheme (not any of the known, widely used ones), so I could accomodate more easily multiple domains. This same LDAP tree is authenticating several other services (mail-related, Jabber, etc).

So today I bumped into a particular issue: I have two users whose mail address is the same, except for the domain part (let's call them [email protected] and [email protected]). Whichever user logged in first, got the 'user' entry created in the users table, and its corresponding LDAP mapping in identities. However, when the other user wanted to login, he got an error similar to #8530 (closed).

So I updated to 7.8 to see if it was fixed, and indeed it is. Now the first user that logs in gets its username set as 'user1', and the second one, 'user2'. While this fixes the problem nicely, it might result in a bit of awkwardness for other people. Namely, when I search for a user to add to a project/group, I get his name (which is correctly gotten from the LDAP, but in many cases like this, might be the same name across several domains) and his username, both of which do not tell me much if I don't already know which is which.

So my suggestion is, instead of appending an incremental integer to the username, to append the domain name. I don't know If dots cannot be used here, but it could be something like

user-examplecom

or

user.example.com

Let me know if this is feasible/possible/desired/unwanted/risky

Cheers

Assignee
Assign to
Time tracking