2016-09-14 129 views
0

我已经迁移Jenkins以使用LDAP登录,并且没有问题。 但是,当我试图迁移phabricator使用LDAP时,我得到“用户名或密码不正确。”每次,我敢肯定,相同的用户名和密码可以登录詹金斯。我使用的是同一个OpenLDAP服务器,而且LDAP只有一个DN:cn = readonly,dc = my-company,dc = com。下面Phabricator配置列表:如何配置phabricator登录使用ldap?

允许: “允许登录”
LDAP主机&端口:OU =用户,DC =我的公司,DC = com的(同时:正好与我的詹金斯配置
基本专有名称相同詹金斯根DN是DC =我的公司,DC = COM)
搜索属性:空
总是搜索:未选中
匿名用户名:CN =只读,DC =我的公司,DC = COM(同与詹金斯经理DN )
匿名密码:密码(与詹金斯经理密码相同)
帐号属性:UID
实名属性:空
LDAP版本:3

这阻止了我两天了,是不是我错过了什么?

感谢您的回答〜

+0

您提到您正在迁移,我认为这意味着您已经拥有Phabricator中的许多用户。我猜你对Phabricator用户名使用了相同的格式,就像你使用LDAP一样。 Phabricator可能会看到现有用户并检查该用户的密码。您将需要通过创建新用户进程,以便Phabricator将查询LDAP并设置Auth。 – CEPA

+0

哦,我已经建立了一个新的Phabricator来测试LDAP。新的Phabricator没有任何用户期望管理员。我计划在测试后迁移。 –

回答

0

哦,我知道了。 Phabricator与Jenkins有不同的LDAP登录机制。 Phabricator始终将LDAP与用户的DN和密码绑定(以验证登录),然后搜索用户的DN本身。下面是LDAP登录代码注释:

// This is unusual (since the bind succeeded) but we've seen it at least 
    // once in the wild, where the anonymous user is allowed to search but 
    // the credentialed user is not. 

    // If we don't have anonymous credentials, raise an explicit exception 
    // here since we'll fail a typehint if we don't return an array anyway 
    // and this is a more useful error. 

    // If we do have anonymous credentials, we'll rebind and try the search 
    // again below. Doing this automatically means things work correctly more 
    // often without requiring additional configuration. 

所以,LDAP用户必须具有搜索ACL,如:

olcAccess: {1}to * 
    by self write 
    by dn="cn=admin,dc=my-company,dc=com" write 
    by dn="cn=readonly,dc=my-company,dc=com" read 
    by users search 
    by * none 

我没有“用户搜索”选项,所以登录失败。