Katalon WS API request with host, certificate and private key

HI,

Is there any way to set a host, certificate and private key file for WS API test object in Katalon?
In Postman those are in the Settings - Certificates
Host
CRT file
KEY file
Passphrase

Thank you.

Hi,

Mutual TLC is supported only in Enterprice version How to set a certificate for a API request :frowning:

image

This one?
Or that one that starts from a command line?

I have tried to solve the issue in the next way

add a key file here

import the .crt file here
…]Katalon_Studio_Engine_Windows_64-7.2.1\jre\lib\security\cacerts

ERROR: Can’t build keystore: [Certificate chain missing]

if I put the .crt file in the Project - Settings - Network - Keystore
and add something like this to a test case
System.setProperty(‘javax.net.ssl.trustStore’, GlobalVariable.ssl_key_file)
System.setProperty(‘javax.net.ssl.trustStorePassword’, GlobalVariable.ssl_key_pathphrase)
request_result = WS.sendRequest(findTestObject(‘API/connection_check’), FailureHandling.STOP_ON_FAILURE)

I will get the next
ERROR: Can’t build keystore: [Private key missing (bad password?)]

Hi @Vitallica,
Please generate a KeyStore file from your cert file and key file, then apply it to client certificate settings. Please follow the documentation here https://docs.katalon.com/katalon-studio/docs/execution-settings.html#client-certificate-settings

Thanks, I will try

Is there any chance to set the KeyStore path as a variable?
The Katalon documentation said:
Katalon Studio can be configured to use the Client Certificate for all requests. To sign all the requests from Katalon Studio, specify the full path to your KeyStore file and the KeyStore Password. The recommended key store format is PKCS #12 (.p12).
My company has different environments and keys respectively, so it is really annoying process to change the path every time in the Project Settings Network.

It would be much easier if the path set in the Profile and use a variable in the Network KeyStore.

Thanks.