Commit Graph

22 Commits

Author SHA1 Message Date
Drew Blessing 7d1fdcdc83 Modify `LDAP::Person` to return username value based on attributes
`Gitlab::LDAP::Person` did not respect the LDAP attributes username
configuration and would simply return the uid value. There are
cases where users would like to specify a different username field
to allow more friendly GitLab usernames. For example, it's common
in AD to have sAMAccountName be an employee ID like `A12345` while
the local part of the email address is more human-friendly.
2018-01-04 17:10:40 -06:00
Tiago Botelho 011c168bff Refactors SAML identity creation in gl_user. 2017-10-02 11:35:09 +01:00
Tiago Botelho cd85a558dc Creates compound query for LDAP email attributes. 2017-09-25 16:14:22 +01:00
Douwe Maan c1cf5f4101 Support simple string LDAP attribute specifications, and search for name rather than username attributes 2017-08-23 22:06:22 +02:00
Casper a5d2ce8e61 Use LDAP-attributes configured in gitlab.yml in lookup instead of just hard-coded attributes. 2017-07-26 16:48:13 +00:00
Drew Blessing c50b98da72 Centralize LDAP config/filter logic
Centralize all LDAP config logic in `GitLab::LDAP::Config`. Previously,
some logic was in the Devise initializer and it was not honoring the
`user_filter`. If a user outside the configured `user_filter` signed
in, an account would be created but they would then be denied access.
Now that logic is centralized, the filter is honored and users outside
the filter are never created.
2016-11-11 15:58:33 -06:00
Markus Koller 68364fe2f0
Log LDAP lookup errors and don't swallow unrelated exceptions
Signed-off-by: Roger Meier <r.meier@siemens.com>
2016-09-28 07:44:58 +02:00
Drew Blessing 08714d2bcd Move LDAP user attributes to a method 2016-09-15 22:46:22 -05:00
Drew Blessing bf8a48e179 Request only the LDAP attributes we need 2016-09-09 13:14:57 -05:00
Gabriel Mazetto c9aa19881c Enable Style/SpaceAroundEqualsInParameterDefault cop 2016-08-06 04:03:01 +02:00
Drew Blessing 67aa0b8c4c Optimize LDAP and add a search timeout 2016-01-11 08:17:32 -06:00
Dmitriy Zaporozhets cc39bca3fa Rubocop: Style/AlignHash enabled 2015-02-02 21:15:44 -08:00
Dmitriy Zaporozhets da21b9e7d0
Fix rake gitlab:ldap:check
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-21 18:26:40 +03:00
Jan-Willem van der Meer 01b791237c Refactor lib files for multiple LDAP groups 2014-10-13 17:24:05 +02:00
Jan-Willem van der Meer 0d5ae2802e Move and rename ldap / oauth specs 2014-08-29 17:30:42 +02:00
Boris HUISGEN bac7d17c7b Fix LDAP TLS authentication 2014-06-19 10:41:23 +02:00
Jacob Vosmaer 982d4d51e8 Backport Adapter#dn_matches_filter? from EE 2014-05-14 18:11:14 +02:00
Jacob Vosmaer f4bca105d1 Backport Adapter#ldap_search from EE 2014-05-14 18:10:43 +02:00
Ben Bytheway de794b6a77 Add scoping to ldap lookup when only dn given 2014-04-23 21:00:56 -06:00
Jacob Vosmaer af53aa9072 Add Gitlab::LDAP::Adapter.open
This new method is based on Net::LDAP.open, which reuses a single LDAP
connection.
2014-03-14 08:53:46 +01:00
Dmitriy Zaporozhets 0fdab6a747
Remove copyright
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-10 17:09:45 +02:00
Dmitriy Zaporozhets daa7f077db
Port LDAP code from EE
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-10 14:48:08 +02:00