I have a Gitlab server installed and I'm trying to get it working for my AD users. I have the following configuration:
label: 'LDAP'
host: 'myserver.com'
port: 389
#uid: ''
method: 'plain' # "tls" or "ssl" or "plain"
bind_dn: ''
#password: ''
active_directory: true
allow_username_or_email_login: true
block_auto_created_users: false
base: ''
user_filter: ''
## EE only
group_base: ''
admin_group: ''
sync_ssh_keys: false
But I can not log in with the settings provided.
I am not very familiar with LDAP settings, but this is PHP code that is used to log into our internal systems and works fine:
$ldap = ldap_connect("ldap://myserver.com/");
if(!ldap_bind($ldap, "DOMAIN\\$username", $password)) {
echo "Authentication Error";
} else {
echo "OK";
}
I think I don’t know where to put DOMAINGitlab in the configuration.
I asked questions and looked for this information, nothing worked.
I also tried to log in using usernameboth DOMAIN\usernameand username@myserver.comand username@DOMAIN, but no one worked.
With some configuration (I don’t remember exactly that, but I will find it if necessary), I get the following error in the logs:
ArgumentError (uid or filter MUST be provided):
EDIT:
Here is what my config looks like now, still not working.
label: 'LDAP'
host: 'myserver.com'
port: 389
uid: 'sAMAccountName'
method: 'plain' # "tls" or "ssl" or "plain"
bind_dn: 'CN=gitldap,CN=Users,DC=myserver,DC=com'
password: 'thepassword'
active_directory: true
allow_username_or_email_login: true
#block_auto_created_users: false
base: 'ou=MyServer,dc=myserver,dc=com'
#user_filter: ''
### EE only
#group_base: ''
#admin_group: ''
#sync_ssh_keys: false
, SVN- AD:
SVNParentPath /var/svn
SSLRequireSSL
AuthType Basic
AuthName "MyServer Source Control System"
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPBindDN "CN=svnldap,CN=Users,DC=myserver,DC=com"
AuthLDAPBindPassword 'thepassword'
AuthLDAPURL "ldap://dc-2.myserver.com:389/ou=MyServer,dc=myserver,dc=com?sAMAccountName" NONE
AuthzSVNAccessFile /etc/svn/dav_svn.authz
Require valid-user
, myserver.com dc-2.myserver.com .