无法将OpenLDAP设置为wso2is 5.6.0的主用户存储:在管理控制台中添加新用户时出现LDAP错误65

无法将OpenLDAP设置为wso2is 5.6.0的主用户存储:在管理控制台中添加新用户时出现LDAP错误65,ldap,wso2,wso2is,openldap,ref,Ldap,Wso2,Wso2is,Openldap,Ref,我无法使用OpenLDAP作为主要外部用户存储设置WSO2 Identity Server v5.6.0。Identity Server正在按预期启动(控制台中没有错误),并且管理员用户帐户也已自动创建。但是,如果我尝试为每个管理控制台添加新用户,Identity Server将抛出以下错误: 无法添加主用户/johndoe@gmail.com. 错误:无法访问目录上下文,或者系统中已存在以下用户的用户:johndoe@gmail.com 在LDAP控制台中,您可以看到wso2is正在尝试添加具

我无法使用OpenLDAP作为主要外部用户存储设置WSO2 Identity Server v5.6.0。Identity Server正在按预期启动(控制台中没有错误),并且管理员用户帐户也已自动创建。但是,如果我尝试为每个管理控制台添加新用户,Identity Server将抛出以下错误:

无法添加主用户/johndoe@gmail.com. 错误:无法访问目录上下文,或者系统中已存在以下用户的用户:johndoe@gmail.com

在LDAP控制台中,您可以看到wso2is正在尝试添加具有ref属性的用户:

5b7589c9 conn=1022 op=2 ADD dn=“邮件=johndoe@gmail.com,ou=用户,dc=wso2,dc=org“ 5b7589c9 conn=1022 op=2 RESULT tag=105 err=65 text=attribute“ref”仅允许在引用中使用

我不知道wso2is为什么要这么做。引用选项已禁用&已导入WSO2特定的ldif文件。如何解决这个问题

下面是我的
用户管理.xml
配置:


真的
管理
admin@wso2.com
管理
每个人
真的
真的
jdbc/WSO2CarbonDB
org.wso2.carbon.user.core.tenant.CommonHybridlDaptentManager
ldap://ldap:389
cn=admin,dc=wso2,dc=org
管理
假的
ou=用户,dc=wso2,dc=org
识别人
邮件
(&;(objectClass=identityPerson)(邮件=?)
(&;(objectClass=identityPerson)(mail=*))
mail={0},ou=Users,dc=wso2,dc=org
真的
真的
ou=团体,dc=wso2,dc=组织
群名
cn
(&;(objectClass=groupof名称)(cn=?)
(objectClass=groupOfNames)
cn={0},ou=Groups,dc=wso2,dc=org
成员
假的
^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\[a-zA-Z]{2,4}$
^[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\[a-zA-Z]{2,4}$
违反用户名模式策略
^[\S]{5,30}$
^[\S]{5,30}$
密码长度应在5到30个字符之间
[a-zA-Z0-9.\-|/][3,40}$
^[\S]{3,40}$
真的
假的
假的
纯文本
,
100
100
假的
WSO2.ORG
真的
假的
5000
/许可
真的
假的

上述错误的原因是,在WSO2中,用于表示资源类型,我们映射了一个名为“ref”的ldap属性,但“ref”似乎是OpenLdap中为引用保留的属性。因此,我们看到了上述错误

要解决此问题,您可以按照以下说明操作

  • 启动Identity server后,转到主页->身份->声明->列表
  • 选择“urn:ietf:params:scim:schemas:core:2.0”,然后单击“urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”上的编辑
  • 对于“映射的本地声明”,请选择要映射到此声明的适当声明。例如:并单击更新
  • 现在尝试通过管理控制台创建用户

  • 出现上述错误的原因是,在WSO2中,是为了表示resourceType,我们映射了一个名为“ref”的ldap属性,但“ref”似乎是OpenLdap中为引用保留的属性。因此,我们看到了上述错误

    要解决此问题,您可以按照以下说明操作

  • 启动Identity server后,转到主页->身份->声明->列表
  • 选择“urn:ietf:params:scim:schemas:core:2.0”,然后单击“urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”上的编辑
  • 对于“映射的本地声明”,请选择要映射到此声明的适当声明。例如:并单击更新
  • 现在尝试通过管理控制台创建用户

  • 谢谢你的快速回复。是的,在openldap中,“ref”属性用于引用。将声明映射到userType解决了这个问题。我还遇到了错误,当我将声明映射到userType时,在将用户添加为“userType未定义”时出现了错误,因此我将其映射为声明“userName”,并且工作正常。这背后有什么原因吗@Renekaesler感谢您的快速响应。是的,在openldap中,“ref”属性用于引用。将声明映射到userType解决了这个问题。我还遇到了错误,当我将声明映射到userType时,在将用户添加为“userType未定义”时出现了错误,因此我将其映射为声明“userName”,并且工作正常。这背后有什么原因吗@雷内克斯勒
    <UserManager>
      <Realm>
       <Configuration>
        <AddAdmin>true</AddAdmin>
          <AdminRole>admin</AdminRole>
          <AdminUser>
            <UserName>admin@wso2.com</UserName>
            <Password>admin</Password>
          </AdminUser>
          <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
          <Property name="isCascadeDeleteEnabled">true</Property>
          <Property name="initializeNewClaimManager">true</Property>
          <Property name="dataSource">jdbc/WSO2CarbonDB</Property>
        </Configuration>    
        <UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager">
          <Property name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager</Property>
          <Property name="ConnectionURL">ldap://ldap:389</Property>
          <Property name="ConnectionName">cn=admin,dc=wso2,dc=org</Property>
          <Property name="ConnectionPassword">admin</Property>
          <Property name="AnonymousBind">false</Property>
          <Property name="UserSearchBase">ou=Users,dc=wso2,dc=org</Property>
          <Property name="UserEntryObjectClass">identityPerson</Property>
          <Property name="UserNameAttribute">mail</Property>
          <Property name="UserNameSearchFilter">(&amp;(objectClass=identityPerson)(mail=?))</Property>
          <Property name="UserNameListFilter">(&amp;(objectClass=identityPerson)(mail=*))</Property>
          <Property name="UserDNPattern">mail={0},ou=Users,dc=wso2,dc=org</Property>
          <Property name="DisplayNameAttribute"/>
          <Property name="ReadGroups">true</Property>
          <Property name="WriteGroups">true</Property>
          <Property name="GroupSearchBase">ou=Groups,dc=wso2,dc=org</Property>
          <Property name="GroupEntryObjectClass">groupOfNames</Property>
          <Property name="GroupNameAttribute">cn</Property>
          <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupOfNames)(cn=?))</Property>
          <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
          <Property name="RoleDNPattern">cn={0},ou=Groups,dc=wso2,dc=org</Property>
          <Property name="MembershipAttribute">member</Property>
          <Property name="BackLinksEnabled">false</Property>
          <Property name="UsernameJavaRegEx">^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$</Property>
          <Property name="UsernameJavaScriptRegEx">^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$</Property>
          <Property name="UsernameJavaRegExViolationErrorMsg">Username pattern policy violated</Property>
          <Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
          <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
          <Property name="PasswordJavaRegExViolationErrorMsg">Password length should be within 5 to 30 characters</Property>
          <Property name="RolenameJavaRegEx">[a-zA-Z0-9._\-|//]{3,40}$</Property>
          <Property name="RolenameJavaScriptRegEx">^[\S]{3,40}$</Property>
          <Property name="SCIMEnabled">true</Property>
          <Property name="IsBulkImportSupported">false</Property>
          <Property name="EmptyRolesAllowed">false</Property>
          <Property name="PasswordHashMethod">PLAIN_TEXT</Property>
          <Property name="MultiAttributeSeparator">,</Property>
          <Property name="MaxUserNameListLength">100</Property>
          <Property name="MaxRoleNameListLength">100</Property>
          <Property name="kdcEnabled">false</Property>
          <Property name="defaultRealmName">WSO2.ORG</Property>
          <Property name="UserRolesCacheEnabled">true</Property>
          <Property name="ConnectionPoolingEnabled">false</Property>
          <Property name="LDAPConnectionTimeout">5000</Property>
          <Property name="ReadTimeout"/>
          <Property name="RetryAttempts"/>
        </UserStoreManager>
    
        <AuthorizationManager class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
          <Property name="AdminRoleManagementPermissions">/permission</Property>
          <Property name="AuthorizationCacheEnabled">true</Property>
          <Property name="GetAllRolesOfUserEnabled">false</Property>
        </AuthorizationManager>
      </Realm>
    </UserManager>