Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2022.1

...

You will need the host, port, and path of the service you are targeting in order to set up basic HTTP connection options. Use the settings you would normally use to directly message the service. 

Anchor
ConnectionSettings
ConnectionSettings
Connection Settings

To specify basic HTTP Reverse proxy connection options, set the following service and listening details in the Proxy Settings Connection tab.

Image RemovedImage Added

Proxy Settings (incoming) 

...

Scroll Table Layout
widths30%,70%

ListenerReverse Proxy

You can choose an a Reverse Proxy HTTP listener Listener that you defined when creating the proxy (see Creating Proxies) from the drop-down menu or use the default listener.

You can also add Reverse Proxy HTTP listeners Listeners from this dialog:

  1. Click New and and specify a name for the listener.
  2. Click Add Port and enter a port number. You can enable the message proxy to automatically assign a port by specifying 0 as the port number. When the proxy is enabled, the assigned port number will appear in the console. The port is randomly assigned every time the message proxy is changed/enabled. You can also send a GET request to the messageProxies API endpoint to return the automatically-assigned port number. See Creating and Modifying Assets through the REST API for additional information.  
  3. If the client sends traffic over SSL, enable the Secure option and enable your verification options. See SSL Settings for Reverse Proxy Listener Ports for details.
  4. Click OK to exit the port editor.
  5. Click Add to to add additional ports to the listener or proxy or OK again again to finish adding the listenerproxy.
Proxy listen path

Enter the path where the proxy should listen for incoming connections. To listen to all paths, select "[All]" from the drop-down menu.

No two message proxies can have HTTP proxy connections with the same proxy path or with a path that matches an existing virtual asset’s HTTP path.

See Service Forward Path and Proxy Listen Path for more details.

Proxy URL

Displays the URL that should be given to the AUT.See Directing AUTs to Proxies for additional information.

...

Service URLContains the full URL for the target application (comprising the service host, service port, and forward path). You can enter a complete URL here and/or edit specific components in the following fields. Updates made in one area will be propagated to the other (e.g.for example, if you modify the port in the URL, the value in the Service port field will be updated automatically). 
Service host

Enter the host name of the machine where the service resides. This is the machine to which the proxy will send messages.

If you want the proxy to forward to a virtual asset on the local server without consuming an HTTP connection, enter host.virt.internal, localhost, or 127.0.0.1 rather than the actual hostname. When using localhost or 127.0.0.1, the service port must match the port Virtualize is deployed on; when using host.virt.internal the service port is not used. For example, a virtual asset deployed on http://localhost:9080/myVirtualAsset can also be reached using http://host.virt.internal/myVirtualAsset.

Service portEnter the port where the service is listening. This is the port to which the proxy will send messages.
Service forward path

(Optional) Enter the path to which the proxy should forward the messages that it receives. If blank, this defaults to the value in the Proxy listen path field.

If the HTTP proxy is sending messages to messages localhost, you must enter a Service forward path because the proxy doesn't allow forwarding to itself. 

If the Service forward path sends a redirect, the proxy will follow the redirect and then respond back. It will not pass the redirect back to the client.

See Service Forward Path and Proxy Listen Path for more details.

...

The Service SSL section needs to be completed only if the service you are working with uses SSL.

Image RemovedImage Added

If the service being virtualized and/or the application under test uses SSL and/or other authentication (basic/digest, Kerberos, NTLM), additional configuration may be required.

...

To specify proxy settings at this level, provide the appropriate details in the proxy’s Proxy Server tab. 

Image RemovedImage Added

SSL is not supported. 

...

You can create a properties file to configure additional Reverse Proxy HTTP listener Listener settings. The properties file allows you to fine-tune Reverse Proxy HTTP listener Listener performance and specify additional SSL settings.

  1. Create a plain text file and specify the properties you want to set (see Reverse Proxy HTTP Listener Message Proxy Performance Properties and Reverse Proxy HTTP Listener Message Proxy SSL Properties). 
  2. Save the file to the VirtualAssets or TestAssets directory in your workspace and name it embeddedServer.properties.

The file will be read every time a proxy with a Reverse Proxy HTTP listeners Listener is enabled.

Reverse Proxy HTTP Listener

...

Properties

Scroll Table Layout
widths40%,60%

embedded.connector.maxHttpHeaderSizeSpecify the maximum size of the request and response HTTP header (bytes). If not specified, this attribute is set to 8192 (8 KB).
embedded.connector.relaxedPathChars

Specify characters that should be allowed in URI paths in unencoded form. The value may be any combination of the following characters:

" < > [ \ ] ^ ` { | }

Any other characters present in the value will be ignored. If this property is not included, Tomcat will reject unencoded forms of the above characters in URI paths.

Refer to the Tomcat documentation for additional information: https://tomcat.apache.org/tomcat-8.5-doc/config/http.html.

embedded.connector.relaxedQueryChars

Specify characters that should be allowed in URI queries in unencoded form. The value may be any combination of the following characters:

" < > [ \ ] ^ ` { | }

Any other characters present in the value will be ignored. If this property is not included, Tomcat will reject unencoded forms of the above characters in URI queries.

Refer to the Tomcat documentation for additional information: https://tomcat.apache.org/tomcat-8.5-doc/config/http.html.

Reverse Proxy HTTP Listener Message Proxy Performance Properties

All properties are optional and non-integer values will be ignored.

...

embedded.connector.maxThreads

Specify the maximum number of request-processing threads the connector should create. This property determines the maximum number of simultaneous requests that can be handled. Default is 200.

embedded.connector.minThreads

Specify the minimum number of threads that should always be running. Default is 10.

embedded.connector.acceptors

Specify the number of threads that should be used to accept connections. Increase this value on machines with multiple CPUs or when you are using several non-keep-alive connections.1 or 2 is adequate in most cases. Default is 1.

embedded.connector.idleTimeoutSpecify how many milliseconds the connector should wait for another HTTP request before closing the connection. Specify -1 to allow the connector to wait indefinitely. Default is use connectTimeout.
embedded.connector.soLingerTime

Specify how many milliseconds the sockets used by the connector should linger when the sockets are closed. Lingering is disabled by default.

embedded.connector.acceptorPriorityDeltaSpecify the priority of the acceptor threads used to accept new connections. See the java.lang.Thread JavaDoc for additional details. Default is 5.
embedded.connector.acceptQueueSize

Specify the maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is at capacity will be refused. Default is 100.

embedded.connector.connectTimeoutSpecify how many milliseconds the connector should wait for the request URI line to be presented after accepting a connection. Enter -1 to allow the connector to wait indefinitely. Default is 60000.

Reverse Proxy HTTP Listener Message Proxy SSL Properties

Scroll Table Layout
widths40%,60%

...

Assume that we want to create a message for a service that is normally accessed at http://example.parasoft.com:9080/BookStore. We could create an HTTP Reverse proxy with the settings: 

  • Proxy listen path: /BookStore
  • Service host:example.parasoft.com
  • Service port: 9080
  • Service forward path: [empty]
    Image RemovedImage Added

This configuration will listen on /BookStore and forward all traffic to the actual book store service.

If we wanted to listen on a path other than the service path, we would configure change the configuration of the proxy as follows:

  • Service forward path: /BookStore
  • Proxy listen path: /SomeOtherPath
    Image RemovedImage Added

This would route traffic from /SomeOtherPath on the proxy to the actual book store service. 

...

Code Block
X-AUTHORIZATION
ANOTHER-HEADER
HEADER3

Example: Sending Traffic to a Virtual Asset

A proxy can also send traffic to a virtual asset. In that case, enter the host and port information for the Virtualize Server as if were just another service.

For example, to send traffic to a virtual asset on a remote server, you might use: 

  • Proxy listen path: /path
  • Service host: virtualize.parasoft.com
  • Service port: 9080
    Proxy listen path: /path
    Image RemovedImage Added

To send traffic to a virtual asset on a local server, you might use:

  • Service host: localhost [Virtualize]
  • Service port: 9080Service forward path:  /pvapath
    Image RemovedImage Added

The HTTP Reverse proxy makes no distinction between a virtual asset and an actual service. Both are configured the same way. However if the HTTP Reverse proxy is sending to localhost, you must specify specify Service forward path because the proxy doesn't allow forwarding to itself.

...

Additionally, you need to provide the information needed to use a specific key store and certificate so Parasoft can determine which certificate to present to a server (e.g., for 2-way SSL).

Image RemovedImage Added

SSL Configuration Panel Fields

...

If your service requires NTLM authentication, provide the username/password in the NTLM section.

Image RemovedImage Added

Anchor
Kerberos Authentication
Kerberos Authentication
Kerberos Authentication

...