So, I assumed if I have this turned on that my users would be able to login with either their usernames or email addresses, but this does not seem to be the case. In my configuration, uid is set to the sAMAccountName attribute, which is something like first 6 letters of your last name followed by first and middle initial. I am not sure what Gitlab uses for the email, but I assume it is the mail attribute which is something like email@example.com for us. I do not have the “attributes” section in my configuration file (mentioned here: https://docs.gitlab.com/ce/administration/auth/ldap.html) as I have never needed it. Now, my users can login with their usernames without a problem, but logging in with their email address does not work at all. Is this a bug, issue with my configuration, or by design?
gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' # remember to close this block with 'EOS' below main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: '<OUR_HOST>' port: 389 uid: 'sAMAccountName' method: 'plain' # "tls" or "ssl" or "plain" bind_dn: '<OUR_BIND_DN>' password: '<PASSWORD>' active_directory: true allow_username_or_email_login: true block_auto_created_users: false base: '<OUR_BASE>' timeout: 15 # user_filter: '' # ## EE only # group_base: '' # admin_group: '' # sync_ssh_keys: false EOS