By: Teemu Kääriäinen user 28 Apr 2016 at 6:37 a.m. CDT

10 Responses
Teemu Kääriäinen gravatar
Hi, when querying all users in Gluu 2.4.1, the response is roughly following: ``` {'Resources': [<some data here>], 'personList': [], 'resources': [<same data here>], 'schemas': ['urn:scim2:schemas:core:1.0'], 'totalResults': 2} ``` When querying all users in Gluu 2.4.3, the response is roughly following: ``` {'Resources': [<some data here>], 'personList': [], 'totalResults': 1} ``` The problem here is that Gluu 2.4.3 is missing the schemas element. It seems that this was removed with following commit: https://github.com/GluuFederation/oxTrust/commit/85d052b25346b8c70217e5446ae81644da093520 Is it possible to fix this so that the "schemas" element would be populated as defined in the SCIM specification: http://www.simplecloud.info/specs/draft-scim-api-01.html#query-resources

By Valentino Pecaoco user 28 Apr 2016 at 8:04 a.m. CDT

Valentino Pecaoco gravatar
Hi Teemu, Please post your client code so that we can check what's wrong. From the looks of it you are using media type of XML that is why you are getting a missing schema element. Can you try to use media type of JSON? SCIM's default supported media type is JSON and we might be phasing out XML support in SCIM 2.0 in the near future. Thanks.

By Teemu Kääriäinen user 02 May 2016 at 5:36 a.m. CDT

Teemu Kääriäinen gravatar
Hi, here is the sample request and response: ``` $ curl -v -k --header "Authorization: Bearer ********" https://********/identity/seam/resource/restv1/scim/v1/Users/ ... > GET /identity/seam/resource/restv1/scim/v1/Users/ HTTP/1.1 > Host: ******** > User-Agent: curl/7.45.0 > Accept: */* > Authorization: Bearer ******** > < HTTP/1.1 200 OK < Date: Mon, 02 May 2016 10:32:37 GMT < Server: Apache/2.4.7 (Ubuntu) < Location: https://********/identity/seam/resource/restv1/Users/ < Content-Type: application/json < Set-Cookie: JSESSIONID=********; Path=/identity/; Secure; HttpOnly;HttpOnly < Transfer-Encoding: chunked < {"totalResults":4,"Resources":[{"id":"********","externalId":"","userName":"admin","name":{"givenName":"Admin","familyName":"User","middleName":"","honorificPrefix":"","honorificSuffix":""},"displayName":"Default Admin User","nickName":"","profileUrl":"","emails":[],"addresses":[],"phoneNumbers":[],"ims":[],"photos":[],"userType":"","title":"","locale":"","password":"Hidden for Privacy Reasons","groups":[{"display":"Gluu Manager Group","value":"********"}],"roles":[],"entitlements":[],"x509Certificates":[],"meta":{"created":"","lastModified":"","version":"","location":""},"customAttributes":[]},{"id":"********","externalId":"","userName":"********","name":{"givenName":"********","familyName":"********","middleName":"","honorificPrefix":"","honorificSuffix":""},"displayName":"********","nickName":"","profileUrl":"","emails":[],"addresses":[],"phoneNumbers":[],"ims":[],"photos":[],"userType":"","title":"","locale":"","password":"Hidden for Privacy Reasons","groups":[{"display":"Gluu Manager Group","value":"********"}],"roles":[],"entitlements":[],"x509Certificates":[],"meta":{"created":"","lastModified":"","version":"","location":""},"customAttributes":[]},{"id":"********","externalId":"","userName":"********","name":{"givenName":"********","familyName":"********","middleName":"","honorificPrefix":"","honorificSuffix":""},"displayName":"********","nickName":"","profileUrl":"","emails":[],"addresses":[],"phoneNumbers":[],"ims":[],"photos":[],"userType":"","title":"","locale":"","password":"Hidden for Privacy Reasons","groups":[{"display":"Gluu Manager Group","value":"********"}],"roles":[],"entitlements":[],"x509Certificates":[],"meta":{"created":"","lastModified":"","version":"","location":""},"customAttributes":[]},{"id":"********","externalId":"","userName":"********","name":{"givenName":"********","familyName":"********","middleName":"","honorificPrefix":"","honorificSuffix":""},"displayName":"********","nickName":"","profileUrl":"","emails":[],"addresses":[],"phoneNumbers":[],"ims":[],"photos":[],"userType":"","title":"","locale":"","password":"Hidden for Privacy Reasons","groups":[{"display":"Gluu Manager Group","value":"********"}],"roles":[],"entitlements":[],"x509Certificates":[],"meta":{"created":"","lastModified":"","version":"","location":""},"customAttributes":[]}],"personList":[]} ``` As you can see, there is only totalResults, Resources and personList populated in the response, no schemas element.

By Valentino Pecaoco user 02 May 2016 at 7:48 a.m. CDT

Valentino Pecaoco gravatar
The SCIM endpoints are not tested on the `GET Accept:` header `*/*`, and we have not tried testing on `curl` as well. If you can, please use our officially-supported SCIM [client](https://github.com/GluuFederation/SCIM-Client).

By Teemu Kääriäinen user 03 May 2016 at 2:28 a.m. CDT

Teemu Kääriäinen gravatar
When adding `Accept: application/json` header, the `schemas` element is still missing. Our customer who reported this issue is using Python to integrate against the SCIM interface. They do not have the ability to use Java SDK for SCIM integration.

By Valentino Pecaoco user 03 May 2016 at 2:48 a.m. CDT

Valentino Pecaoco gravatar
Hi Shekhar, Could you please check this issue? This seems to be tied to a previous one: https://github.com/GluuFederation/oxTrust/commit/85d052b25346b8c70217e5446ae81644da093520 Thanks.

By Teemu Kääriäinen user 03 May 2016 at 2:50 a.m. CDT

Teemu Kääriäinen gravatar
Yes. This seems to be the commit that has caused the `schemas` element to disappear from the response. I linked this commit in my initial posting. I can patch the code manually and check if adding the `schemas` to `@XmlType` will restore the value to the JSON response.

By Shekhar L. staff 05 May 2016 at 2:51 p.m. CDT

Shekhar L. gravatar
Hi Teemu/ Valentino, I tested in our environment and I am getting the schema attribute in the response. And the changes u wrote above is for XML not for JSON, as you are calling the web service which only supports JSON format so the annotation @XmlType doesn't makes any difference.it only affects XML Type response. Thanks

By Valentino Pecaoco user 06 May 2016 at 7:43 a.m. CDT

Valentino Pecaoco gravatar
Hi Shekhar, I think you've tested with SCIM 2.0. In SCIM 1.1 (as Teemu was using) the `schemas` element was indeed missing. Thanks, Val

By Shekhar L. staff 11 May 2016 at 1:34 p.m. CDT

Shekhar L. gravatar
Hi Val/Teemu, The issue is fixed for SCIM 1 and it would be available in next release. Thanks.

By Valentino Pecaoco user 12 May 2016 at 12:03 a.m. CDT

Valentino Pecaoco gravatar
Thanks Shekhar, closing down this issue.