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

Already on GitHub? Sign in to your account

This makes gitlabhq compatible with more LDAP servers (specifically OpenLDAP). #422

Merged
merged 1 commit into from Feb 19, 2012

Conversation

Projects
None yet
3 participants
Contributor

steveprentice commented Feb 17, 2012

This helps with compatibility with more LDAP providers as the implementation
doesn't depend on the exact names of the LDAP fields. The LDAP strategy
helps maps the attributes to the fields in the info object and we use the
info object to get the email and name.

This makes the LDAP auth compatible with most OpenLDAP servers as well.

@steveprentice steveprentice Use the omniauth-ldap info object instead of the raw ldap info in extra.
This helps with compatibility with more LDAP providers as the implementation
doesn't depend on the exact names of the LDAP fields. The LDAP strategy
helps maps the attributes to the fields in the info object and we use the
info object to get the email and name.

This makes the LDAP auth compatible with most OpenLDAP servers as well.
2bb2dee
Contributor

vsizov commented Feb 17, 2012

are you sure in your code. It tested?

Contributor

steveprentice commented Feb 17, 2012

Yes. Tested against an OpenLDAP server and an Active Directory server. Works on both. Previously, authenticating against our internal OpenLDAP server was failing because our ldap entries don't have the sAMAccountName attribute defined causing an exception at user.rb:71.

Getting these attributes is abstracted by the omniauth-ldap strategy to simplify supporting more LDAP servers. In omniauth/strategies/ldap.rb, look at how it maps the attributes to the info object with the @@config map and map_user().

https://github.com/intridea/omniauth-ldap/blob/master/lib/omniauth/strategies/ldap.rb

Owner

dzaporozhets commented Feb 19, 2012

@vsizov you did ldap - merge it if ok

@vsizov vsizov added a commit that referenced this pull request Feb 19, 2012

@vsizov vsizov Merge pull request #422 from steveprentice/master
This makes gitlabhq compatible with more LDAP servers (specifically OpenLDAP).
a44b85b

@vsizov vsizov merged commit a44b85b into gitlabhq:master Feb 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment