pfx-sftp:parameters
All parameters for the
pfx-sftpcomponent -- SFTPConnection fields, the Pricefxconnectionparameter, and URI resolution logic.
SFTPConnection Parameters
These fields are configured on an SFTP connection object in Integration Manager:
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
(required) |
Address of the SFTP server. |
|
|
|
|
Port the SFTP server listens on. |
|
|
|
|
Starting access point (base directory) for the connection. All URI directories are resolved relative to this path. |
|
|
|
(optional) |
Username for authentication. |
|
|
|
(optional) |
Password for authentication. Encrypted at rest in the Integration Manager database. |
|
|
|
|
Whether host keys are verified during connection. Disabled by default for development convenience; should be enabled in production. |
Certificate-Based Authentication
When a certificateName is set on the connection, the component looks up the corresponding private key and injects it into the SFTP configuration. This enables key-based authentication instead of (or in addition to) password authentication.
Pricefx Endpoint Parameter
The following parameter is added by the Pricefx wrapper on top of the standard Camel SFTP endpoint:
|
Parameter |
Type |
Description |
|---|---|---|
|
|
|
Name of the SFTP connection to use. When set, host, port, path, username, password, and strictHostKeyChecking are resolved from the connection. |
All standard Apache Camel SFTP parameters remain available when using pfx-sftp. Common examples include:
|
Parameter |
Type |
Description |
|---|---|---|
|
|
|
Name (or expression) of the file to read/write. |
|
|
|
Delete the file after successful processing. |
|
|
|
Leave the file unchanged after reading (do not move or delete). |
|
|
|
Directory to move the file to after processing (e.g., |
|
|
|
Directory to move the file to if processing fails. |
|
|
|
Temporary file prefix during upload (e.g., |
|
|
|
Process files in subdirectories. |
|
|
|
Read-lock strategy to prevent reading files still being written. |
|
|
|
Polling delay in milliseconds (consumer only). |
See the Apache Camel SFTP documentation for the full list.
URI Resolution Logic
When the connection parameter is specified, the following resolution occurs:
-
The connection is looked up from the Integration Manager connection registry.
-
Protocol is set to
sftp. -
Host, port, and strictHostKeyChecking are applied from the connection.
-
Directory resolution:
-
If no directory is specified in the URI, the connection's
pathis used. -
If a directory is specified and differs from the default, it is appended to the connection's
path. -
Example: connection path
/data+ URI directoryexports=/data/exports.
-
-
Username and password are applied if present on the connection.
-
A private key is injected if the connection has a
certificateName.
Resolution Example
Given a connection my-sftp-conn with:
-
host =
sftp.example.com, port =22, path =/data, username =integrator
And a URI:
pfx-sftp://dummy/outbound?connection=my-sftp-conn&tempPrefix=.uploading
The resolved URI is effectively:
sftp://integrator@sftp.example.com:22/data/outbound?tempPrefix=.uploading&strictHostKeyChecking=no
Common Pitfalls
|
Pitfall |
Recommendation |
|---|---|
|
Credentials in route XML |
Never hardcode |
|
|
Default is |
|
Unexpected effective path |
The URI directory is appended to the connection |
Connection Testing
The SFTPConnection.test() method opens an SFTP channel to verify connectivity. It connects using the configured host, port, username, password, and strictHostKeyChecking setting, then validates the configured path exists on the server.