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.

贡献者指南