It would be very useful if the expected response headers from REST-shim were configurable or if the REST-shim could include all response headers available in a response from a REST-api.
The only currently available response header in a status-document from the REST-shim is Content-Type.
A response from a REST API often contain more response headers then that, for example Content-Location and Location after a POST-request. This headers contain specific URL for the created entry in the REST-API and could be used partially or in whole from IDM.
Best regards,
Martin Svensson
by: Martin S. | over a year ago | Other
Comments
The Response headers should be available in the returned JSON payload of the operation data from shim so that they are accessible in the IDM policy.
This is what we get returned from shim:
[09/10/19 13:55:55.248]:Insight ST:SubscriptionShim.execute() returned:
[09/10/19 13:55:55.248]:Insight ST:
<nds dtdversion="3.0">
<source>
<product build="20180206_0824" version="1.0.0.2">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="iam1#20190910115554#1#1:a3e80c44-8bce-441c-94bb-440ce8a3ce8b" level="error" type="driver-general">
<driver-operation-data class-name="Practitioner" command="add" dest-dn="" event-id="iam1#20190910115554#1#1:a3e80c44-8bce-441c-94bb-440ce8a3ce8b">
<response method="post">
<url-token/>
<header content-type="application/fhir+xml;charset=utf-8"/>
<value message="OK" status="200"></value>
</response>
</driver-operation-data>
<operation-data association="" src-dn="\IDM_DEMO_TREE\data\users\U0000099"/>
</status>
</output>
</nds>
@Maqsood, you wrote in your community post that you did not get it to work?
https://community.microfocus.com/t5/Identity-Manager-User/NetIQ-REST-Driver-how-get-header-value-of-a-Query-Http-get/m-p/2696476#M43354
Or maybe that's another Maqsood? :)
Best regards
Marcus
It would be great to get all the response headers.
For example Okta will return the following on an empty search result:
--- snip ---
{
"errorCode": "E0000007",
"errorSummary": "Not found: Resource not found: <id> (User)",
"errorLink": "E0000007",
"errorId": "oaekJWXTQiDS3OheGv0_8B62w",
"errorCauses": []
}
--- snip ---
the shim returns this:
<status level='success' ...>
<driver-operation-data>
<result>
...
<value message="OK" status="200">[]</value>
...
</status>
Which is means that the query was a success, and a no result was returned. But we do not know why!
The result should reflect that actually data returned from a rest-end point.
Lack of response headers make it impossible to use the REST driver to integrate with Adobe IMS Cloud. It uses the headers as controls for all query responses.
See https://adobe-apiplatform.github.io/umapi-documentation/en/api/getUser.html for details.