CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Gerrit does not work with non-default LDAP port #1556

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: Powered by Gerrit Code Review (2.4)
What steps will reproduce the problem?
1. I am running Gerrit on  Ubuntu 11.10 (GNU/Linux 3.0.0-12-server x86_64 and 
using LDAP for authentication with a non-default port 
2. Snippet from gerrit.config
[auth]
    type = LDAP
[container]
    user = root
    javaHome = /opt/jdk/jdk1.6.0_16/jre
    javaOptions = -Djava.naming.referral=follow
[sshd]
    listenAddress = *:29418
[httpd]
    listenUrl = https://*:9090/
[cache]
    directory = cache
[ldap]
    server = ldap://blah-02.corp.abc.net:50002
        username = CN=bind,OU=Users,DC=Gerrit,DC=corp,DC=abc,DC=net
        password = abcpass
        sslVerify = false
        accountBase = DC=Gerrit,DC=corp,DC=abc,DC=net
        accountPattern = (sAMAccountName=${username})
        accountSshUserName = ${sAMAccountName.toLowerCase}
        groupBase = DC=Gerrit,DC=corp,DC=abc,DC=net
        accountFullName = cn
        accountEmailAddress = mail
        referral = follow
        localUsernameToLowerCase = true

What is the expected output? What do you see instead?
Expected output is that it should allow me to login but instead I can't see any 
log in error_log file.  

Please provide any additional information below.
Note that when I use an LDAP rpoxy on default port, something like this: 
    server = ldap://blah-02.corp.abc.net:389
It works just fine. Also doing an LDAP search for my username from the linux 
box which runs gerrit returns the same response for both these ldap proxies. 
Both my ldapsearch queries which return the same result from the box are as 
follows:
ldapsearch -h blah-02.corp.abc.net -p 389 -D 
"CN=bind,OU=Users,DC=Jenkins,DC=corp,DC=abc,DC=net" -w 'abcpass' -b 
DC=Jenkins,DC=corp,DC=abc,DC=net sAMAccountName=nikkik

ldapsearch -h blah-02.corp.abc.net -p 50002 -D 
"CN=bind,OU=Users,DC=Gerrit,DC=corp,DC=abc,DC=net" -w 'abcpass' -b 
DC=Gerrit,DC=corp,DC=abc,DC=net sAMAccountName=nikkik

Original issue reported on code.google.com by nikki.ka...@gmail.com on 12 Sep 2012 at 11:06

GoogleCodeExporter commented 9 years ago
I just tried to connect the current version of Gerrit (2.5.4) to an LDAP server 
running on port 10389 and cannot observe this behaviour.

The server was specified in gerrit.config as:

server = ldap://<server-ip>:10389

Original comment by kambiz.d...@gmail.com on 6 Jun 2013 at 11:09