-
Notifications
You must be signed in to change notification settings - Fork 673
Description
We are using LDAP for authentication. When a user logs in, an error is logged and the user seems to be logged in correctly, but his permissions are not correct until the next LDAP sync.
We've debugged the code to line 523 in class LDAPAuthProvider. When we take the LDAP arguments (base, filter, attributes) from that point and manually make the LDAP call using Softerra LDAP browser, the manual call works fine.
The production instance in Linux, but I can reproduce on a machine running Windows 7, GitBlit go version 1.6.2.
Our next step will be to try to build from source and reproduce. We'd appreciate any suggestions about what might be wrong or how best to pinpoint the problem.
Rob Conaway
The following is the (redacted) log message:
2015-09-18 09:26:09 [INFO ] Running on Windows 7 (6.1)
2015-09-18 09:26:09 [INFO ] Logging initialized @461ms
2015-09-18 09:26:09 [INFO ] Using JCE Standard Encryption Policy files, encryption key lengths will be limited
2015-09-18 09:26:09 [INFO ] Setting up HTTPS transport on port 443
2015-09-18 09:26:09 [INFO ] certificate alias = localhost
2015-09-18 09:26:09 [INFO ] keyStorePath = C:\REDACTED\gitblit-1.6.2\data\serverKeyStore.jks
2015-09-18 09:26:09 [INFO ] trustStorePath = C:\REDACTED\gitblit-1.6.2\data\serverTrustStore.jks
2015-09-18 09:26:09 [INFO ] crlPath = C:\REDACTED\gitblit-1.6.2\data\certs\caRevocationList.crl
2015-09-18 09:26:09 [INFO ] Setting up HTTP transport on port 80
2015-09-18 09:26:09 [INFO ] Shutdown Monitor listening on port 8081
2015-09-18 09:26:09 [INFO ] jetty-9.2.3.v20140905
2015-09-18 09:26:12 [INFO ] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2015-09-18 09:26:12 [INFO ]
. . .
2015-09-18 09:26:23 [ERROR] Problem Searching LDAP
LDAPSearchException(resultCode=32 (no such object), numEntries=0, numReferences=0, errorMessage='0000208D: NameErr: DSID-0315258B, problem 2001 (NO_OBJECT), data 0, best match of:
'O=REDACTED,C=US'
', matchedDN='O=REDACTED,C=US')
at com.unboundid.ldap.sdk.LDAPConnection.search(LDAPConnection.java:3091)
at com.gitblit.auth.LdapAuthProvider.doSearch(LdapAuthProvider.java:523)
at com.gitblit.auth.LdapAuthProvider.getTeamsFromLdap(LdapAuthProvider.java:456)
at com.gitblit.auth.LdapAuthProvider.authenticate(LdapAuthProvider.java:340)
at com.gitblit.manager.AuthenticationManager.authenticate(AuthenticationManager.java:380)
at com.gitblit.wicket.pages.RootPage$LoginForm$1.onSubmit(RootPage.java:567)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1595)
at org.apache.wicket.markup.html.form.Form.process(Form.java:960)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:922)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
. . .
Here is the LDAP portion of the gitblit.properties
realm.authenticationProviders = ldap
realm.ldap.server = ldaps://REDACTED.com:636
realm.ldap.username = REDACTED=2031441, ou=Employee, ou=People, o=REDACTED, c=US
realm.ldap.password = gv3$0819
realm.ldap.maintainTeams = true
realm.ldap.accountBase = ou=Employee, ou=People, o=REDACTED, c=US
realm.ldap.accountPattern = (&(objectClass=person)(uid=rconawa2)(|(memberOf=CN=REDACTED-DEVELOPERS,OU=Groups,O=REDACTED,C=US)(memberOf=CN=REDACTED-DEVELOPERS,OU=Groups,O=REDACTED,C=US)))
realm.ldap.groupBase = OU=Groups,O=REDACTED,C=US
realm.ldap.groupMemberPattern = (&(objectClass=group)(member=REDACTEDGID=1988870,OU=Employee,OU=People,O=REDACTED,C=US))
realm.ldap.groupEmptyMemberPattern = (&(objectClass=group)(!(member=*)))
realm.ldap.admins = (CN=REDACTED-GIT-ADMINISTRATORS,OU=Groups,O=REDACTED,C=US)
realm.ldap.displayName = REDACTEDDisplayName
realm.ldap.email = mail
realm.ldap.synchronize = true
realm.ldap.syncPeriod = 5 MINUTES
realm.ldap.removeDeletedUsers = true