Gitlab LDAP does not activate

Problem to solve

After successfully configuring the LDAP connection in /etc/gitlab/gitlab.rb and reconfiguring, the LDAP function is not active in gitlab. I can’t log in to the website using ldap credentials. The ldap function is not active in the Administration section of the ldap GUI.

Steps to reproduce

After reconfiguring gitlab using the gitlab-ctl reconfigure command, I see that the connection to ldap is successfully established

sudo gitlab-rake gitlab:ldap:check

LDAP check … Completed

But when I try to log in to the site, I don’t see the ldap sign on the login page, and in the Administrator section the LDAP function is not active.

msedge_Ji7w4BXsO0

My gitlab.rb file LDAP section

gitlab_rails[‘ldap_enabled’] = true
gitlab_rails[‘ldap_servers’] = YAML.load <<-EOS
main:
label: ‘Test domain’
host: ‘dc1.test.domain’
port: 636
uid: ‘sAMAccountName’
method: ‘ssl’
bind_dn: ‘CN=svc-ldap,DC=test,DC=local’
password: ‘password’
active_directory: true
allow_username_or_email_login: true
base: ‘OU=Users,OU=test,DC=test,DC=local’
verify_certificates: true
ca_file: /usr/local/share/ca-certificates/CA.crt
user_filter: ‘(objectClass=user)’
EOS

Configuration

Versions

  • Gitlab self managed 16.11.1-ce.0
  • Operating System Ubuntu 20.0.4.6