You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过SCIM2 API在WSO2 IS中使用外部声明创建用户失败

问题:添加带外部声明的SCIM用户时返回500错误

尝试通过外部声明创建用户,已将声明添加至scim2-schema-extension.config、外部声明及本地声明配置中,但API请求返回500错误。

API响应

{"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],"detail": "Error in adding the user: testoviy22@mail.ru to the user store.","status": "500"}

日志错误信息

: ERR_13735_ELEMENT_FOR_OID_DOES_NOT_EXIST ATTRIBUTE_TYPE for OID comment does not exist!]; remaining name 'mail=testoviy22@mail.ru'
at java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3280)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3205)
at java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2996)
at java.naming/com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:452)
at java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(ComponentDirContext.java:299)
at java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(PartialCompositeDirContext.java:217)
at org.wso2.carbon.user.core.ldap.UniqueIDReadWriteLDAPUserStoreManager.persistUser(UniqueIDReadWriteLDAPUserStoreManager.java:312)
... 73 more

相关配置说明

  • 已配置本地声明
  • 已配置外部声明

请求示例

{"name": {"familyName": "Zubenko","givenName": "Michael"},"password": "qwerty","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {"comment": "test"},"userName": "testoviy22@mail.ru"}

问题原因及解决方法

原因

日志明确提示ATTRIBUTE_TYPE for OID comment does not exist,说明后端LDAP用户存储中不存在comment这个属性类型,导致创建用户时无法写入该属性。

解决步骤

  1. 检查LDAP Schema:登录LDAP服务器,确认是否存在comment属性类型。如果不存在,需要在LDAP的schema中添加该属性定义(例如OpenLDAP中可修改对应schema文件后重启服务加载)。
  2. 核对SCIM扩展映射:检查scim2-schema-extension.config中的配置,确保comment属性正确映射到LDAP中已存在的属性名称,避免直接使用LDAP不支持的属性名。
  3. 验证用户存储配置:检查用户存储的配置文件(如WSO2的user-mgt.xml),确认用户存储已配置支持该属性,且属性映射关系正确。
  4. 重启服务:修改配置后重启相关服务(如WSO2 Identity Server),确保配置生效。

内容的提问来源于stack exchange,提问作者Montana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 08:01:43