Skip to content

Added support for authenticating the same username in different subdomains #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

commodo
Copy link

@commodo commodo commented Jan 7, 2014

[ Note that this is related to pull request : https://github.com/omniauth/pull/39 Specifically I would be interested in merging this commit https://github.com/commodo/omniauth-ldap/commit/2dfe16d0445d3115d05ba838c5976fe431a713a6 ; the initial fork started from https://github.com/intridea/omniauth-ldap but I am more interested in getting this into Gitlab ]

In case you have a company domain like DC=example,DC=com
And you have multiple subdomains (US, EMEA, AU, etc), and the (company) policy is to define the same username in all subdomains (example user1), then there is a problem when it comes to authenticating user1.

So, a quick fix is to add a user format like subdomain\username, for example

  • us\user1 would authenticate on DC=us,DC=example,DC=com
  • emea\user1 would authenticate on DC=emea,DC=example,DC=com
  • and so on

All you have to do, is to add your base DN as DC=example,DC=com and whenever a user tries to login, he can use the subdomain as a prefix.
This is only needed when the the same username is present in more subdomains.
Otherwise, this works as before.

@ghost ghost mentioned this pull request Jan 31, 2014
@commodo
Copy link
Author

commodo commented Jun 25, 2014

rebased from latest master

@commodo commodo closed this Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant