Commit Graph
67 Commits
Author SHA1 Message Date
Marin Jankovski 7ab468317b Merge branch 'ldap_email_downcase' into 'master'
Fix LDAP email upper case bug
2014-05-22 06:59:13 +00:00
Jacob Vosmaer e52e5da88c Downcase the LDAP email address before comparing 2014-05-21 14:21:25 +02:00
Marin Jankovski 95ef8f9756 Merge remote-tracking branch 'ce/master'
Conflicts:
	VERSION
	doc/install/installation.md
	doc/integration/README.md
	doc/integration/external-issue-tracker.md
	lib/gitlab/markdown.rb
	spec/lib/gitlab/ldap/ldap_access_spec.rb
2014-05-21 13:10:37 +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
Marin Jankovski d9c0ecdca8 Add scope to dn filter. 2014-05-09 14:51:29 +02:00
Marin Jankovski 47c0b4b172 Add scoping to ldap lookup. 2014-05-08 15:30:16 +02:00
Ben Bytheway de794b6a77 Add scoping to ldap lookup when only dn given 2014-04-23 21:00:56 -06:00
Dmitriy Zaporozhets eff30fff08 Improve dn_matches_filter method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-15 17:27:59 +03:00
Dmitriy Zaporozhets 1fe677995c LDAP::Adapter#ldap_search method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-15 16:50:31 +03:00
Dmitriy Zaporozhets fae2e540b6 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into upstream-ce-6-8
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	CHANGELOG
	Gemfile.lock
	README.md
	VERSION
	app/assets/javascripts/application.js
	db/schema.rb
	doc/install/installation.md
	doc/update/4.2-to-5.0.md
	doc/update/5.0-to-5.1.md
	doc/update/5.1-to-5.2.md
	doc/update/5.2-to-5.3.md
	doc/update/5.4-to-6.0.md
	doc/update/6.0-to-6.1.md
	doc/update/6.0-to-6.7.md
	lib/gitlab/git_access.rb
2014-04-10 13:34:56 +03:00
Marin Jankovski 1187d3f28d Synchronize user email with ldap. 2014-04-04 13:08:28 +02: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 2bfa02bb3c Check for errors in Adapter#dn_matches_filter? 2014-03-28 14:29:04 +01: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 8722d6bdc4 Add an API reference for AD recursive LDAP lookup 2014-03-20 13:28:10 +01:00
Jacob Vosmaer ab37a0954a Add support for nested Active Directory groups 2014-03-20 09:41:15 +01:00
Jacob Vosmaer cc768fddeb Reuse LDAP adapter in Group instances 2014-03-20 09:39:25 +01:00
Jacob Vosmaer 823f89ed40 Pass LDAP adapter to finders in update_permissions 2014-03-14 11:21:50 +01:00
Jacob Vosmaer 2f1a59d391 Add Gitlab::LDAP::Access.open
This new method wraps Gitlab::LDAP::Adapter.open to enable connection
reuse.
2014-03-14 11:01:28 +01:00
Jacob Vosmaer d8ca6ed216 Add Gitlab::LDAP::Adapter.open
This new method is based on Net::LDAP.open, which reuses a single LDAP
connection.
2014-03-14 11:01:28 +01:00
Jacob Vosmaer f41d277d61 Allow passing an adapter to Gitlab::LDAP::Person 2014-03-14 11:01:27 +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
Jacob Vosmaer 0bfc45d518 Dump LDAP objects into the log for debugging 2014-02-12 15:51:30 +01:00
Dmitriy Zaporozhets 903726c846 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into upstream-ce
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	CHANGELOG
	Gemfile
	VERSION
	app/models/group.rb
	app/views/groups/edit.html.haml
	db/schema.rb
	doc/install/installation.md
	doc/update/5.4-to-6.0.md
2014-02-11 10:15:13 +02:00
skv a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets 1f43fa20d3 Merge branch '6-4-stable' of dev.gitlab.org:gitlab/gitlabhq into 6-4-from-ce
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	Gemfile
	Gemfile.lock
	VERSION
	app/controllers/application_controller.rb
	db/schema.rb
	doc/install/installation.md
	doc/update/6.2-to-6.3.md
2013-12-23 12:57:22 +02:00
Dmitriy Zaporozhets d3844662ec Respect existing group permissions during sync with LDAP group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-14 13:22:51 +02:00
Sytse Sijbrandij 71e92681f2 We welcome everyone to contribute. 2013-12-01 11:53:00 +01:00
Jacob Vosmaer 9b7174c333 Try sAMAccountName is omniauth nickname is nil 2013-11-06 09:42:25 +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 ccf9bfbfb9 Respect LDAP user filter for SSH and Git over HTTP
Remove LDAP::User#blocked? method because it duplciate
existing functionality of LDAP::Access#allowed? method

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-01 15:01:14 +02:00
Dmitriy Zaporozhets c9a2765515 Merge branch '6-2-stable' of dev.gitlab.org:gitlab/gitlabhq into upstream/6-2-stable
Conflicts:
	VERSION
	app/models/group.rb
	app/views/groups/edit.html.haml
	db/schema.rb
	doc/api/groups.md
	doc/api/projects.md
	doc/install/installation.md
	lib/api/projects.rb
	spec/requests/api/groups_spec.rb
	spec/requests/api/projects_spec.rb
2013-10-31 14:29:48 +02:00
Oleg Girko b215350edf Set username field of users created from LDAP to uid attribute.
The previous approach of making username from user part of
email address (part of address before '@') has the following limitations:
* username in email is not guaranteed to be unique,
* email could have nothing to do with user identity in LDAP
  (like presonal email on an external email service).
On the other hand, LDAP uid is guaranteed to be unique,
as it represents user's login name on Unix/Linux systems.

To understand this change, please note that gitlab_omniauth-ldap
Ruby gem uses the following mapping to store LDAP attrinbutes in auth info:
* dn attribute of LDAP entry is stored in uid attribute of auth info;
* uid attribute of LDAP entry is stored in nickname attribute of auth info.

Signed-off-by: Oleg Girko <oleg.girko@jolla.com>
2013-10-29 03:11:17 +00:00
Jacob Vosmaer 0b85f54201 Allow LDAP groups to be empty 2013-10-22 17:29:37 +02: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
Dmitriy Zaporozhets 172eb64deb LDAP user filter option in gitlab.yml
Now you are able to specify LDAP user filter string in gitlab.yml.
So its possible to exclude some users from accessing gitlab.
If user with LDAP account not matching this filter will try to login or
use gitlab he will get error message like 'Access denied for your LDAP
account' and will be signed out.
2013-10-01 14:45:21 +03:00
Dmitriy Zaporozhets 0f69c2f82f LDAP::Adapter#groups allow size argument 2013-10-01 11:37:20 +03:00
Dmitriy Zaporozhets 0c5a9f20b5 Merge branch '6-1-stable' of https://dev.gitlab.org/gitlab/gitlabhq into 6-1-stable-ee
Conflicts:
	VERSION
	app/controllers/application_controller.rb
	app/controllers/omniauth_callbacks_controller.rb
	app/models/merge_request.rb
	app/models/user.rb
	app/views/groups/_projects.html.haml
	config/routes.rb
	db/schema.rb
	doc/install/installation.md
2013-09-27 15:24:54 +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