cannot login to wso2 Identity server with the ldap

2020-03-08 07:32发布

问题:

I was trying to connect wso2 Identity server to an Ldap ReadWriteLDAPUserStoreManager, succeeded in the integration and could access ldap users from wso2 identity server. But the problem is i cannot login to the Identity server by using ldap username and password.

Please help me

回答1:

Please try with below configuration 

<?xml version="1.0" encoding="UTF-8"?><UserStoreManager     class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
  <Property name="ConnectionName">cn=admin,dc=ds,dc=sample,dc=com</Property>
  <Property name="ConnectionURL">ldap://192.168.1.1:389</Property>
  <Property name="ConnectionPassword">XXXX</Property>
  <Property name="UserSearchBase">ou=People,dc=prime,dc=ds,dc=sample,dc=com</Property>
  <Property name="Disabled">false</Property>
  <Property name="UserNameListFilter">(objectClass=inetOrgPerson)</Property>
  <Property name="UserNameAttribute">uid</Property>
  <Property name="UserNameSearchFilter">(&amp;(objectClass=inetOrgPerson)(uid=?))</Property>
  <Property name="UserEntryObjectClass">inetOrgPerson</Property>
  <Property name="GroupEntryObjectClass">organizationalUnit</Property>
  <Property name="ReadGroups">false</Property>
  <Property name="GroupSearchBase">ou=People,dc=prime,dc=ds,dc=sample,dc=com</Property>
  <Property name="GroupNameAttribute">uid</Property>
  <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
  <Property name="MembershipAttribute">member</Property>
  <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(ou=?))</Property>
  <Property name="MaxUserNameListLength">100</Property>
  <Property name="MaxRoleNameListLength">100</Property>
  <Property name="UserRolesCacheEnabled">true</Property>
  <Property name="SCIMEnabled">false</Property>
  <Property name="PasswordHashMethod">SHA</Property>
  <Property name="UserDNPattern">uid={0},ou=People,dc=prime,dc=ds,dc=sample,dc=com</Property>
  <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
  <Property name="UserNameJavaScriptRegEx">^[\S]{3,30}$</Property>
  <Property name="UserNameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
  <Property name="RoleNameJavaScriptRegEx">^[\S]{3,30}$</Property>
  <Property name="RoleNameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
  <Property name="WriteGroups">true</Property>
  <Property name="EmptyRolesAllowed">true</Property>
  <Property name="DomainName">ldap</Property>
  <Property name="Description">ldap
        </Property>
</UserStoreManager>


回答2:

It will be a good idea to login as admin user and check whether the configured ldap users are in a role that has login permission.



标签: ldap wso2 wso2is