/n software Connectors for MuleSoft

Questions / Feedback?

SFTP Configuration

The connector accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the connector, access to these internal properties is provided through the Other property.

SFTP Configuration Settings

DisableRealPath:   Controls whether or not the SSH_FXP_REALPATH request is sent.

This configuration setting can be used to skip sending the SSH_FXP_REALPATH request, which asks the server to canonicalize the value in RemotePath to an absolute path. The default value is false, which will cause the component to send the request normally. If set to true, component will not send the SSH_FXP_REALPATH packet and will use the value in RemotePath directly.

DownloadCacheFile:   When set, only new files will be downloaded from the server.

This may be set to the location of a file on disk that will hold the names of files that were previously downloaded from the server. On each PollingInterval the connector will check to see if the file on the server exists in this list. If the file exists in this list, it is determined that the file was previously downloaded and is not downloaded on the current polling interval. The list is automatically updated on each polling interval.

DownloadCacheFileDuration:   The number of minutes that a file name will remain in the download cache.

If a file name is added to the DownloadCacheFile and is not seen on the server again within DownloadCacheFileDuration minutes, it will be removed from the cache. This can prevent the download cache file from growing too large in certain cases.

The default value is 0, meaning that files will never be removed.

This setting is only applicable if DownloadCacheFile is set.

EnableFileDetailsComparison:   Whether the receive connector should consider metadata differences when deciding whether to download a file again.

This setting is used in conjunction with DownloadCacheFile, and is only available on the receive connector. If DownloadCacheFile is enabled, this setting can be used to control how the receive connector uses the download file cache information when deciding whether to download a file again. (Similar to the "Enable Timestamp Comparison" property on Microsoft's FTP BizTalk Adapter.)

If this is set to False, the receive connector will not download a file again if the cache contains any information about it (that is, if it has been downloaded before).

If this is set to True, the receive connector will check the metadata of the remote file against its cached metadata, and will download the file again if any of the metadata differs.

ExcludeMask:   Instructs the connector to exclude some files when downloading.

This configuration setting is used to specify a mask to exclude certain files when downloading. If a file matches both this mask and FileMask, the file will be not be downloaded.

FileMaskDelimiter:   Specifies a delimiter to use for setting multiple file masks.

If specified, the file mask will be split into separate masks based on the chosen delimiter. The default is "", which will cause the file mask to be treated as a single value. When using multiple masks, any files that match one or more of the masks will be downloaded. For example, setting FileMaskDelimiter to "," and setting RemoteFile to "*.txt, *.csv" will download all files ending in .txt or .csv.

FilePermissions:   Specifies the permissions of a file to be set after a successful upload.

This may be set to an octal value representing the permissions of a file to be set after a successful upload. For example:

FilePermissions=0777
Note: When using the SCP connector this must be a 4 digit value. The SFTP connector will accept a 3 digit value.
IgnoreFileMaskCasing:   Instructs the connector to ignore casing of when FileMask is set.

By default the value of this setting is false. If set to true the connector will ignore case when matching a value to the FileMask.

KeyRenegotiationThreshold:   Sets the threshold for the SSH Key Renegotiation.

This property allows you to specify the threshold, in the number of bytes, for the SSH Key Renegotiation. The default value for this property is set to 1 GB.

Example (for setting the threshold to 500 MB):

SSHComponent.Config("KeyRenegotiationThreshold=524288000")

ListDirBeforeDownload:   Determines if the directory is listed on download.

This is True by default. When set to False the connector will not list the directory before attempting a download. This may only be used when the exact name of the file is known and is specified in FileMask. This is helpful in situations where the name of the file is known and server permissions do not allow directory listings.

LocalEOL:   When TransferMode is set, this specifies the line ending for the local system.

This setting is only applicable when TransferMode is set to 1 (ASCII). The default value is a CrLf character sequence.

When uploading or downloading this value will be compared to ServerEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.

The value supplied to this setting should contain a C# .NET style character sequence:

TransferMode=1
LocalEOL=\r\ n

Conversion will only happen when TransferMode is set to 1 (ASCII) and ServerEOL and LocalEOL are different.

LogSSHPackets:   If True, detailed SSH packet logging is performed.

This setting can be enabled to assist in debugging. When set to True the connector will include detailed information about the SSH level packets in the log. The default value is False.

MaxFileData:   Specifies the maximum payload size of an SFTP packet.

While the SSH specification requires servers and clients to support SSH packets of at least 32000 bytes, some server implementations limit packet size to smaller values. MaxFileData provides a means by which the user can specify the maximum amount of data that can be put into an SFTP packet so that the connector can communicate effectively with these servers. If you are having difficulty when uploading to a server, try setting MaxFileData size to value smaller than 32000.

Most servers that use smaller values will use a maximum SSH packet size of 16KB (16384). In order to most efficiently communicate with such servers, MaxFileData size should be set to 14745.

MaxFilesPerPollingInterval:   The maximum number of files that will be downloaded from the server during a single poll.

By default, the connector will download all available files (matching any filemasks) when polling the target directory. To limit the number of files that will be downloaded in a single poll, set this to the maximum number.

Note that to avoid downloading the same subset of files each poll, either DownloadCacheFile or DeleteMode should also be used.

ProtocolVersion:   The highest allowable SFTP version to use.

This governs the highest allowable SFTP version to use when negotiating the version with the server. The default value is 3 as this is the most common version. The component supports values from 3 to 6. It is recommended to use the default value of 3 unless there is a specific reason a higher version is needed.

RenameMode:   The condition under which RenameTo is used.

This setting controls when the value specified by RenameTo is used. If RenameTo is not specified, this setting has no impact. By default, downloaded files are only renamed after being successfully submitted to BizTalk (a value of 1). Possible values are:

1 (OnSuccess - default)The file is renamed using the value in RenameTo only after the message is successfully submitted to BizTalk.
2 (OnFailure)The file is renamed using the value in RenameTo only after the message submission to BizTalk fails.
3 (Always) The file is renamed using the value in RenameTo regardless of the message submission result.

RenameTo:   A filename to which RemoteFile will be renamed.

After downloading a file, the file on the server may be renamed using this setting. This rename action will take place after the batch submission to BizTalk. If you need to perform actions on a file before this, use the AfterGet property. This setting is used in conjunction with RenameMode to conditionally rename a file. For instance, to rename a file after it has been successfully submitted to BizTalk set the Other property of the connector like so:

RenameTo=%SourceFileName%.done
ServerEOL:   When TransferMode is set, this specifies the line ending for the remote system.

This setting is only applicable when TransferMode is set to 1 (ASCII). The default value is a CrLf character sequence.

When uploading or downloading this value will be compared to LocalEOL. If ServerEOL and LocalEOL are different, the line endings in the file being transferred will be converted to the line endings used by the destination. Line endings will be converted to the value in LocalEOL when downloading. Line endings will be converted to the value in ServerEOL when uploading. If ServerEOL and LocalEOL are the same, no conversion takes place.

The value supplied to this setting should contain a C# .NET style character sequence:

TransferMode=1
ServerEOL=\r\ n

Conversion will only happen when TransferMode is set to 1 (ASCII) and ServerEOL and LocalEOL are different.

SortCriteria:   Determines sort order before downloading files.

By default, files will be downloaded in the order in which they were listed by the server. When set to a value other than 0, this configuration setting will cause the connector to sort the list of files before downloading. Only applies when ListDirBeforeDownload is true (default). Valid values are:

  • 0 - Disabled
  • 1 - Name, ascending
  • 2 - Name, descending
  • 3 - Date, ascending
  • 4 - Date, descending
SSHAcceptServerHostKeyFingerPrint:   Instructs the connector to accept the server's host key with this fingerprint.

This may be set to a comma-delimited collection of 16-byte MD5 fingerprints that should be accepted as the host's key. You may supply it by HEX encoding the values in the form "0a:1b:2c:3d". Example:

SSHAcceptServerHostKeyFingerprint=0a:1b:2c:3d
SSHEncryptionAlgorithms:   A comma-separated list containing all allowable compression algorithms.

During the SSH handshake, this list will be used to negotiate the encryption algorithm to be used between the client and server. This list is used for both directions: client to server and server to client.

At least one supported algorithm must appear in this list. The following encryption algorithms are supported by the component:

aes256-cbc256-bit AES encryption in CBC mode
aes192-cbc192-bit AES encryption in CBC mode
aes128-cbc128-bit AES encryption in CBC mode
3des-cbc192-bit (3-key) triple DES encryption in CBC mode
aes256-ctr256-bit AES encryption in CTR mode
aes192-ctr192-bit AES encryption in CTR mode
aes128-ctr128-bit AES encryption in CTR mode
3des-ctr192-bit (3-key) triple DES encryption in CTR mode
cast128-cbcCAST-128 encryption
blowfish-cbcBlowfish encryption
arcfourARC4 encryption
arcfour128128-bit ARC4 encryption
arcfour256256-bit ARC4 encryption
aes256-gcm@openssh.com256-bit AES encryption in GCM mode.
aes128-gcm@openssh.com128-bit AES encryption in GCM mode.

The default value is "aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,arcfour256,arcfour128,arcfour,cast128-cbc,aes256-gcm@openssh.com,aes128-gcm@openssh.com".

SSHFingerprintHashAlgorithm:   The algorithm used to calculate the fingerprint.

This configuration setting controls which hash algorithm is used to calculate the certificate's fingerprint. Valid values are:

  • MD5 (default)
  • SHA1
  • SHA256
SSHKeyExchangeAlgorithms:   Specifies the supported key exchange algorithms.

This may be used to specify the list of supported Key Exchange algorithms used during SSH negotiation. The value should contain a comma separated list of algorithms. Supported algorithms are:

  • curve25519-sha256
  • curve25519-sha256@libssh.org
  • diffie-hellman-group1-sha1
  • diffie-hellman-group14-sha1
  • diffie-hellman-group14-sha256
  • diffie-hellman-group16-sha512
  • diffie-hellman-group18-sha512
  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group-exchange-sha1
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
The default value is: curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,ecdh-sha2-nistp256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp384,ecdh-sha2-nistp521.
SSHMacAlgorithms:   Specifies the supported Mac algorithms.

This may be used to specify an alternate list of supported Mac algorithms used during SSH negotiation. This also specifies the order in which the Mac algorithms are preferred. The value should contain a comma separated list of algorithms. Supported algorithms are:

  • hmac-sha1
  • hmac-md5
  • hmac-sha1-96
  • hmac-md5-96
  • hmac-sha2-256
  • hmac-sha2-256-96
  • hmac-sha2-512
  • hmac-sha2-512-96
  • hmac-ripemd160
  • hmac-ripemd160-96
  • hmac-sha2-256-etm@openssh.com
  • hmac-sha2-512-etm@openssh.com
The default value is hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256-96,hmac-sha2-512-96,hmac-ripemd160-96,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com.
SSHPublicKeyAlgorithms:   Specifies the supported public key algorithms.

This setting specifies the allowed public key algorithms. This list controls only the public key algorithm used when authenticating to the server. This list has no bearing on the public key algorithms that can be used to authenticate the client. The default value is ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss,x509v3-sign-rsa,x509v3-sign-dss.

This setting specifies a list of signature algorithms that may be used when authenticating to the server using public key authentication. This applies only when public key authentication is performed by the client.

The setting should be a comma separated list of algorithms. At runtime the connector will evaluate the specified algorithms and if the algorithm is applicable to the certificate specified in SSHCert it will be used. If the algorithm is not applicable the connector will evaluate the next algorithm. Possible values are:

  • ssh-rsa
  • rsa-sha2-256
  • rsa-sha2-512
  • ssh-dss
  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • ssh-ed25519
  • x509v3-sign-rsa
  • x509v3-sign-dss

The default value in Windows is ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519.

rsa-sha2-256 and rsa-sha2-512 notes

The connector will query the server for supported algorithms when connecting. If the server indicates support for rsa-sha2-256 or rsa-sha2-512 and the algorithm is present in the list defined by this setting (as in the default value), that algorithm will be used instead of ssh-rsa even when ssh-rsa appears first in the list.

For the rsa-sha2-256 and rsa-sha2-512 algorithms to be automatically preferred the server must support the ext-info-c mechanism. In practice, older servers do not support this and in that case ssh-rsa will be used since it appears first in the list. Newer servers do support this mechanism and in that case rsa-sha2-256 or rsa-sha2-512 will be used even though it appears after ssh-rsa.

This behavior has been carefully designed to provide maximum compatibility while automatically using more secure algorithms when connecting to servers which support them.

TemporaryDownloadExtension:   An extension to be appended during download.

During download, it may be necessary for the file on the server to be renamed. After the download is complete the file will be renamed back to the original name.

TemporaryUploadExtension:   An extension to be appended during upload.

During upload, it may be necessary for the RemoteFile to be written to a temporary file name. For example, some business process may be set up to expect a specific file extension. Using this setting will allow the connector to upload the file without the remainder of the process attempting to pick up the incomplete file.

TransferMode:   The transfer mode (ASCII or Binary).

The value 0 represents Binary and the value 1 represents ASCII. If the value is 0 (default), the initial server mode will be used.

When this value is set to 1 (ASCII) the connector will use the values specified in LocalEOL and ServerEOL to convert line endings as appropriate.

Note: When this value is set to 1 (ASCII) and ProtocolVersion is set to 4 or higher the connector will automatically determine the value for ServerEOL if the server supports the "newline" protocol extension.

WaitForServerDisconnect:   Causes the component to wait for the server to close the connection.

When this is set to True, the connector will wait for the server to close the connection after operation is complete instead of closing the connection immediately. This helps prevent ports on the system from being left in the TIME_WAIT state. The default is False.

General Configuration Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

LocalHost:   The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost configuration contains the name of the local host as obtained by the Gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the connector initiate connections (or accept in the case of server connectors) only through that interface.

If the connector is connected, the LocalHost configuration shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

TcpNoDelay:   Whether or not to delay when sending packets.

When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.

By default, this config is set to false.

UseInternalSecurityAPI:   Tells the connector whether or not to use the system security libraries or an internal implementation.

By default the connector will use the system security libraries to perform cryptographic functions. Setting this to True tells the connector to use the internal implementation instead of using the system's security API.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 8318]