SFTP Client Begin Session Service
The SFTP Client Begin Session service starts an SFTP session with an external trading partner for exchanging business documents.
Category | Description |
---|---|
System name | SFTP Client Begin Session Service |
Graphical Process Modeler (GPM) category | All Services, B2B Protocols > SFTP Client |
Description | Starts an SFTP session with an external trading partner for the purpose of exchanging business documents. This service works through an instance of the SFTP Client adapter. |
Business usage | Use this service to establish a session with a trading partner SFTP server. |
Usage example | A business process executes to translate a document sent to a trading partner. The trading partner profile specifies SFTP as the transport protocol. Sterling B2B Integrator uses the SFTP Client Begin Session service to establish a session with the trading partner's SFTP server. |
Preconfigured? | Yes. Uses the preconfigured service in a business process. |
Requires third-party files? | No |
Platform availability | All Sterling B2B Integrator supported platforms |
Related services | The following services are related. Configured in a business process, they
initiate the SFTP Client adapter to perform their operations:
|
Application requirements | An SFTP Server at the external trading partner location. |
Initiates business processes? | No |
Invocation | This service is invoked from a business process. |
Business process context considerations | The SFTP Client Begin Session service allows you to specify a remote password. To obscure this password in process data for the business process, use the Obscure Data - Process Data Values service within the same business process (GPM display name is Obscure Parameter). The Obscure Data - Process Data Values service masks the values associated with parameters. |
Returned status values |
Returned status values:
|
Restrictions | N/A |
Persistence level | System Default |
Testing considerations | To test this service, run the SFTPClientDemoAllServices business process and verify that it completes successfully. For more information about the SFTPClientDemoAllServices business process, see SFTP Client adapter. To view debug information for this service: Operations > System > Logs > SFTP Client Adapter and Services. |
Input from Business Process to Service
The values for many of the parameters for the Begin Session service can be specified from multiple sources. The source for each parameter is determined by answering the following questions:
- Yes - Sterling B2B Integrator uses those values.
- No - Is ProfileId specified?
- Yes - Sterling B2B Integrator uses values from the profile associated with that ProfileId.
- No - Parameters noted in the following table take their value from the configuration of the selected SFTP Client adapter.
Field | Description |
---|---|
Name | Name this service will have in Sterling B2B Integrator |
Description | Description of service |
Select a Group | Select one of the options:
Note: For more information about groups, see Managing Services and
Adapters.
|
PreferredAuthenticationMethod | Method used to authenticate users. Required. Valid values are: password, public
key Note: The value entered for this parameter overrides the setting in the SSH Remote Profile
configuration.
|
CompressionMethod | Specifies whether data is to be compressed, which reduces the amount of data
transmitted as the file is copied from one node to another. The file will be automatically
decompressed at the destination. Required. Valid values: None, ZLIB. Default is None. Note: The
value entered for this parameter overrides the Compression setting in the SSH
Remote Profile configuration.
|
ConnectionRetries | The number of times the service will try to connect to the Trading Partner
System. Connection retries occur only with TCP/IP related issues. Optional. Valid value is any
numeric value from 1 to 50. Default is 1. Note: The value entered for this parameter overrides the
Connection Retry Count setting in the SSH Remote Profile
configuration.
While using the ConnectionRetries parameter, set the ResponseTimeout value
to wait longer than the total time for RetryDelay and ConnectionRetires parameters. This setting
allows the business process to remain active to perform the retries before the session times out and
terminates. The following example illustrates the setting where the value of the ResponseTimeout
(300) is greater than the total time taken by RetryDelay and ConnectionRetires parameters
(30*5=150):
|
KnownHostKeyId | Public key used to authenticate remote SFTP servers to the Sterling B2B Integrator SFTP Client. Internal
value is GUID. Required. Note: The value entered for this parameter overrides the setting in the SSH
Remote Profile configuration.
|
LocalPortRange | Any valid port number(s) not being used by another application running on the
system. A port in the specified range will be used to establish an SSH channel to the remote SFTP
server. Optional. Valid values are: (empty) - system selects an available port0 - system selects an
available port nnnn - use specified port nnnn, for example
9012nn-yy - use a port in the range of nn to yy, for example 462-863 would use a port in the range
of 462 to 863, inclusiveMultiples of the above values can be specified, separated by commas, for
example 9012, 462-863, 4925. Note: The value entered for this parameter overrides the setting in the
SSH Remote Profile configuration.
|
PreferredCipher |
From v6.1.1.1 and later versions:
Note: You can include unsafe/deprecated ciphers (client/server) explicitly by adding it to the
security.properties file by referring to the list
below:
If you do not want to use CBC ciphers, you must set the To disable CBC ciphers:
After the CBC ciphers are disabled, they will not be displayed in the Preferred Ciphers field in the SFTP Server Adapter, the SFTP Client Begin Session Service, or the SSH Remote Profile. Note: The value that is entered for this parameter overrides the setting in the SSH Remote Profile
configuration.
Note:
Note: When running in FIPS mode, Sterling B2B Integrator supports SSH Ciphers
AES128-CTR, AES192-CTR, and AES256-CTR, as well as SSL/TLS Ciphers AES128-GCM and AES256-GCM.
|
Important: You cannot configure the SSH Key Exchange algorithms to be used with SFTP in
the Sterling B2B Integrator UI. To select
strong SSH Key Exchange algorithms, specify the values to be used in
SSHKeyExchangeAlgList in the security.properties file. For
example,
SSHKeyExchangeAlgList=diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 .
You can verify the algorithm used in the SFTP Client Begin Session service status report.Sterling B2B Integrator also supports the
following key exchange algorithms:
The EDCSA keys specified are used only for the duration of the exchange. The host keys used to identify the server can be any of the supported public key types and need not be the ECDSA keys for this key exchange to work. Note:
|
|
PreferredMAC | The MAC the client prefers to use for stream encryption. Required. The
following MAC algorithms are supported:
The following MAC algorithms are not supported:
Note: The value entered for this parameter overrides the setting in the SSH Remote Profile
configuration.
Note:
|
ProfileId | SSH Remote profile identification. Optional. Valid value is any valid profile ID. |
UsingRevealedPasswd (V5.2.5 or later) | Indicates whether the password sent to the service is unobscured. Valid value is True or False. Default is False. Optional. |
RemoteHost | External Trading Partner host system (SFTP server IP Address or DNS name.
Required if ProfileId is not specified. Use any valid IP Address or DNS name. Note: The value entered
for this parameter overrides the setting in the SSH Remote Profile configuration.
|
RemotePasswd | SFTP remote login password. Either UserIdentityKeyId or RemotePasswd is required
if ProfileId is not specified. Note: You can obscure the password using the Obscure service. To
reveal the password for the service, use the XPath function 'revealObscured(element), where
(element) contains a text value of the obscured password, obtained from the Obscure parameter
service.
Note: The value entered for this parameter overrides the setting in the SSH Remote
Profile configuration.
|
RemotePort | External Trading Partner port number. Required if ProfileId is not
specified. Note: The value entered for this parameter overrides the setting in the SSH Remote Profile
configuration.
|
RemoteUserId | SFTP remote login username. Required if ProfileId is not specified. Note: The
value entered for this parameter overrides the setting in the SSH Remote Profile
configuration.
|
ResponseTimeout | The maximum time taken for the trading partner system to respond before the
session times out and terminates. The value is specified in seconds. The default value is 30
seconds. Optional. Important: If an input/out error occurs when you run the SFTP Client
Begin Session Service, increase the value of the
sshTransportTimeout property in the
sftp.properties file.Note: The value entered for this parameter overrides
the setting in the SSH Remote Profile configuration.
|
RetryDelay | Number of seconds the adapter will wait before retrying. Optional. Valid value is
any numeric value from 100 to 7200,000 seconds. Note:
|
SFTPClientAdapter | Select the SFTP Client adapter or a group that includes an SFTP Client adapter for this service to use when beginning sessions with an SFTP server. Required. |
UserIdentityKeyId | Key pair used to authenticate the remote user to the server. Either
UserIdentityKeyId or RemotePasswd is required if ProfileId is not specified. Note: The value entered
for this parameter overrides the User Identity Key setting in the SSH Remote
Profile configuration.
|
Output from Service to Business Process
If you provided a ProfileId in the Input from Business Process to Service, the SFTP Client Begin Session service uses the profile information you configured in the SSH Remote Profile to output the profile information to the process data. The following example illustrates the elements of an SSH remote profile in an XML ProcessData:
<ProcessData>
...
<TPProfile>
<ProfileName>...</ProfileName>
<RemoteHost>...</RemoteHost>
<RemotePort>...</RemotePort>
<KnownHostKey>...</KnownHostKey>
<RemoteUser>...</RemoteUser>
<PreferredAuthenticationType>...</PreferredAuthenticationType>
<UserIdentityKey>...</UserIdentityKey>
<Compression>...</Compression >
<ConnectionRetryCount >...</ConnectionRetryCount>
<RetryDelay>...</RetryDelay>
<ResponseTimeout>...</ResponseTimeout>
<PreferredCipher>...</PreferredCipher>
<PreferredMAC>...</PreferredMAC>
<LocalPortRange>...</LocalPortRange>
<Directory>...</Directory>
</TPProfile>
...
<ProcessData>
A Business Process can also use
the ProcessData element <Directory>
in the
SFTP Client CD Service to change the configured directory.
The following table contains the parameters passed from the SFTP Client Begin Session service to the business process:
Parameter | Description |
---|---|
SessionToken | Specifies the identifier for the session established between the SFTP Client adapter and an SFTP server. |
SessionStartTime | The date/time stamp for when the session started. |
ServerResponse | The SFTP server response, which might include a reply code and any text
associated with the reply code. Valid values are:
|
ServiceStartTime | The date/time stamp for when the service started. |
ServiceEndTime | The date/time stamp for when the service ended. |
Business Process Example
The following example business process excerpt illustrates by using the SFTP Client Begin Session service:
<operation name="Obscure Password">
<participant name="FTPClientObscureParameter"/>
<output message="outmsg">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="SFTP Client Begin Session Service">
<participant name="SFTPClientBeginSession"/>
<output message="SFTPClientBeginSessionServiceTypeInputMessage">
<assign to="SFTPClientAdapter">SFTPClientAdapter</assign>
<assign to="RemoteHost">myhost</assign>
<!-- Using the revealObscured XPath function ‡
<assign to="RemotePasswd" from="revealObscured(admin)"></assign>
<assign to="PreferredAuthenticationMethod">password</assign>
<assign to="RemotePort">21</assign>
<assign to="RemoteUserId">myname</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="SFTPClientBeginSessionServiceResults" from="*"></assign>
</input>
</operation>
[[Insert SFTP Client End Session]]