Previous Topic: Transport ProtocolsNext Topic: IBM WebSphere MQ


HTTPS

Follow these steps:

  1. To start recording a new virtual service image, complete one of the following steps:

    The Virtual Service Image Recorder opens.

  2. Complete the Basics tab as in the following graphic:

    Image of the Basics tab on the Virtual Service Image Recorder for HTTPS transport protocol

  3. Click Next.

    The next wizard window opens.

  4. Enter the port and host information for this step.
    Listen/Record on port

    Defines the port on which the client communicates to DevTest. It is typical to select 8001, but you can use another port number.

    Target host

    Defines the name or IP address of the target host where the server runs. Leave blank if you are going to select a Proxy pass through style.

    Target port

    Defines the target port number listened to by the server. Leave this field blank if you will select a Proxy passthrough style.

    Defaults: 80 (HTTP) and 443 (HTTPS)

    Recorder pass-through style

    Specifies how the VS Image Recorder acts during recording. The choices are Gateway and Proxy. If you select Proxy, the contents in Target host and Target port fields are cleared and the fields become disabled. This choice affects how the client connects in the recording mode.

    • If VS Image Recorder listens in a gateway mode, the client must send HTTP requests directly to the recorder and not to the server. If the client is a browser, the URL contains the host and port of the recorder instead of the host and port of the server.
    • If VS Image Recorder listens in a proxy mode, the client must specify the recorder host and port as the proxy. If the client is a browser, then the URL contains the host and port of the server. The proxy settings must be set to route the request through the recorder.
    Most of the HTTP clients have a setting for NOT using proxy for localhost. If your VS Image Recorder is running on localhost in proxy mode, disable this setting for the traffic to get correctly passed through the recorder.
    Do not modify host header parameter received from client

    Specifies whether to pass through the value of the Host parameter. This option is only available when recording in Gateway mode. The pass-through option instructs the recorder not to rewrite the Host header parameter when resending traffic to the target endpoint.

    Use SSL to server

    Specifies whether DevTest uses HTTPS to send the request to the server.

    • Selected: DevTest sends an HTTPS (secured layer) request to the server.

      If you select Use SSL to server, but you do not select Use SSL to client, DevTest uses an HTTP connection for recording. DevTest then sends those requests to the server using HTTPS.

    Cleared: DevTest sends an HTTP request to the server.

    Use SSL to client

    Specifies whether to use a custom keystore to play back an SSL request from a client. This option is only enabled when Use SSL to server is selected.

    Values:

    • Selected: You can specify a custom client keystore and a passphrase. If these parameters are entered, they are used instead of the hard-coded defaults.

    Cleared: You cannot specify a custom client keystore and a passphrase.

    SSL keystore file

    Specifies the name of the keystore file.

    Keystore password

    Specifies the password associated with the specified keystore file.

    Note: For more information about configuring VSE in a two-way SSL environment, see Virtualizing Two-way SSL Connections.

  5. Click Next.

    The VS Image Recorder starts recording the traffic. The assigned port and service target display on this window.

  6. To send the requests to the server routed through the VS Image Recorder to start recording traffic, use your HTTP client.

    As the VS Image Recorder records transactions, the dynamic display statistics on the lower portion of the window increase. The options and dynamic display statistics include:

    Total conversations

    Displays the number of conversations recorded.

    Total transactions

    Displays the number of transactions recorded.

    Clear

    Clears the list of currently recorded transactions.

  7. When you have completed the recording, click Next to move to the next step.

    If you click Next and no transactions were recorded, an error message appears. Click OK to continue recording.

    Note: If the transactions are not recorded, you could have a port conflict. The client sends transactions to the application instead of the Virtual Service Recorder. If another service is using that port, either stop that service or change the port setting so there is no longer a conflict.

    The Transactions tab displays a list of the most recent transactions recorded. On this list of transactions, you can double-click a transaction and can see a dialog showing the content of the transaction.

  8. Verify the base path and update it if necessary.
  9. To require a bind-to-port step before processing requests, select the A separate bind-to-port step is required check box.
  10. Click Next.
  11. Do not select any value for the data protocol on the next window and click Next.
  12. If no conversations were detected during the recording process, select transactions that start conversations. For token-based conversations, specify where tokens can be found. Use the Token Identification area in the VS Image Recorder. Select the transactions that start conversations and identify the session tokens. To designate the getNewToken Conversation Starter Transaction listed as a conversation starter, select it and click the blue arrow.

    The step components include:

    Conversation Starter Transactions

    Lists the transactions that you have selected as conversation starters. To move the transaction to the Remaining Transactions list (if you do not want it to be a conversation starter), select a transaction and click the arrow.

    Remaining Transactions

    Lists the recorded transactions. To move the transaction to the Conversation Starter Transactions list, select a transaction and click the arrow.

    Plus icon

    Selects all transactions (either Conversation Starters or Remaining) in the list that are like a selected transaction. To move all the selected transactions, use the appropriate arrow button.

    Conversation count

    Displays the number of conversations in the recording. As you build conversations, the number increases.

    Force stateless

    From the Remaining Transactions list, select any transactions that should stay stateless and select the check box. For example, you could decide that a transaction that includes an image should stay stateless even though it contains a conversation starter token.

    Stateless Transactions

    Click to see a list of all transactions that remain stateless, assuming the identified conversations on this panel. You can use the list to verify that you have identified all the conversation starter transactions.

    Save

    Click to save the raw recorded transactions. Click Browse to navigate to the location in which to save the file. You can import the raw traffic recording in the Basics tab before beginning a new recording.

    Response

    For the currently selected transaction, this field identifies which of its responses to look in. In general, 1 is the only option.

    Look in

    This field identifies the piece of the response you want to see when looking for conversation tokens. The drop-down list contains an entry for each of Meta data entries in the response, plus one for the body of the response.

    Token Identification area

    Based on the selected transaction and response, the content of the selected Look in section of the response is displayed here.

    • To mark a piece of the text as a conversation token, select the text and click the red rubber stamp icon. The text is then highlighted in yellow.
    • To mark the text as no longer a conversation token, either mark a different piece of the text or click Erase.
    • After you mark a token, you can use the Search icon to find similar transactions and mark their tokens. To open a dialog where you can select text (such as XML tags) that bound the conversation token, click the Search icon. To specify the leading and trailing text to search for, use this method.
  13. Click Next.

    During postprocessing, the VS Image Recorder displays the processing status. As part of the preparation for writing the .vsi file, the recorder verifies request and response bodies to ensure that, if they are marked as text, that they are text. If they are not, the type is switched to binary.

    The recorder completes postprocessing the recording.

    Note: To save the settings on this recording to load into another service image recording, click Save Image of the Save icon above the Finish button.

  14. Click Finish to store the image.
  15. Review and save the virtual service model in DevTest Workstation.

Virtualize Two-way SSL Connections

To virtualize a two-way SSL connection, DevTest must have one of the following:

Both cases result in two keystores: one client keystore and one server keystore (or DevTest keystore).

Configure the SSL properties in the local.properties file, (in the installation directory) to use the client keystore as follows:

ssl.client.cert.path

Defines the path to your keystore; for example:

c:/mykeystore.jks.

ssl.client.cert.pass

Defines your keystore password.

ssl.client.key.pass

Defines your certificate password.

Start the VSE recorder and configure it to use two-way SSL. If you use a client and a server keystore, your recorder resembles the following graphic:

Screenshot of the VSI recorder port/server screen with parameters filled in for two-way SSL connections.

If you use a DevTest keystore instead of the actual server keystore, you do not need to provide the path to it. The DevTest keystore is used by default and you must configure your recorder similar to the following graphic:

Screenshot of the VSI recorder port/server screen with parameters filled in for two-way SSL connections.

The following diagrams illustrate one-way and two-way SSL virtualization.

Concept diagram of LISA two-way and one-way SSL.