A community can use an embedded Secure FTP (SFTP) server to receive messages from partners or as an application transport.
When you elect to set up an embedded SFTP transport for a community, the wizard asks whether you want to:
If you choose to use a previously defined embedded SFTP server, the wizard prompts for the user account name. You can choose an existing account or define a new one. If you choose an existing account, you must choose a subdirectory within that account’s home directory that is not assigned to any other exchange point.
If you choose to define a new embedded SFTP server, the wizard prompts for a server name and port number. The wizard then asks for a user name and password for the new server. If the default selections already are in use, you must use another user name and password.
When you create an embedded SFTP server, Activator also generates an RSA public-private key pair for the server. The key pair has no visibility in your user interface. But when you export your community profile as a partner profile, the server’s public key is exported with it. When your B2Bi, Interchange, or Activator partner imports the partner profile, the public key can be displayed. Your partners use the public key to authenticate the embedded server upon connecting.
Note | For a description of configuring an external SFTP server, see SFTP (external) transport configuration. |
There are two types of embedded SFTP servers:
The exchange wizard enforces the usage context for embedded SFTP servers. For example, the wizard does not let you define a new embedded SFTP trading server when the usage requires an application server.
To configure hosted partner accounts for embedded SFTP servers, you must have a specific license permission. Your license.xml
file must enable the permission: hostedPartnerSftpAccounts. Without this permission you can configure a partner to send messages via an external SFTP server, but not via an embedded server. This permission does not affect back-end application accounts; there is no restriction on adding hosted accounts from which a back-end system can pick up messages.
When you add an exchange that uses an embedded SFTP server, you must specify an SFTP user account. You can choose an existing account or define a new one. Activator internally associates user accounts with home directories for sending (PUT) or retrieving (GET) messages. There are three types of accounts.
Account type |
Usage |
Community trading pickups, trading servers only |
|
Community trading pickups and partner trading deliveries, trading serves only |
|
Community application pickups and deliveries, application servers only |
User names are shared by all trading servers. This enables a load balancer to send a request to any trading server. However, user names associated with application servers are not related to user names shared by trading servers. For example, the user name user1 on the trading side is completely different from user1 on the application side.
The following topics describe each account type.
Community SFTP accounts are associated only with community pickups for receiving messages from partners.
Partners can perform PUT operations to community accounts associated with trading pickups, but not GET operations. This is to prevent partners from accessing each others’ files.
Partners can drop packaged messages directly into the home directory of a community account. As a result, community SFTP accounts can be referred to as shared accounts.
When a community profile is exported as a partner profile file to be imported by partners, the community SFTP account is exported with the pickup exchange.
To avoid file name collisions you can use the Message attributes tab on the pickup exchange to specify subdirectories where partners can place files based on the sender routing ID. This also allows identifying the sender when binary files are dropped off. For example, the following subdirectory scheme could be used for two partners (p1 and p2) to drop off files for community c1:
Subdirectory |
Purpose |
p1/c1 |
p1 sends to c1 |
p2/c1 |
p2 sends to c1 |
If a partner-specific subdirectory scheme is used, the partner must manually specify the subdirectory after importing the community's profile. If there is only one community and it has only one routing ID, the second directory level is unnecessary.
Partner SFTP accounts are used only for trading. The accounts typically are used for outbound trading via deliveries set up for partners. But the same accounts can be used for inbound trading via pickups set up in communities. In this case they can be used in lieu of, or in addition to, community accounts.
The user interface segregates the two purposes. When adding a partner embedded SFTP delivery, the wizard suggests the /mailbox subdirectory under the home directory. This is where Activator delivers messages for the partner to pick up. This can be thought of as a hosted partner delivery exchange, since the partner is picking up messages from your server. If the same partner account is added to an existing community pickup exchange, the system suggests the home directory (/). This ensures outbound and inbound messages are not confused.
For hosted partner delivery exchanges, you must inform the partner performing the GET operation of the SFTP host name or IP address, the port number, the path, and the server user name and password. If your partner uses Interchange or Activator, the partner must add a community pickup exchange for receiving messages via an external SFTP server (see SFTP (external) transport configuration for configuration information). The default value of the pickup directory must be changed to mailbox or whatever directory you specified. Also, clear the option for use temporary files.
Partner SFTP accounts cannot be used by back-end application exchanges.
Outbound trading example
In this example, an administrator adds an outbound hosted SFTP delivery exchange for partner1. The administrator associates the user account p1. The user interface suggests /mailbox as the subdirectory where the partner retrieves (GET) messages.
Optionally, for binary trading the Message attributes tab can specify subdirectories where Activator delivers files based on the routing ID of the sending community. For instance:
Subdirectory |
Purpose |
p1/mailbox/c1 |
p1 GETS messages from community1 |
p1/mailbox/c2 |
p1 GETS messages from community2 |
Since partner SFTP accounts are partner-specific, message attribute mapping only is needed for identifying the community if there is more than one possible sending community or there is no other way to identify the community. This would be the case when you intend to trade binary files, which have no packaging or internal identifying information.
Message attribute mapping also can be used to sort messages into arbitrary subdirectories based on other metadata besides the sender or receiver. For example, an inline process could assign metadata items to outbound messages that would cause them to be sorted into subdirectories based on mappings specified on the Message attributes tab.
Inbound trading example
This example is for traders who do not want to upload files to a shared community SFTP account.
An administrator adds or selects a community-embedded SFTP trading pickup. The trading pickup can be one already associated with a community SFTP account like c1. The exchange provides an anchor for one or more partner SFTP accounts where files may be dropped off for the community.
The administrator selects the Directories tab on the community trading pickup. There the administrator can add a new partner account or select an existing one.
The user interface suggests / as the home directory for the SFTP account where partners can drop files for the community. In contrast, /mailbox is the suggested directory when a hosted delivery exchange is added for a partner to GET messages.
Note | Embedded SFTP servers treat paths beginning with a slash as starting at the home directory for the user account currently logged in. |
Application SFTP accounts are associated only with application pickups and deliveries for retrieving messages from, or delivering messages to, back-end systems. Application pickup exchanges are not tied to a particular community.
When you create an SFTP account you can choose to either use an existing account, a new account (with all fields empty), or to define one later.
The \out directory is suggested as the pickup subdirectory name and \in is suggested as the delivery subdirectory name. You can change the user names and subdirectories as long as the same combination of user name and subdirectory is not specified for two exchanges. This is true for all embedded SFTP exchanges.
If you have a corporate firewall and the computer running Activator also has a Windows firewall, turn off the Windows firewall. Ask the network administrator to open the control port for your embedded SFTP server (default is 4022) on the network firewall.
When you add a new embedded SFTP server to a community, you complete the following fields in the exchange wizard.
You must select one of the following authentication options:
Click Next to continue the configuration.
You have the following options for selecting a user account:
If you elect to define a new account, complete the fields for the authentication option you selected on the previous wizard page.
<install directory>\common\data\ssh\users\trading
. But if you are configuring a back-end application transport, the path is <install directory>\common\data\ssh\users\integration
.Caution | Do not configure a back-end system to retrieve files from or write files to common\data\ssh\users\trading . Doing so could result in operational difficulties. The back-end system always should interact with trading engine application-type transports, and allow Activator to route messages to and from trading-type transports. |
Password authentication
Public key authentication
AAAAB3NzaC1yc2EAAAABIwAAAIEAypVxTV0MRxv4LS3tVld0LX+YhQmbyBSjwGrKqpqyWYH
Vrpv27Lri4oJ8KzeY2HSgiLGBqitVsQjnf65JYZxW0WSoXrCoh6Y1f7zJZszN8P+15wt3QH
0OcHerpdUp5LEfBgCaKRdaPTkgzhpDdMO87ZVFB8vam7fXEYuwUifUyfE=
pnuechte@ls0020
). UserName is optional.Click Next to continue the configuration.
common\data\ssh\users\trading\<user account>
common\data\ssh\users\trading\<user account>\<
amended path>
Click Next if you want to name the exchange. Otherwise, click Finish.
The following procedures together describe how to use public-private key authentication and password authentication for SFTP.
This procedure assumes:
The following procedures indicate the tasks performed by the local community and the remote trading partner.
The partners now are configured to exchange messages.