How to use different SSL Certificates for REST calls.

Document ID : KB000014878
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

REST step doesn't support SSL configuration in the current releases of DevTest. We configure the SSL certificate details in local.properties file but this option makes certificate information global. This article provides workarounds to achieve REST SSL functionality without the local.properties

Question:

How to configure different SSL certs for REST calls?

Environment:
All Supported DEVTEST environments.
Answer:

For REST GET and POST calls, SSL certificate details are configured in the local.properties file using the below properties. 

ssl.client.cert.path 
ssl.client.cert.pass 
ssl.client.key.pass 
ssl.client.alias 

Once we set the above properties, they become global and all REST, HTTP, Web Service calls are going to use them. This configuration conflicts, if different certs are needed for different calls.

To use multiple SSL certificates for different REST calls you would have to use either HTTP Step for REST GET calls or the WebServices Execution Step for REST POST calls.

The keystore files for the certificates should be stored in DevTest_HOME/projects/Data folder with subfolder as certificates. These keystore files should be .jks or  pkcs12.

Usage:

.  For REST GET Calls - Use the HTTP Request-httpGET  Step.  Https is specified as the protocol and the port and path are entered. Select the SSL Tab and configure  SSL keystore file details. 

2.  .  For POST Calls – Use the Web Service Execution(XML)  Step.  Use the ENDPOINT field for the https POST call. Under the Advanced Setting, select SSL Tab and configure SSL Keystore file details 

Additional Information:

. https://docops.ca.com/devtest-solutions/9-1/en/reference/test-step-descriptions/web-web-services-steps/web-service-execution-xml-step/advanced-settings#AdvancedSettings-SSLTab 

.https://docops.ca.com/devtest-solutions/9-1/en/reference/test-step-descriptions/web-web-services-steps/http-html-request-step#HTTP-HTMLRequestStep-SSLTab