简体   繁体   English

OpenLDAP 作为 Wso2is 5.8.0 的主要外部用户存储设置的问题:添加新用户时获取与 createTimestamp 属性相关的“错误 21”

[英]Issue with OpenLDAP as PRIMARY external user store setup for Wso2is 5.8.0: get "error 21" related to createTimestamp attribute" when adding new user

I have almost the same problem discuss in the question below, but I get error at the claim configuration step :我在下面的问题中讨论了几乎相同的问题,但在声明配置步骤中出现错误:

Unable to setup OpenLDAP as primary user store for wso2is 5.6.0: LDAP Error 65 when adding a new user in management console 无法将 OpenLDAP 设置为 wso2is 5.6.0 的主要用户存储:在管理控制台中添加新用户时出现 LDAP 错误 65

I want to setup Wso2is-5.8.0 with OpenLDAP as Primary user store and I use a Docker-Compose file for the deployment.我想使用 OpenLDAP 作为主要用户存储设置 Wso2is-5.8.0,并且我使用 Docker-Compose 文件进行部署。

The connection step between Identity Server and Openldap ended successfuly, I have got all my LDAP user in IS and the admin user has been added to LDAP. Identity Server 和 Openldap 之间的连接步骤成功结束,我的所有 LDAP 用户都在 IS 中,并且管理员用户已添加到 LDAP。 Now I'm configuring the claim parameters.现在我正在配置声明参数。

I defined :我定义:

urn:ietf:params:scim:schemas:core:2.0:meta.resourceType = http://wso2.org/claims/userType urn:ietf:params:scim:schemas:core:2.0:meta.resourceType = http://wso2.org/claims/userType

I get "err=17 text=userType: attribute type undefined" So I defined userType as below:我得到“err = 17 text = userType:属性类型未定义”所以我定义了userType如下:

http://wso2.org/claims/userType = Users (related to the "ou" value in OpenLDAP) http://wso2.org/claims/userType = 用户(与 OpenLDAP 中的“ou”值相关)

Then I get "err=17 text=createdDate: attribute type undefined" So I defined createdDate as below:然后我得到“err=17 text=createdDate:属性类型未定义”所以我定义createdDate如下:

http://wso2.org/claims/created = createTimestamp (as attribute name in OpenLDAP) http://wso2.org/claims/created = createTimestamp(作为 OpenLDAP 中的属性名称)

And now I get :现在我得到:

5d14d9a9 conn=1168 op=2 ADD dn="uid=usertest,ou=Users,dc=example,dc=org"
5d15dd6e conn=1340 op=2 RESULT tag=105 err=21 text=createTimestamp: value #0 invalid per syntax

I try checking Read only in "Created Time" claim configuration but same error.我尝试在“创建时间”声明配置中检查只读但同样的错误。

Does anyone have a way to solve this problem?有没有人有办法解决这个问题?

I attached below my user-mgt.xml file.我附在我的 user-mgt.xml 文件下面。

Thank you in advance先感谢您

<UserManager>
  <Realm>
    <Configuration>
    <AddAdmin>true</AddAdmin>
    <AdminRole>admin</AdminRole>
    <AdminUser>
        <UserName>admin</UserName>
        <Password>admin</Password>
    </AdminUser>
    <EveryOneRoleName>everyone</EveryOneRoleName>
    <!-- By default users in this role sees the registry root -->
    <!-- Enable username claim retrieve from the UM_USER_NAME in JDBC datasources-->
        <OverrideUsernameClaimFromInternalUsername>true</OverrideUsernameClaimFromInternalUsername>
    <Property name="isCascadeDeleteEnabled">true</Property>
    <Property name="initializeNewClaimManager">true</Property>
    <Property name="dataSource">jdbc/WSO2IdentityDS</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://192.168.1.10:389</Property>
      <Property name="ConnectionName">cn=admin,dc=example,dc=org</Property>
      <Property name="ConnectionPassword">admin</Property>
      <Property name="AnonymousBind">false</Property>
      <Property name="UserSearchBase">ou=Users,dc=example,dc=org</Property>
      <Property name="UserEntryObjectClass">inetOrgPerson</Property>
      <Property name="UserNameAttribute">uid</Property>
      <Property name="UserNameSearchFilter">(&amp;(objectClass=inetOrgPerson)(uid=?))</Property>
      <Property name="UserNameListFilter">(objectClass=inetOrgPerson)</Property>
      <Property name="DisplayNameAttribute"/>
      <Property name="ReadGroups">true</Property>
      <Property name="WriteGroups">true</Property>
      <Property name="GroupSearchBase">ou=Groups,dc=example,dc=org</Property>
      <Property name="GroupEntryObjectClass">posixGroup</Property>
      <Property name="GroupNameAttribute">cn</Property>
      <Property name="GroupNameSearchFilter">(&amp;(objectClass=posixGroup)(=?))</Property>
      <Property name="GroupNameListFilter">(objectClass=posixGroup)</Property>
      <Property name="MembershipAttribute">memberUid</Property>
      <Property name="BackLinksEnabled">false</Property>
      <Property name="UsernameJavaRegEx">[a-zA-Z0-9._\-|//]{3,30}$</Property>
      <Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</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,30}$</Property>
      <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
      <Property name="SCIMEnabled">true</Property>
      <Property name="IsBulkImportSupported">false</Property>
      <Property name="EmptyRolesAllowed">true</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"/>
      <Property name="StartTLSEnabled">false</Property>
    </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>
    <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
      <Property name="TenantManager">org.wso2.carbon.user.core.tenant.JDBCTenantManager</Property>
      <Property name="dataSource">jdbc/WSO2UM_DB</Property>
      <Property name="ReadOnly">false</Property>
      <Property name="ReadGroups">true</Property>
      <Property name="WriteGroups">true</Property>
      <Property name="UsernameJavaRegEx">^[\S]{3,30}$</Property>
      <Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</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">^[\S]{3,30}$</Property>
      <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
      <Property name="CaseInsensitiveUsername">false</Property>
      <Property name="SCIMEnabled">false</Property>
      <Property name="IsBulkImportSupported">false</Property>
      <Property name="PasswordDigest">SHA-256</Property>
      <Property name="StoreSaltedPassword">true</Property>
      <Property name="MultiAttributeSeparator">,</Property>
      <Property name="MaxUserNameListLength">100</Property>
      <Property name="MaxRoleNameListLength">100</Property>
      <Property name="UserRolesCacheEnabled">true</Property>
      <Property name="UserNameUniqueAcrossTenants">false</Property>
      <Property name="LeadingOrTrailingSpaceAllowedInUserName">false</Property>
    </UserStoreManager>
  </Realm>
</UserManager>

Please try like this after restarting,重启后试试这个

  1. After starting the Identity server go to Home -> Identity -> Claims -> List.启动身份服务器后,转到主页 -> 身份 -> 声明 -> 列表。

  2. Select “urn:ietf:params:scim:schemas:core:2.0” and then click edit on “urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”.选择“urn:ietf:params:scim:schemas:core:2.0”,然后点击“urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”上的编辑。

  3. For “Mapped Local Claim” select a appropriate claim you would like to map to this.对于“映射的本地声明”,选择您希望映射到此的适当声明。 For eg : http://wso2.org/claims/userType and click update.例如: http : //wso2.org/claims/userType并单击更新。

You can read more on configuring OpenLDAP with WSO2 IS in https://medium.com/@gdrdabarera/how-to-configure-open-ldap-with-wso2-identity-server-5-4-0-3a76bf240001您可以在https://medium.com/@gdrdabarera/how-to-configure-open-ldap-with-wso2-identity-server-5-4-0-3a76bf240001 中阅读有关使用 WSO2 IS 配置 OpenLDAP 的更多信息

This resourceType claim is introduced in IS-5.4.0.此 resourceType 声明是在 IS-5.4.0 中引入的。 From this onwards, In WSO2 IS for representing the resourceType we have mapped an LDAP attribute called "ref", but it seems "ref" is an attribute that's reserved in OpenLDAP for referrals.从那时起,在 WSO2 IS 中,我们映射了一个名为“ref”的 LDAP 属性来表示 resourceType,但似乎“ref”是 OpenLDAP 中为引用保留的属性。 As a workaround for this issue “urn:ietf:params:scim:schemas:core:2.0:meta.resourceType” was mapped to userType claim in this question Unable to setup OpenLDAP as primary user store for wso2is 5.6.0: LDAP Error 65 when adding a new user in management console .作为此问题的解决方法,“urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”已映射到此问题中的 userType 声明无法将 OpenLDAP 设置为 wso2is 5.6.0 的主要用户存储:LDAP 错误 65在管理控制台中添加新用户时 This question was asked based on IS 5.6.0 and We were able to observe this issue from IS 5.4.0 onwards.这个问题是基于 IS 5.6.0 提出的,我们能够从 IS 5.4.0 开始观察到这个问题。

But this issue was fixed in latest released Identity Server 5.8.0 as a fix for this issue https://github.com/wso2/product-is/issues/4807 .但是此问题已在最新发布的 Identity Server 5.8.0 中修复,作为此问题的修复https://github.com/wso2/product-is/issues/4807 In the latest version, http://wso2.org/claims/resourceType claim is mapped to "resourceType" attribute.在最新版本中, http://wso2.org/claims/resourceType声明被映射到“resourceType”属性。 You can check this in claim-config.xml file located in the directory /repository/conf/.您可以在位于目录 /repository/conf/ 中的 claim-config.xml 文件中进行检查。 So you don't need to map the "urn:ietf:params:scim:schemas:core:2.0:meta.resourceType" to any local claims such as " http://wso2.org/claims/userType " claim.因此,您无需将“urn:ietf:params:scim:schemas:core:2.0:meta.resourceType”映射到任何本地声明,例如“ http://wso2.org/claims/userType ”声明。 Hence no need to change the mapped attribute of resourceType claim.因此无需更改 resourceType 声明的映射属性。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WSO2 IS-org.wso2.carbon.user.core.UserStoreException:null - WSO2 IS - org.wso2.carbon.user.core.UserStoreException: null 注册用户时无法获得从属关系的错误 - Error regarding Failed to get Affiliation when registering the user 使用 mariadb 10.4.8 docker 容器使用 docker 组合并在附加外部卷时发出 - Access denied for user 'root'@'localhost' with mariadb 10.4.8 docker container using docker compose and issue while attaching external volume Acorecms Auto Login New User After Registration 插件安装错误:Installation failed: Could not create directory - Acorecms Auto Login New User After Registration plugin installation error: Installation failed: Could not create directory 使用docker-compose运行分布式气流架构时如何将新用户添加到docker镜像 - How to add new user to docker image when running distributed airflow architecture using docker-compose docker-compose 以普通用户身份运行时出现错误“ImportError: No module named ssl_match_hostname” - docker-compose gives error "ImportError: No module named ssl_match_hostname" when run as normal user db.createUser 未在 docker setup 中的 mongodb 中创建任何用户 - db.createUser is not creating any user in mongodb in docker setup 如何使用 docker elk stack 设置 kibana 用户凭据 - how to setup kibana user credentials with docker elk stack exec 用户进程导致“exec 格式错误” - exec user process caused "exec format error" 为 MongoDB 图表创建用户时面临的问题(本地) - Facing issue to create user for MongoDB Charts (On Prem)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM