Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to troubleshoot ldap issues. #698

Open
gitblit opened this issue Aug 12, 2015 · 5 comments
Open

unable to troubleshoot ldap issues. #698

gitblit opened this issue Aug 12, 2015 · 5 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 402

What steps will reproduce the problem?

1. configured gitblit:

realm.authenticationProviders = ldap
realm.ldap.accountBase = ou=People,dc=ugo-wallet,dc=com
realm.ldap.accountPattern = (objectClass=posixAccount)
realm.ldap.admins = @scalar
realm.ldap.displayName = cn
realm.ldap.email = ${uid}@ugo-wallet.com
realm.ldap.groupBase = ou=Group,dc=ugo-wallet,dc=com
realm.ldap.groupEmptyMemberPattern = (&(objectClass=group)(!(memberUid=*)))
realm.ldap.groupMemberPattern = (&(objectClass=group)(memberUid=${username}))
realm.ldap.maintainTeams = true
realm.ldap.password = password
realm.ldap.removeDeletedUsers = true
realm.ldap.server = ldap://ugo-dsp-ldap-01.ugo-wallet.com/
realm.ldap.synchronize = false
realm.ldap.syncPeriod = 5 MINUTES
realm.ldap.uid = uid
realm.ldap.username = uid=ugo-dsp-gitblit-01,ou=Machines,dc=ugo-wallet,dc=com

2. use customg log4j file:

 ...
 log4j.rootCategory=DEBUG, R
 ...

3. start the server:

 java -Dlog4j.configuration=file:///srv/gitblit-1.4.1/data/log4j.properties -jar gitblit.jar
--baseFolder data

What is the expected output? What do you see instead?

 I expect to see some sort of line indicating the parsed config, an attempt to connect
to ldap and the result. I see nothing.

What version of the product are you using? On what operating system?

 gitblit-1.4.1 ( the linux GO version ) ( RHEL 6.X )

Please provide any additional information below.

I did a tcpdump and I see lots of data flying back and forth.

I try to authenticate against gitblit and it fails. If I try to use the same creds
locally to the local OS ( pam ldap ) it works fine.

David Thornton
david.thornton@scalar.ca


Reported by northdot9 on 2014-03-27 18:13:46

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Yeah, I agree.  LDAP logging is a weakness and I haven't looked into improving it. 
Gitblit uses UnboundID underneath for LDAP communication.  That library might have
user-controllable logging, not sure.  Improvements are welcome here.

Reported by James.Moger on 2014-03-27 18:24:41

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

This looks interesting:
https://www.unboundid.com/products/ldap-sdk/docs/examples/LDAPDebugger.java

Unfortunately, it can't be bundled into Gitblit because it is GPL'd.  But we can learn
from it and write our own.

Reported by James.Moger on 2014-03-27 18:44:32

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Issue 699 has been merged into this issue.

Reported by James.Moger on 2014-03-29 00:10:31

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

As James said recently in google group:

If you startup Gitblit with some -D VM args then you should be able to enable this:

-Dcom.unboundid.ldap.sdk.debug.enabled=true
-Dcom.unboundid.ldap.sdk.debug.level=INFO

You'll have to play with the log levels.
"ALL", "SEVERE", "WARNING", "INFO", "CONFIG", "FINE", "FINER", "FINEST", or "OFF".


-J

Reported by johann.ollivierlapeyre on 2015-03-06 13:00:33

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Sweet, would be nice to have it documented somewhere.

Reported by gradinkov@outlook.com on 2015-03-06 13:02:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants