Skip to main content
Skip table of contents

Set up Http Clients in Identity Manager

This article includes updates for Smart ID 23.10.5.

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:

  1. In the menu, go to Http Clients and click +New.

  2. Insert a Name and click Save + Edit.

  3. Edit the name (optional) and enter the Base URL and endpoint of the external system that you want to reach.

  4. Configure the Authentication on the authentication tab.

  5. Modify any settings on Query and Headers tabs that will be valid for all endpoints.

  6. Click Save.

  7. On the Endpoints tab, click Add.

  8. Enter a name for the endpoint, specify the Http Method to get, send, update, and delete data and set the endpoint.

  9. Configure the Endpoint Request, Query-Parameters, Headers, and Response Extractions as explained below.

  10. Use the Test Tab to test your endpoint.

  11. 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

  1. In Identity Manager Admin, go to Home > Process Designer.

  2. Do one of the following:

    1. To edit an existing process, double-click on its name.

    2. Click +New.

  3. On the Task List Tab, click the plus sign to add a new task.

  4. Select Http Client Task.

  5. Select the Http Client configuration.

  6. Click Save.

The process 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.

  1. In the Identity Manager deployment, open the WEB-INF/classes/log4j2.mxl file.

  2. Add the following logger: 

io.ktor.client
XML
<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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.