Generic HTTP transfer sites

The Generic HTTP transfer site enables file exchange via HTTP protocol with third-party partners over an authenticated connection.

The supported authentication methods are:

  • Basic - The client provides a user ID or user ID and password when exchanging files.
  • Form-Based – The client will send a request to a remote HTTP server to obtain an authentication cookie.
  • Certificate – A HTTPS client certificate is used for mutual authentication. The client certificate can be used in combination with basic or form-based authentications.

The Generic HTTP transfer site can be used with the Basic and Advanced Routing applications for push and pull server-initiated transfers.

The following sections describe the Generic HTTP transfer site configuration options, provide basic sample push and pull flow configurations for Generic HTTP transfer sites, and information on the limited expression language supported by Generic HTTP transfer sites:

Configuration options

Configuring a Generic HTTP transfer site consists of making selections and completing fields for the following:

Server settings

The following table describes the server settings for defining a Generic HTTP transfer site.

Field Description
Server Settings
Specify partner using hostname (IP address) and port number When selected, the partner will be specified using the partner hostname and port number.
Host The host name or IP address of the remote host to connect to for file transfers.
Port The port on the remote host to be used for file transfers.
Specify partner using URL When selected, the partner will be specified using an URL.
Address

A URL that specifies the partner host. It can also include the port and a directory.

Examples:

  • http://example.com
  • https://example.com:443
  • https://example.com:443/websealjun/
Zone

The network zone that defines the proxies to use for transfers through this site.

  • Select none to connect directly to the remote HTTP server.
  • Select any to allow SecureTransport to select the proxy connection using a network zone that enables an HTTP proxy.
  • Select Default to use the default network zone proxy configuration. If no default is network zone is defined, transfers from this transfer site fail.
  • Select a specific network zone to use the proxy configuration defined for that zone.

For more information, see Specify TM Server communication ports and IP address for protocol servers on SecureTransport Edge.

Transfer settings

The following table describes the transfer settings for defining a Generic HTTP transfer site.

Field Description
Transfer Settings
Use HTTPS

A check box indicating if the connection should be secured or not.

Deselect this check box to use HTTP instead of HTTPS.

Verify certificate for this Site

Select to verify that the remote system is trusted. This field is displayed when Use HTTPS is selected.

Enable FIPS Transfer Mode

Restrict HTTPS to use only FIPS 140-2 Level 1 certified cryptographic libraries. This field is displayed when Use HTTPS is selected.

The sender and the recipient must use the ciphers and ciphers suites listed in FIPS transfer mode. If the sender and the recipient do not provide the required ciphers and ciphers suites SecureTransport does not complete the transfer.

List settings

The following table describes the list settings for defining a Generic HTTP transfer site.

Field Description
List
List settings
Enable list A check box indicating if the Generic HTTP transfer site will operate in the single file download mode or will list files and then perform the download operation(s). If checked, the Generic HTTP transfer site will take as an input the result of the configured request and use it as a source for retrieving a list of files to be downloaded. It will then will use the File download settings to download each file from the list.
URL path

The HTTP server path that will be used to list files on the remote server:

  • A server absolute path when the partner is specified using a hostname (IP address) and port number.
  • Example:
  • /list.php
  • A server relative path when the partner is specified using an URL.
  • Example:
  • list.php

The limited expression language can be used to specify the URL.

Example:

If the value in Specify partner using URL is https://‹host›:‹port›/downloads/ and the value for URL path is /list.php, the final URI that will be resolved is https://‹host›:‹port›/list.php. This occurs because /list.php is an absolute path and not a relative path. If the value for URL path is list.php, the final URI that will be resolved is https://‹host›:‹port›/downloads/list.php.

This field is displayed when Enable list is checked.

File expression

The expression for the file names that will be applied on the response for the list request to extract the files list. A Java regular expression and the SecureTransport expression language can be used to specify a pattern to match the files that need to be downloaded.

It is possible to use () parenthesis in the file expression and everything within the parenthesis will be considered the file name.

Example:

Filename= (/something/folder/file\\d.txt)

If they are not used, the matched expression will be the file name.

The limited expression language can be used to specify the file name.

This field is displayed when Enable list is checked.

Method

The HTTP method to be used for listing the files on the remote server. Either GET or POST can be selected.

This field is displayed when Enable list is checked.

Headers

The HTTP headers that will be added in the HTTP request for listing files on the remote server.

To add a header, click Add Header and complete the Header and Value fields.

To edit a header, click the Edit () icon and change the Header and Value fields.

To delete a header, select the header to delete and click Delete.

This Header option is displayed when Enable list is checked.

Body

The body of the request for listing files on the remote server. This field is displayed when the selected list Method is POST.

The limited expression language can be used to specify the file name.

The body can be any of the following types:

  • form-data - When selected the body will be transmitted as multipart/form-data.
  • form-urlencoded - When selected the body will be transmitted as application/x-www-form-urlencoded.
  • raw – When selected the body can be any text.
Note When the selected body content type is form-data or form-urlencoded the body should be formed of key-value pairs on separate lines. Example:
param1=value1
param2=value2

This field is displayed when Enable list is checked and POST is the selected Method.

File download settings

The following table describes the file download settings for defining a Generic HTTP transfer site.

Field Description
File download
File download settings
URL path

The HTTP server path used to download file(s):

  • A server absolute path when the partner is specified using a hostname (IP address) and port number.
  • Example:
  • /download.php
  • A server relative path when the partner is specified using an URL.
  • Example:
  • download.php

If Enable list is checked, this URL will be used to download file(s) extracted from the list operation.

The limited expression language can be used to specify the URL.

The available environment variables are:

  • ${env['ts_relative_path']}- The relative path of the file that will be downloaded.
  • ${env['ts_target']} - The file name of the file that will be downloaded.

Example:

If the value in Specify partner using URL is https://‹host›:‹port›/downloads/ and the value for URL path is /download.php, the final URI that will be resolved is https://‹host›:‹port›/download.php. This occurs because /download.php is an absolute path and not a relative path. If the value for URL path is download.php, the final URI that will be resolved is https://‹host›:‹port›/downloads/download.php.

Method The HTTP method to be used for the file download operation. Either GET or POST can be selected. If Enable list is checked, this method will be used when performing all download operations for the files listed on the remote server.
Headers

The HTTP headers that will be added in the HTTP download request. If Enable list is checked, these headers will be added in the all HTTP download requests for the files listed on the remote server.

To add a header, click Add Header and complete the Header and Value fields.

To edit a header, click the Edit () icon and change the Header and Value fields.

To delete a header, select the header to delete and click Delete.

Body

The body of the download request. This field is displayed when the selected download Method is POST. If Enable list is checked, the body will be added in the all HTTP download requests.

The limited expression language can be used to specify the body.

The body can be any of the following types:

  • form-data - When selected the body will be transmitted as multipart/form-data.
  • form-urlencoded - When selected the body will be transmitted as application/x-www-form-urlencoded.
  • raw – When selected the body can be any text.

The available environment variables are:

  • ${env['ts_content-disposition']} - The value of the content disposition header presented from the remote HTTP server (if available).
  • ${env['ts_relative_path']} - The relative path of the file that will be downloaded.
  • ${env['ts_target']} - The file name of the file that will be downloaded.
Note When the selected body content type is form-data or form-urlencoded the body should be formed of key-value pairs on separate lines. Example:
param1=value1
param2=value2

Receive actions

The following table describes the receive actions for defining a Generic HTTP transfer site.

Field Description
Receive actions
Receive File As

Select the check box to enable renaming the received file and to specify a value to be used to rename the file.

The limited expression language can be used to specify the file name.

Examples:

  • ${env['ts_content-disposition']}
  • ${env['ts_relative_path']}
  • ${env['ts_target']}
  • ${env['ts_target']}_${random()}
  • ${date('yyyyddMMHHmmss')}

The available environment variables are:

  • ${env['ts_content-disposition']} - The value of content disposition header presented from the remote HTTP server (if available).
  • ${env['ts_relative_path']} - The relative path of the file that will be downloaded.
  • ${env['ts_target']} - The file name of the file that will be downloaded

Upload settings

The following table describes the upload settings for defining a Generic HTTP transfer site.

Field Description
Upload
Upload settings
URL path

The HTTP server path to be used for uploading files to the remote server:

  • A server absolute path when the partner is specified using a hostname (IP address) and port number.
  • Example:
  • /upload.php
  • A server relative path when the partner is specified using an URL.
  • Example:
  • upload.php

The limited expression language can be used to specify the URL.

The available environment variable is:

  • ${env['ts_target']} - The file name of the file that will be uploaded.

Example:

If the value in Specify partner using URL is https://‹host›:‹port›/uploads/ and the value for URL path is /upload.php, the final URI that will be resolved is https://‹host›:‹port›/upload.php. This occurs because /upload.phpt is an absolute path and not a relative path. If the value for URL path is upload.php, the final URI that will be resolved is https://‹host›:‹port›/uploads/upload.php.

Method

The HTTP method used when uploading files to a remote server. Either PUT or POST can be selected.

This field is displayed when Enable list is checked.

Headers

The HTTP headers that will be added in the HTTP request for upload.

To add a header, click Add Header and complete the Header and Value fields.

To edit a header, click the Edit () icon and change the Header and Value fields.

To delete a header, select the header to delete and click Delete.

Body

The body of the request for uploading files on the remote server. This option is displayed when the selected upload Method is POST.

The limited expression language can be used to specify the body.

The available environment variables are:

  • ${env['ts_target']} - The file name of the file that will be uploaded.
  • ${env['ts_file_form_parameter_name']} - The name of the form input element with file type on the remote server.

The body can be of the following type:

  • form-data – When selected the body will be transmitted as a multipart/form-data.
Note The body should be formed as key-value pairs on separate lines. Example:
param1=value1
param2=value2

Example of how to use the environment variables in the body:

filename=${env['ts_target']}

${env['ts_file_form_parameter_name']}=myDoc

Send actions

The following table describes the send actions for defining a Generic HTTP transfer site.

Field Description
Send actions
Send File As

Select the check box to send the file with a different name and specify the file name.

The limited expression language can be used to specify the file name.

The available environment variable is:

  • ${env['ts_target']} - The file name of the file that will be sent.

Examples:

  • ${env['ts_target']}
  • ${env['ts_target']}_${random()}
  • ${date('yyyyddMMHHmmss')}

Login settings

The following table describes the login settings for defining a Generic HTTP transfer site.

Field Description
Authentication
Login Settings
Client Certificate
Certificate The client certificate to be used for mutual authentication.
Basic authentication settings
User name The user name to be used to log into a remote HTTP server.
Use Password

Select to use a password to log into the remote HTTP server.

Disabled when Form authentication is selected.

Password

Password used to log into the remote HTTP server.

Disabled when Form authentication is selected.

Form authentication

Select to use form authentication. If Form authentication is enabled, the transfer site will use form authentication to connect to the remote HTTP server.

If username and password in the Basic authentication settings pane are set, they will be mapped to the environment variables ${env['ts_form_auth_username']} and ${env['ts_form_auth_password']} and can be used in the body of the form authentication request.

Form authentication settings
URL path

The HTTP server path used for sending the form authentication request:

  • A server absolute path when the partner is specified using a hostname (IP address) and port number.
  • Example:
  • /form.php
  • A server relative path when the partner is specified using an URL.
  • Example:
  • form.php

The limited expression language can be used to specify the URL.

Example:

If the value in Specify partner using URL is https://‹host›:‹port›/auth/ and the value for URL path is /form.php, the final URI that will be resolved is https://‹host›:‹port›/form.php. This occurs because /form.php is an absolute path and not a relative path. If the value for URL path is form.php, the final URI that will be resolved is https://‹host›:‹port›/auth/form.php.

This field is displayed when Form authentication is checked.

Method

The HTTP method to be used for the form authentication to the remote server. Either GET or POST can be selected.

This field is displayed when Form authentication is checked.

Headers

The HTTP headers that will be added in the HTTP request for form authentication.

To add a header, click Add Header and complete the Header and Value fields.

To edit a header, click the Edit () icon and change the Header and Value fields.

To delete a header, select the header to delete and click Delete.

Displayed when Form authentication is checked.

Body

The body of the form authentication request. This field is displayed when the selected authentication Method is POST.

The limited expression language can be used to specify the body.

The available environment variables are:

${env['ts_form_auth_username']} - Represents the user name specified in the Basic authentication settings pane.

${env['ts_form_auth_password']} - Represents the password specified in the Basic authentication settings pane.

The body can be any of the following types:

  • form-data – When selected the body will be transmitted as multipart/form-data.
  • form-urlencoded – When selected the body will be transmitted as application/x-www-form-urlencoded.
  • raw – When selected the body can be any text.
Note When the selected body content type is form-data or form-urlencoded the body should be formed as key-value pairs on separate lines.
Example:
param1=value1
param2=value2

Example of how to use the environment variables in the body:

user=${env['ts_form_auth_username']}

password=${env['ts_form_auth_password']}

This field is displayed when Form authentication is checked.

Advanced settings

The following table describes the advanced settings for defining a Generic HTTP transfer site.

Field Description
Advanced settings
Show Advanced Settings Select the check box to display the advanced settings.
File list maximum response size

The maximum size in KB of the file list response to handle. If the response exceeds this value, only the specified number of bytes will be processed.

Example:

If the response is 120 KB and the maximum size is set up to 100 KB, only the first 100 KB from the response will be processed.

The default value is 100 KB.

This field is displayed when Show Advanced Settings is checked.

Cipher suites

The cipher suites to be used for the SSL connection. The cipher suites must be comma separated.

The default value is:

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV.

This field is displayed when Show Advanced Settings is checked.

SSL protocol

The SSL protocol to be used for the SSL connection. The default value is TLS.

This field is displayed when Show Advanced Settings is checked.

Enabled SSL protocols

The enabled SSL protocols. The protocols must be comma separated.

The default value is TLSv1.2.

This field is displayed when Show Advanced Settings is checked.

Receive timeout

The socket timeout in seconds. Any non-zero time out will block the input stream associated with the socket for this amount of time. A timeout of zero is interpreted as an infinite timeout.

The default value is 25 seconds.

This field is displayed when Show Advanced Settings is checked.

Connect timeout

The connection timeout in seconds. A timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs.

The default value is 25 seconds.

This field is displayed when Show Advanced Settings is checked.

Max redirects

The maximum number of redirects to be followed. The limit on the number of redirects is intended to prevent infinite loops.

The default value is 1 redirect.

This field is displayed when Show Advanced Settings is checked.

Sample configuration — List files and download

Sample configuration for a Generic HTTP transfer site to list specific files on an Apache HTTP server and download them:

Field Description
General Settings
Site Name GHTTP_list
Site Type Unspecified
Access Level Private
Transfer Protocol Generic-HTTP(S)
Server Settings
Specify partner using hostname (IP address) and port number Selected
Host 10.232.15.114
Port 443
Specify partner using URL Not selected
Address

Network Zone

none

Transfer Settings
Use HTTPS

Selected

Verify certificate for this Site Not selected
Enable FIPS Transfer Mode

Not selected

List
List settings  
Enable list Selected
URL path

/uploads

File expression

<a href=\"(([^?].*?)\">

Method

GET

Headers

No headers

File download
File download settings  
URL path

${env['ts_relative_path']}/${env['ts_target']}

Method GET
Headers

No headers

Receive actions
Receive File As

Not selected

Upload
Upload settings  
URL path

Method

PUT

Headers

No headers

Send actions
Send File As

Not selected

Authentication
Login Settings  
Client Certificate  
Certificate (Select Key) - No key selected
Basic authentication settings  
User name acc
Use Password

 

Password

 

Form authentication

Not selected

Advanced settings
Show Advanced Settings Not selected

Sample configuration — Download file

Configuration for a Generic HTTP transfer site to download a file from an Apache HTTP server:

Field Selection or entry
General Settings
 Site Name GHTTP_download
Site Type Unspecified
Access Level Private
Transfer Protocol Generic-HTTP(S)
Server Settings
Specify partner using hostname (IP address) and port number Selected
Host 10.232.14.182
Port 443
Specify partner using URL Not selected
Address

Network Zone

none

Transfer Settings
Use HTTPS

Selected

Verify certificate for this Site Not selected
Enable FIPS Transfer Mode

Not selected

List
List settings  
Enable list Not selected
File download
File download settings  
 URL path

/download.txt

Method GET
Headers

No headers

Receive actions
Receive File As

Not selected

Upload
Upload settings  
URL path

Method

PUT

 Headers

No headers

Send actions
Send File As

Not selected

Authentication
Login Settings  
Client Certificate  
Certificate (Select Key) - No key selected
Basic authentication settings  
User name acc
Use Password

Selected

 Password

 

Form authentication

Not selected

Advanced settings
Show Advanced Settings Not selected

Sample configuration — Upload file

Configuration for a Generic HTTP transfer site to upload a file to an Apache HTTP server:

Field Selection or entry
General Settings
Site Name GHTTP_upload
Site Type Unspecified
Access Level Private
Transfer Protocol Generic-HTTP(S)
Server Settings
Specify partner using hostname (IP address) and port number Selected
Host 10.232.14.182
Port 443
Specify partner using URL Not selected
Address

Network Zone

None

Transfer Settings
Use HTTPS

Selected

Verify certificate for this Site Not selected
Enable FIPS Transfer Mode

Not selected

List
List settings  
Enable list Not selected
File download
File download settings  
URL path

Method GET
Headers

No headers

Receive actions
Receive File As

Not selected

Upload
Upload settings  
URL path

/upload.php

Method

POST

Headers

Header = header1

Value = value1

Body

Select form-data.

${env['ts_file_form_parameter_name']}=filename

filename=${env['ts_target']}

Send actions
Send File As

Not selected

Authentication
Login Settings  
Client Certificate  
Certificate (Select Key) - No key selected
Basic authentication settings  
User name acc
Use Password

Selected

Password

 

Form authentication

Not selected

Advanced settings
Show Advanced Settings Not selected

Sample configuration — Push file to SecureTransport user using Form Authentication

Configuration for a Generic HTTP transfer site to push file to a SecureTransport user using form authentication:

Field Description
General Settings
Site Name GHTTP_form
Site Type Unspecified
Access Level Private
Transfer Protocol Generic-HTTP(S)
Server Settings
Specify partner using hostname (IP address) and port number Selected
Host 10.232.15.114
Port 443
Specify partner using URL Not selected
Address

Network Zone

none

Transfer Settings
Use HTTPS

Selected

Verify certificate for this Site Not selected
Enable FIPS Transfer Mode

Not selected

List
List settings  
Enable list Not selected
File download
File download settings  
URL path

 Method GET
Headers

No headers

Receive actions
Receive File As

Not selected

Upload
Upload settings  
URL path

/api/v1.4/files?transferMode=BINARY

Method

POST

Headers

Header=Referer

Value=123

Body

Select form-data.

${env['ts_file_form_parameter_name']}=filename

filename=${env['ts_target']}

Send actions
Send File As

Not selected

Authentication
Login Settings  
Client Certificate  
Certificate (Select Key) - No key selected
Basic authentication settings  
User name user1
Use Password

Selected

Password

 

Form authentication

Selected

Form authentication settings  
URL path

/template/login

Method

POST

Headers

Header=User-Agent

Value=Mozilla/5.0

Body

Select form-urlencoded.

switch=Log In

user=${env['ts_form_auth_username']}

password=${env['ts_form_auth_password']}

Advanced settings
Show Advanced Settings Not selected

Supported expression language

This topic outlines the limited expression language supported by Generic HTTP transfer sites.

Predefined variables

The predefined variable that is supported:

  • ${timestamp}

Predefined functions

The predefined functions that are supported:

  • Functions related to a date. For example: ${date("yyyyMMdd")}
  • Functions related to a Random ID. For example: ${random()}
  • Functions related to a String representation. For example: ${concat('str', 'ing')}
Note Expression variables and functions related to file name and the SecureTransport environment are not supported.

Added expression variables

On download and list, the following environment variables are added:

  • ${env[‘ts_content-disposition’]} – If a remote HTTP server presents a content disposition header, its filename value will be preserved into this variable.
  • ${env['ts_relative_path']} – The relative path of the file that will be downloaded.
  • ${env['ts_target']} – The file name of the file that will be downloaded or uploaded.

On upload, the following environment variables are added:

  • ${env['ts_target']} – The file name of the file that will be downloaded or uploaded.
  • ${env['ts_file_form_parameter_name']} – Represents the name of the form input element with file type on the remote server.

On form authentication, the following environment variables are added:

  • ${env['ts_form_auth_username']} – Represents the user name specified in the Basic authentication settings pane.
  • S{env['ts_form_auth_password']} – Represents the password specified in the Basic authentication settings pane.

Related topics

Related Links