This chapter describes two ways to run server-side simulation with a self-signed certificate.

Prerequisites

  • The self-signed certificate used for server-side simulation must be generated for the IP (or hostname) of the machine where Web Application Platform is located. This is necessary because Web Application Platform (and not Teamwork Cloud) is called when connecting to the server. Therefore, if Teamwork Cloud is deployed on a different server, do not use the same certificate for both Teamwork Cloud and Web Application Platform.
  • The certificate file must be in the .pem format.


To run server-side simulation with SSL


  • Do one of the following:
    • Use the following request to connect to Web Application Platform and provide the path to the certificate file:

      In the request, make sure to provide the IP or hostname for which the certificate was generated.

      client = SimulationWebClient('<WebApp_server_IP_or_hostname>', '<user_name>', '<password>', verifySSL='<path_to_certificate_file>')
    • Add the self-signed certificate to the Python trusted certificates list by completing the following steps:
      1. In Jupyter Notebook, execute the following commands to find the path, where the cacert.pem file of trusted certificates is located:

        import certifi
        print(certifi.where())
      2. Open the certificate file with a text editor and copy all information inside the file.
      3. Open the cacert.pem file with a text editor and paste the copied information at the end of the file, as shown below.



      4. Use the following request to connect to Web Application Platform:

        In the request, make sure to provide the IP or hostname for which the certificate was generated.

        client = SimulationWebClient('WebApp_server_IP_or_hostname>', '<user_name>', '<password>', verifySSL=True)