How to handle Multiple SSL Certificates conflicts  for Restful Services

Document created by abrsh01 Employee on Aug 16, 2017
Version 1Show Document
  • View in full screen mode

Question

We used to pass the SSL certificate details in local.properties file. But there is multiple type of SSL certificates which we need to use in same DevTest project. How can we do that ? 

Environment

All Supported DEVTEST environments.

 

Answer

By design,  for REST  GET and POST services  we configure the SSL  certificate details in local.properties file using the properties below. 

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

Once set, this property is global to all the REST services. This configuration can be a conflict to other REST services with different SSL certs. 

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

The keystore files for those certificates can be stored in  projects Data folder with subfolder as certificates. These keystore files are .jks or  pkcs12 keystores.

Usage:

  1. For 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 to configure  SSL keystore file details. 

 

  1. 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 to Configure SSL Keystore file details 

Additional Information

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

Attachments

    Outcomes