Commit Graph
90 Commits
Author SHA1 Message Date
Jacob Vosmaer 90ce0be420 Merge branch 'master' of dev.gitlab.org:gitlab/gitlab-ee into feature-120-multiple-ldap-groups
Conflicts:
	app/models/group.rb
	app/views/groups/members.html.haml
	db/schema.rb
2014-08-29 14:43:20 +02:00
Jan-Willem van der Meer 5238efd80c Only return found LDAP groups for processing 2014-08-29 11:09:06 +02:00
Jan-Willem van der Meer 3ba7a3a5ca Remove traces from ldab_cn and ldap_access
Also add notes about refactoring the old single-ldap API and LdapGroupResetService
2014-08-15 12:33:05 +02:00
Jan-Willem van der Meer 5ff230a11d Add more use cases for update_ldap_group_links to unit tests 2014-08-15 12:07:30 +02:00
Jan-Willem van der Meer 2541571014 Add unit test for update_ldap_group_links
This is the first stage, need to add some other to test revoking and
upgrading of the permissions
2014-08-15 11:31:52 +02:00
Jan-Willem van der Meer bb93dfb2c8 Remove old code 2014-08-14 12:54:26 +02:00
Jan-Willem van der Meer bf65eb1d4c Handle multiple LDAP groups 2014-08-14 09:33:40 +02:00
Jan-Willem van der Meer 6f71267e8f Make ldap_user more explicit in param 2014-08-13 16:51:21 +02:00
Jan-Willem van der Meer 673b9a373b Add method to get the current cns the user has access to 2014-08-13 16:48:36 +02:00
Jacob Vosmaer 22ad81e2b3 Fix copy-paste errors in LDAP::Access 2014-08-08 13:04:55 +02:00
Jacob Vosmaer 5629546794 Merge remote-tracking branch 'origin/master' into ldap/cache_check
Conflicts:
	app/controllers/application_controller.rb
	app/controllers/omniauth_callbacks_controller.rb
2014-08-06 18:09:07 +02:00
Jacob Vosmaer 669682686e Move LDAP timeout code to Gitlab::LDAP::Access 2014-08-06 18:03:01 +02:00
Dmitriy Zaporozhets a74b66cdee Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into upstream-ce
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/models/group.rb
	app/models/project.rb
	features/steps/shared/project.rb
2014-07-10 23:43:42 +03:00
Jacob Vosmaer 41a3c84e40 Add logging code for LDAP keys 2014-07-09 12:18:20 +02:00
Jacob Vosmaer 526959ab63 Use a scope to add/remove LDAP keys
For some reason I needed to add a reload statement in the specs.
2014-07-09 12:13:09 +02:00
Jacob Vosmaer fe6202097a Create an Gitlab::LDAP::Person#ssh_keys attribute
This allows us to keep Person#entry private, and it makes
Access#update_ssh_keys a little shorter.
2014-07-09 11:06:53 +02:00
Marvin Frick 423960a435 adds spec for LDAPKeys (+4 squashed commits)
Squashed commits:
[812406c] fixes bug from last refactoring
[53e9508] hides "delete" button if a key is a LDAPKey
[bafc66b] refactores update_ssh_keys in own method
[7895858] makes name of ssh public key configurable
2014-07-08 12:41:12 +02:00
Oleg GirkoandMarvin Frick edaaac2f55 Make SSH keys synchronisation with LDAP not delete keys added by users.
This is done by using a separate LDAPKey model (inherited from Key)
for storing SSH keys which came from LDAP.
These keys can be viewed from user profile, but they can not be deleted.

Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com> (+2 squashed commits)
Squashed commits:
[52b3816] Made SSH key synchronisation with LDAP configurable.

Now it can be turned on or off using configuration option
sync_ssh_keys in ldap section.
The default is off to preserve compatibility with old behaviour.

Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com>
[02f988d] Synchronise LDAP users SSH keys from LDAP automatically.

SSH public keys are synchronised from sshPublicKey LDAP attribute
upon login attempt and during regular LDAP security checks.
New keys are added, old keys not present in LDAP are deleted.

Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com> (+1 squashed commit)
Squashed commits:
[f087fbc] Make Gitlab::LDAP::Person.entry method public.

This is needed to allow access control methods to access
arbitrary LDAP attributes.

Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com>
2014-07-08 12:31:11 +02:00
Marvin Frick 4be5c5a7a2 adds feature to sync GitLab admins with LDAP group 2014-06-23 18:17:14 +02:00
Boris HUISGEN bac7d17c7b Fix LDAP TLS authentication 2014-06-19 10:41:23 +02:00
Dmitriy Zaporozhets b165b097f5 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-7-to-ee
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	LICENSE
	VERSION
	app/controllers/omniauth_callbacks_controller.rb
	app/helpers/application_helper.rb
	app/helpers/merge_requests_helper.rb
	app/models/group.rb
	app/models/project.rb
	app/models/project_team.rb
	app/views/admin/groups/edit.html.haml
	app/views/groups/_projects.html.haml
	app/views/groups/edit.html.haml
	db/schema.rb
	doc/install/installation.md
	doc/integration/README.md
	lib/gitlab/git_access.rb
	lib/gitlab/markdown.rb
	spec/helpers/merge_requests_helper.rb
	spec/models/merge_request_spec.rb
2014-06-17 10:53:44 +03:00
Marin Jankovski 314e4736e4 Strip apostrophe from email generated usernames. 2014-06-11 17:06:28 +02:00
GitLab 19a8b6ce71 Remove copyright licenses missed in 0fdab6a747. 2014-06-02 09:11:24 +02:00
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