我已更改user-mgt.xml以連接到我公司的活動目錄。wso2治理註冊表4.6 LDAP無法與用戶登錄
如果我用admin用戶輸入,我可以登錄並查看活動目錄的用戶。但是,當我嘗試與另一個用戶,註冊表總是說錯誤的用戶名或密碼(我知道這兩個都是正確的)。
有了這樣Wireshark的我可以看到,活動目錄將返回用戶和更多的數據的完整名稱的嗅探器,所以我不明白爲什麼註冊表並不讓我登錄。
Authentication failure. Wrong username or password is provided {org.wso2.carbon.user.core.common.AbstractUserStoreManager}
<AddAdmin>true</AddAdmin>
<AdminRole>wso2admin</AdminRole>
<AdminUser>
<UserName>XXXXX</UserName>
<Password>XXXXX</Password>
</AdminUser>
<EveryOneRoleName>everyone</EveryOneRoleName>
<Property name="dataSource">jdbc/WSO2CarbonDB</Property>
<UserStoreManager class="org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager">
<Property name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager</Property>
<Property name="defaultRealmName">WSO2.ORG</Property>
<Property name="Disabled">false</Property>
<Property name="kdcEnabled">false</Property>
<Property name="ConnectionURL">ldap://XXXXXXXX:389</Property>
<Property name="ConnectionName">cn=XXXXX,CN=Users,DC=itlab,DC=bk</Property>
<Property name="ConnectionPassword">XXXXXX</Property>
<Property name="passwordHashMethod">PLAIN_TEXT</Property>
<Property name="UserSearchBase">CN=Users,DC=itlab,DC=bk</Property>
<Property name="UserEntryObjectClass">user</Property>
<Property name="UserNameAttribute">cn</Property>
<Property name="isADLDSRole">false</Property>
<Property name="userAccountControl">512</Property>
<Property name="UserNameListFilter">(objectClass=user)</Property>
<Property name="UserNameSearchFilter">(&(objectClass=user)(cn=?))</Property>
<Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
<Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
<Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
<Property name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
<Property name="ReadGroups">true</Property>
<Property name="WriteGroups">false</Property>
<Property name="EmptyRolesAllowed">true</Property>
<Property name="GroupSearchBase">ou=Grupos,DC=itlab,DC=bk </Property>
<Property name="GroupEntryObjectClass">group</Property>
<Property name="GroupNameAttribute">cn</Property>
<Property name="SharedGroupNameAttribute">cn</Property>
<Property name="MembershipAttribute">member</Property>
<Property name="GroupNameListFilter">(objectcategory=group)</Property>
<Property name="GroupNameSearchFilter">(&(objectClass=group)(cn=?))</Property>
<Property name="UserRolesCacheEnabled">true</Property>
<Property name="Referral">follow</Property>
<Property name="BackLinksEnabled">true</Property>
<Property name="MaxRoleNameListLength">100</Property>
<Property name="MaxUserNameListLength">100</Property>
<Property name="SCIMEnabled">false</Property>
</UserStoreManager>
謝謝!
我終於實現與另一個用戶登錄:)但我有另一個疑問。我寧願用uid而不是用戶名登錄(我的意思是,例如,用bk00001而不是John Smith登錄)。有沒有辦法做到這一點?我試圖把uid放在mgt-users.xml中,但它不起作用。謝謝! – SheilaFdez
你的意思是你想用「uid」作爲用戶名。在您的配置中,它被設置爲「cn」。您可以嘗試在「UserNameAttribute」屬性和「UserNameSearchFilter」中將「cn」更改爲「uid」並查看 – Asela
它的工作原理!非常感謝你! :) – SheilaFdez