我正在运行WSO2 Identity Server的默认配置并尝试使用描述的here
的SCIM扩展我已将 provisioning-config.xml 缩减为......
[
{
"attributeURI":"urn:scim:schemas:extension:wso2:1.0:wso2Extension.employeeNumber",
"attributeName":"employeeNumber",
"dataType":"string",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"Numeric or alphanumeric identifier assigned to a person, typically based on order of hire or association with an organization",
"schemaURI":"urn:scim:schemas:extension:wso2:1.0",
"readOnly":"true",
"required":"false",
"caseExact":"true",
"subAttributes":"null"
}
]
我还声明了 urn的这个扩展名:scim:schemas:core:1.0
Description Employee Number
Claim Uri urn:scim:schemas:extension:wso2:1.0:wso2Extension.employeeNumber
Mapped Attribute (s) employeeNumber
Regular Expression null
Display Order 0
Supported by Default true
Required false
Read-only true
当我使用此命令添加用户时,将添加用户但忽略扩展属性。
curl -v -k --user admin:admin --data "{"schemas":[],"userName":"SureshAtt","password":"Wso2@123","wso2Extension":{"employeeNumber":"000111"},"externalId": "701984"}" --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users
当我直接查看LDAP服务器时,我会看到用户和除扩展名之外的所有属性。
不确定我做错了什么。我重新启动了WSO2服务器,但这没有用。
答案 0 :(得分:0)
您指向的文件是' scim-schema-extension.config'我猜。要正确使用SCIM扩展,您应该减少如下。
[
{
"attributeURI":"urn:scim:schemas:extension:wso2:1.0:wso2Extension.employeeNumber",
"attributeName":"employeeNumber",
"dataType":"string",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"Numeric or alphanumeric identifier assigned to a person, typically based on order of hire or association with an organization",
"schemaURI":"urn:scim:schemas:extension:wso2:1.0",
"readOnly":"true",
"required":"true",
"caseExact":"true",
"subAttributes":"null"
},
{
"attributeURI":"urn:scim:schemas:extension:wso2:1.0",
"attributeName":"wso2Extension",
"dataType":"null",
"multiValued":"false",
"multiValuedAttributeChildName":"null",
"description":"SCIM wso2 User Schema Extension",
"schemaURI":"urn:scim:schemas:extension:wso2:1.0",
"readOnly":"false",
"required":"false",
"caseExact":"false",
"subAttributes":"employeeNumber"
}
]
请注意,wso2.extension元素位于底部,在其下面包含了employeeNumber的子属性。这应该适用于您发布的cURL命令。希望这会有所帮助。