Commit Graph
44 Commits
Author SHA1 Message Date
Jan-Willem van der Meer e23a26aea0 Add provider context to Ldap::Access 2014-10-03 17:27:35 +02:00
Jan-Willem van der Meer ce22ffbc7f Reuse the ldap adapter 2014-10-03 17:21:38 +02:00
Jan-Willem van der Meer e08c14c0f0 Use provider based ldap config 2014-10-03 17:18:25 +02:00
Jan-Willem van der Meer a68b1963a3 Less private methods, more test ordering 2014-09-03 11:28:32 +02:00
Jan-Willem van der Meer 61d0bf0bad Match method order for implementation and class
This will prevent a mess, and keeps everything clean.
In addition i made the non interface methods private
2014-09-03 10:38:07 +02:00
Jan-Willem van der Meer 1a59ce4ee7 Add extra tests around OAUTH / LDAP find_or_create 2014-09-03 10:29:03 +02:00
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
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
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 a6e4153878 Check for the AD disabled flag in Access#allowed? 2014-05-14 18:32:40 +02:00
Marin Jankovski 1187d3f28d Synchronize user email with ldap. 2014-04-04 13:08:28 +02: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 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
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
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
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 61ba66c033 Refactor LDAP::Access
Select only LDAP groups that are activated inside GitLab
Make LDAP::Access more readable
2013-09-10 11:54:37 +03:00
Dmitriy Zaporozhets 445070698a Use dn lookup for person. Collect group members dn when check for membership 2013-09-09 12:25:53 +03:00
Dmitriy Zaporozhets 3ced0cd704 Ignore ldap groups check if ldap.group_base setting is empty 2013-08-27 11:33:44 +03:00
Dmitriy Zaporozhets 541e70d8f8 Replace license to MIT in EE files 2013-08-12 13:35:52 +03:00
Dmitriy Zaporozhets 915315a460 ldap_access field added to group. set ldap group membership based on ldap_access value 2013-08-09 12:53:52 +03:00
Dmitriy Zaporozhets 7fe779b86f Add/remove user to appropriate groups based on LDAP settings 2013-08-05 15:15:58 +03:00