Set up Http Clients in Identity Manager
This article is added for Identity manager 5.0.1.
This article describes how to set up and configure an Http Client in Identity Manager Admin. You can use this as a task in a process where values from the process map configure the request and from the response values can be extracted to be written in the process map.
To set up Http Clients, you must log in to Identity Manager Admin as an admin
user.
Set up an Http Client
Create Http client
To configure an Http Client, do the following:
In the menu, go to Http Clients and click +New.
Insert a Name and click Save + Edit.
Edit the name (optional) and enter the Base URL and endpoint of the external system that you want to reach.
Configure the Authentication on the Authentication tab.
Modify any settings on Query and Headers tabs that will be valid for all endpoints.
Click Save.
On the Endpoints tab, click Add.
Enter a name for the endpoint, specify the Http Method to get, send, update, and delete data . and set the endpoint.
Configure the Endpoint Request, Query-Parameters, Headers, and Response Extractions as explained below.
Use the Test Tab to test your endpoint.
Click Save.
Click on the info button to get context-sensitive help, for example, on how to write the correct expression or how to configure the certificate authentication.
Depending on the selected action, you can modify and configure the settings, for example, the request to send data. You can modify settings on:
Request: To specify what the clients should do, such as update data, retrieve data, or perform another action. An Http request includes more information, for example, the request body. You can select the request type (for example, JSON, XML, Multipart, Form URL Encoded, or Plain Text) and enter the request body or configure the data into the field according to the request type.
Authentication: Set the process of verifying the identity of a client. You can set the authentication type, either Certificate or Basic Auth.
Query: Adding query parameters is a way to include additional data in the URL of an Http request. The parameters are used for filtering, sorting, or customizing the results of a request. You can add attributes to the table and see the last preview of the request URL in this tab.
Headers: To provide metadata associated with both the request and response, you can add attributes to the table. This information helps the client and server understand how to handle data and the request and response.
Response: A message sent by the server to the client in reply to a request and contains the requested data or information about the success or failure of the requested operation. To extract data from the response, add attributes to the table. Click on the info button to get context-sensitive help, for example, on how to write the correct expression or how to configure the certificate authentication.
Tests: Test your Http Client to verify that your configuration is correct. To enable test, enter the needed variables.
Endpoint and Collection
If parameters are set on the parent level (=Collection) they are also shown on the corresponding endpoint Tab.
You can deselect values passed down from the Collection so that they are not used on that endpoint.
If a parameter with the same name is set on the collection and on the endpoint, the value on the endpoint is used.
Use an Http Client in a process
Configure the Http client
Before you start, make sure that you configured the Start Process item in the Permissions tab.
In Identity Manager Admin, go to Home > Processes.
Do one of the following:
To edit an existing process, double-click on its name.
Click +New.
In BPMN Editor tab, add a Service Task and configure it:
In the panel located on the right under “Implementation” as “Nexus service type”.
In Task List tab.
Select Http Client Task.
In Task List tab, select the Http Client configuration from the “Attributes” field.
Click Save.
The task can now be executed in Smart ID Self-Service or in Smart ID Operator.
Debug Http requests
Log4j configuration
You might receive a bad status code after the configuration of the Http Client. To debug the configuration, you can change the logging level of the Http Client library.
In the Identity Manager deployment, open the WEB-INF/classes/log4j2.mxl file.
Add the following logger:
io.ktor.client
<Logger name="io.ktor.client" level="info" additivity="false">
<AppenderRef ref="ACT_RF"/>
<AppenderRef ref="STDOUT"/>
</Logger>
If you need to debug the Certificates authentication, you can add the VM Option "-Djavax.net.debug=all" to your JVM.
For more information, see Configure Log4j2 for Identity Manager.