gitbucket/gitbucket

LDAPException: No Such Object

開放

#2,259 建立於 2019年1月31日

 (3 則留言) (0 個反應) (0 位負責人)Scala (1,262 個分叉)batch import
LDAP/SSOhelp wantedimprovement

倉庫指標

星標
 (9,371 顆星)
PR 合併指標
 (平均合併 1小時 54分鐘) (30 天內合併 18 個 PR)

描述

Before submitting an issue to GitBucket I have first:

Issue

Impacted version: 4.30.1

Deployment mode: Running with java -jar ... behind an apache2 reverse proxy. OpenLDAP server running on the same host with no encryption on localhost connections. Gitlab has only read-only access onto OpenLDAP.

Problem description: I can't get LDAP authentication functioning. The "Best" I've achieved so far is getting No Such Object in the logs. I've confirmed that gitbucket is successfully logging into LDAP, by giving it incorrect credentials to show the error changes when it has the correct credentials.

No matter what I try I can't get further than "No Such Object". It's not clear in the documentation whether gitbucket expects an existing gitbucket user to tally with an LDAP user before they can log in. But I have tried it both ways.

Settings:

LDAP port:  389
Bind DN:  cn=Gitbucket,ou=Apps,dc=example
Bind password: <removed>
Base DN:  ou=People,dc=example
User name attribute: uid
Additional filter condition: <various, but have tried blank>
Full name attribute: cn
Mail address attribute: mail

Example user: philip recorded in uid=philip,ou=People,dc=example

Output log. I've tried to enable debugging but can only get this:

00:22:38.835 [qtp1789447862-17] INFO  gitbucket.core.util.LDAPUtil$ - LDAPException: No Such Object (32) No Such Object
LDAPException: Matched DN:
00:22:38.838 [qtp1789447862-17] INFO  g.core.service.AccountService - LDAP error: User LDAP Authentication Failed.
00:22:38.871 [qtp1789447862-17] INFO  g.core.service.AccountService - Failed to authenticate: philip
00:25:38.604 [qtp1789447862-41] INFO  gitbucket.core.util.LDAPUtil$ - LDAPException: No Such Object (32) No Such Object
LDAPException: Matched DN:
00:25:38.605 [qtp1789447862-41] INFO  g.core.service.AccountService - LDAP error: User LDAP Authentication Failed.
00:25:38.627 [qtp1789447862-41] INFO  g.core.service.AccountService - Failed to authenticate: philip
00:25:42.423 [qtp1789447862-15] INFO  g.core.service.AccountService - LDAP error: User does not exist.

貢獻者指南