2016-09-14 337 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 

我沒有「用戶搜索」選項,所以登錄失敗。