Summary
Error responses returned by the Wire SCIM server are wrapped in an extra layer of JSON that does not conform to the SCIM protocol specification. The server returns {code, label, message: <SCIM-Error-JSON>} instead of the standard SCIM Error object defined in RFC 7644.
We use python-scim for communication with the SCIM server, which by default is very strict and validates all data against the schemas.
Expected behavior
Per RFC 7644 Section 3.12, error responses MUST be returned directly in the following JSON format using the schema URI urn:ietf:params:scim:api:messages:2.0:Error:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"detail": "Human-readable error message",
"status": "400"
}
The RFC defines exactly three attributes for error responses:
- status (REQUIRED): The HTTP status code as a JSON string
- scimType (OPTIONAL): A SCIM detail error keyword
- detail (OPTIONAL): A detailed human-readable message
Actual behavior
The Wire SCIM server wraps the SCIM error response in an additional JSON object:
{
"code": 400,
"label": "scim-error",
"message": "{\"detail\":\"Could not process externalId. Please check: (1) does the scim user contain a valid email address? (2) did you associate your scim token with a SAML IdP in wire?\",\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:Error\"],\"scimType\":\"invalidValue\",\"status\":\"400\"}"
}
Key issues:
- The response uses
code instead of status, message instead of detail
- An extraneous
label field is included
- The actual SCIM Error object is double-encoded as a JSON string in the
message field
- The
schemas attribute is at the wrong level
Screenshots
N/A
Additional context
Summary
Error responses returned by the Wire SCIM server are wrapped in an extra layer of JSON that does not conform to the SCIM protocol specification. The server returns
{code, label, message: <SCIM-Error-JSON>}instead of the standard SCIM Error object defined in RFC 7644.We use python-scim for communication with the SCIM server, which by default is very strict and validates all data against the schemas.
Expected behavior
Per RFC 7644 Section 3.12, error responses MUST be returned directly in the following JSON format using the schema URI
urn:ietf:params:scim:api:messages:2.0:Error:{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "detail": "Human-readable error message", "status": "400" }The RFC defines exactly three attributes for error responses:
Actual behavior
The Wire SCIM server wraps the SCIM error response in an additional JSON object:
{ "code": 400, "label": "scim-error", "message": "{\"detail\":\"Could not process externalId. Please check: (1) does the scim user contain a valid email address? (2) did you associate your scim token with a SAML IdP in wire?\",\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:Error\"],\"scimType\":\"invalidValue\",\"status\":\"400\"}" }Key issues:
codeinstead ofstatus,messageinstead ofdetaillabelfield is includedmessagefieldschemasattribute is at the wrong levelScreenshots
N/A
Additional context