Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #6700

Closed
Open
Created Apr 04, 2014 by Administrator@rootOwner

Gitlab 6.7 LDAP user_filter not working

Created by: sykano

If I set the user_filter to something like "(memberOf=cn=Group,ou=Groups,dc=domain,dc=name)" it doesn't work. People that are not in the group can still log in. The filter doesn't seem to be used.

If I add a line in config/initializers/devise.rb it works.

diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 50669ec..c70dbe2 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -223,6 +223,7 @@ Devise.setup do |config|
       method:   Gitlab.config.ldap['method'],
       bind_dn:  Gitlab.config.ldap['bind_dn'],
       password: Gitlab.config.ldap['password'],
+      user_filter: Gitlab.config.ldap['user_filter'],
       name_proc: email_stripping_proc
   end

If I remove that line it still works, which is weird. If I add the line and unset user_filter in config/gitlab.yml, it doesn't work again. If I remove that line it still doesn't work. And so on. Sometimes it didn't even work with the line. Sometimes it did.

Assignee
Assign to
Time tracking