Create virtual Service using Lisa-Virtualize-invoke with Https
search cancel

Create virtual Service using Lisa-Virtualize-invoke with Https

book

Article ID: 240397

calendar_today

Updated On: 05-13-2024

Products

Service Virtualization

Issue/Introduction

Trying to create a Virtual service using Lisa-Virtualize-invoke with HTTPS.
Successfully created service for HTTP but to create HTTPS where to give path of the certificate ?

Environment

All supported DevTest releases.

Cause

N/A

Resolution

Documentation shows the sample JSON

Create a Virtual Service
POST /vses/{vseName}/services

Below are two examples JSON:
Example 1:

{
        "virtualService": {
                "version": "2",
                "name": "swaggertest273a2",
                "description": "Invoke API V3",
                "status": "",
            
                "capacity": "1",
                "thinkScale": "200",
                "autoRestart": "false",
                "startOnDeploy": "true",
                "groupTag": "test"  
    },
      "transportProtocol": {
                "typeId": "HTTP",
              "basePath": "/",
              "useGateway": true,
              "hostHeaderPassThrough": false,
              "recordingEndpoint": {
                      "useSSL": true,
                    "host": "",
                    "port": "28654",
                    "sslConfig": {
                             "keystoreFile": "/Applications/CA/DevTest107/webreckeys.ks",
                            "keystorePassword": "passphrase",
                            "alias": "lisa",
                            "aliasPassword": "passphrase"        
            }
                 
        }
         
    },
      "dataProtocol": {
                "forRequest": true,
              "typeId": "RESTDPH"  
    }
}

Example 2:
{
    "virtualService": {
        "version": "3",
        "name": "accounts1",
        "description": "{{vserviceName}} by Invoke API V3",
        "status": "",
        "groupTag": "Accounts-Risk"
    },
    "transportProtocol": {
        "typeId": "HTTP",
        "basePath": "/",
        "useGateway": true,
        "hostHeaderPassThrough": false,
      "recordingEndpoint":{  
         "useSSL": true,
         "host":"",
          "port":"10654",
         "sslConfig":{  
            "keystoreFile":"C:/PROGRA~1CA/DevTest/webreckeys.ks",
            "keystorePassword":"passphrase",
            "alias":"lisa",
            "aliasPassword":"passphrase"
         }
    }
    },
    "dataProtocol" : {
        "forRequest":true,
        "typeId":"RESTDPH"
    },
}

The SSL Config is the key!
(SSLCOnfig should work but the key is that the path mentioned should be of VSE server not the machine where the call is being made) 

NOTE:  this DOES NOT WORK for v3 API creation using VSM/VSI only for RR Pairs / SWAGGER, WSDL, etc.