Commit Graph

26 Commits

Author SHA1 Message Date
Marin Jankovski 314e4736e4 Strip apostrophe from email generated usernames. 2014-06-11 17:06:28 +02:00
Jacob Vosmaer be1120e968 Improve ad_disabled method name 2014-05-14 19:13:06 +02:00
Jacob Vosmaer a966f72224 Document the Active Directory magic numbers 2014-05-14 19:08:42 +02:00
Jacob Vosmaer 11dba4cee7 Fix syntax error in AD disabled user filter 2014-05-14 18:54:05 +02:00
Jacob Vosmaer a6e4153878 Check for the AD disabled flag in Access#allowed? 2014-05-14 18:32:40 +02:00
Jacob Vosmaer a754f0b220 Add LDAP::Person#ad_disabled?
Check the bit for disabled Active Directory users. The filter is based
on http://ctogonewild.com/2009/09/03/bitmask-searches-in-ldap/ .
2014-05-14 18:26:58 +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
Dmitriy Zaporozhets fdeacf0ad1 Merge pull request #6317 from jirutka/fix-ldap-dn-case
Fix searching by extern_uid for LDAP to be case-insensitive
2014-03-29 14:08:31 +02:00
Jacob Vosmaer 2e6b537018 Use omniauth nickname as the username for LDAP
Before there was a bug in omniauth-ldap which prevented samaccountname
showing up as a possible username for new LDAP users. Thanks to upstream
fixes, we no longer need to work around this bug.
2014-03-28 13:57:52 +01:00
Jacob Vosmaer 56df3dbff2 Add Gitlab::LDAP::Access.open
This new method wraps Gitlab::LDAP::Adapter.open to enable connection
reuse.
2014-03-14 08:55:50 +01: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
Jacob Vosmaer 5a616649b5 Allow passing an adapter to Gitlab::LDAP::Person 2014-03-14 08:52:57 +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
Jakub Jirutka 91e7692b66 Fix searching by extern_uid for LDAP to be case-insensitive 2014-02-18 19:38:22 +01:00
skv a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Sytse Sijbrandij 71e92681f2 We welcome everyone to contribute. 2013-12-01 11:53:00 +01:00
Elias Mårtenson bc8a875df1 When looking up a user by DN, use single scope
The blocked? method is used to check whether a user exists in LDAP. Prior to this change, if the LDAP server had more objects below the one pointed to by the DN, those objects would also be picked up by the search, causing the method to determine the user should be blocked.

One case where this can happen is when using Active Directory and a user have a mobile phone assigned. In this case, Exchange will add an entry called ExchangeActiveSyncDevices under the users entry. The user-visible behaviour is then that a user loses Gitlab access when he enables a mobile device.

This fix sets the search scope to BaseObject in order to ensure that only the user itself is returned.
2013-11-03 21:51:10 +08:00
Dmitriy Zaporozhets baa65e89b9 Check if LDAP user was removed or blocked when use git over ssh 2013-10-07 16:06:30 +03:00
Izaak Alpert 8a8123a3d4 Update for readability
fixed a test a broke in the configurable theme PR
Change-Id: Id894506941bc01ab0d259d48ca7ff9b80bb2c57e
2013-09-22 20:56:17 -04:00
Izaak Alpert 4fcc17e667 Allows username only updates to ldap properties
-when logging in if users are allowed to login with just usernames in ldap we will update uid of the user if their uid is out of date

Conflicts:
	spec/lib/auth_spec.rb

Change-Id: Ia171b3d5133da86edc18c0d08ecfaf6a174f2574
2013-09-22 20:25:47 -04:00
Dmitriy Zaporozhets 0df1cf7fcc Inherit Gitlab::LDAP::User from Gitlab::OAuth::User 2013-09-04 00:06:13 +03:00
Dmitriy Zaporozhets 71abf70458 Move ldap auth to LDAP::User. Removed unused code 2013-09-02 23:50:45 +03:00
Dmitriy Zaporozhets 6bf117c601 Mode User+LDAP functionality from Gitlab::Auth 2013-09-02 23:35:40 +03:00