3

I'm running a default configuration of WSO2 Identity Server and trying to use the SCIM extensions described here

I've reduced provisioning-config.xml down to ...

[
{
"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" 
}
]

I also claimed this extension for 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

When I add a user with this command the user is added but the extension attribute is ignored.

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

When I look directly against the LDAP server I see the user and all the attributes except the extension.

Not sure what I'm doing wrong. I've reboot the WSO2 server but that doesn't help.

bwgz57
  • 51
  • 4

1 Answers1

0

The file you have pointed is 'scim-schema-extension.config' I guess. To properly use the SCIM extension you should have reduced as below.

[
{
"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" 
}

]

Note that the wso2.extension element is there at the bottom and under it's sub attributes I have included employeeNumber. This should then work with the cURL command you have posted. Hope this helps.

Pushpalanka
  • 857
  • 1
  • 8
  • 20