IBM WebSphere Adapter for FTP OutBound operation for SFTP protocol using public key authentication. Page 1 of 25
Introduction This technote describes the FTP outbound operation for SFTP protocol using public/private keys. The step-by-step process contains the information about the flow from EMD artifacts generation to the run time outbound output response. Page 2 of 25
Learning Objectives After completing a tutorial, you should be able to perform the outbound operation for SFTP protocol using the public/private keys. Audience This tutorial is for integration developers who design, assemble, test, and deploy business integration solutions. Software prerequisites To use this tutorial, you must have the following applications installed: 1. WebSphere Integration Developer version 6.2. 2. WebSphere Process Server version 6.2. 3. SFTP server. Page 3 of 25
Outbound Processing Creating a file using SFTP protocol using public key authentication. Prerequisites: 1. Create a public or /private key pair using any of the CA (Certificate Authority) or third party provider. The public or /private key should be in open-ssh format. The property passphrase (during creation of public/private key) is optional and can be provided for enhanced security. 2. Configure the SFTP server for a user using the public key authentication. The public key will be available in the SFTP server whereas the private key should be present on the machine where the adapter is running. Configuring the adapter for outbound processing: Creating the project: 1. Launch WebSphere Integration Developer by clicking Start > Programs > IBM WebSphere > Integration Developer 6.2. 2. WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all, and then select Business Integration from the list and click OK. 3. Create a new module by selecting File->New->Module 4. Enter the name for the module as FTPOutboundCreate and click Finish Page 4 of 25
The following structure can be seen in the Business Integration view: Page 5 of 25
5. Launch the Enterprise Service Discovery wizard by selecting File- >New->Other->Business Integration->External Service 6. Select FTP and click Next. Page 6 of 25
7. Select IBM WebSphere Adapter for FTP and click Next Page 7 of 25
8. Ensure that the Target runtime is Websphere Process Server 6.2 and click Next Page 8 of 25
9. Select Outbound and click Next. Page 9 of 25
Setting connection properties for the external service wizard 1. Enter the ftp connection information like the hostname, directory, username and protocol. Page 10 of 25
2. Uncheck the JAAS authentication alias since the username/password is already specified. 3. Once these properties are entered click Advanced button and then click on Secure configuration. Page 11 of 25
4. Click Browse and select the private key file. optional specify the passphrase if it was specified during creation of public/private key pair. Page 12 of 25
5. Click Next. Page 13 of 25
Generating the related artifacts Page 14 of 25
6. In the operation panel click Add to add operations. Page 15 of 25
7. Select Create, Generic FTP business object with business graph for input operation data type and choose Enable response type for the operation checkbox and press Next.. 8. Select the operation kind from the list. For example, Create. 9. Click Finish. Page 16 of 25
10. Click Next. Page 17 of 25
11. Click finish. Page 18 of 25
12. Verify the results as in the below figure: Page 19 of 25
Deploying the module to the test environment The result of running the external service wizard is an SCA module that contains an EIS import. Install this SCA module in WebSphere Integration Developer integration test client. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click on the server, and select Add and remove projects. Page 20 of 25
Add the SCA module to the server. Page 21 of 25
Click Finish0. Page 22 of 25
Testing the assembled adapter application Test the assembled adapter application using the WebSphere Integration Developer integration test client. 0. Select the service you want, and click Test > Test Module. Populate values for input business objects. Specify the required parameters to carry out Create operation i.e. Directory Path Filename, and content-astext. For example: Directory Path = /output Filename=FileCreated.txt AsText= This is the content of the file that will be created at the remote site. Page 23 of 25
Page 24 of 25
Execute the service by clicking the continue button Check the output of the service, and check the data content in the file created at the remote server to ensure it matches the expected content. Page 25 of 25