Monday, October 5, 2015

FTP Adapter configuration in Oracle SOA 12c for SFTP

 

In this blog we will be describing the process to configure the FTP adapter for file transfer between the oracle SOA server and ftp server. We will be using the ssh key authentication between the source and destination.

1. SOA HOST –> This is a SFTP client host that will host the SOA FTP Adapter

2. SFTP Server –> This is a  Remove SFTP server on which we will be placing the files.

Setting up the ssh between the client and sever.

1. Navigate to home folder on SOA servers with user oracle SOA server is running.

2. Execute the below command  “ ssh-keygen” . This will generate the pair of public and private keys

image

3. Copy the public key of the SOA host to remote SFTP server’s authorized_keys file. This file is located in “/home/<user>/.ssh”  directory. Public key of the SOA host is in the file id_rsa.pub  file. We need to copy the content of the file and place in authorized_keys on the SFTP server.

4.  Test the SFTP setup by login to SOA server and ssh to remote SFTP server. One time you have to establish the authenticity of the remote server SFTP server for that when it prompts enter YES  .

[oracle@soa-training~]$ ssh <<user2>>@ SFTPHOST

The authenticity of host IPADDRESS (IPADDRESS)' can't be established.

RSA key fingerprint isXXXXXXXXXXXXXXXXXXXX

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added IPADDRESS (RSA) to the list of known hosts.

[<<user2>>@f14 ~]$

 

Now we have successfully set-up the public key based secure FTP connection from SOA host to Remote SFTP server.

We will setup the FTP Adapter configuration  in SOA weblogic domain.

1. Note down the JNDI name of the FTP server that we need to configure from Developers/jdeveloper.

2. Login to the SOA domain console and navigate to Deployment->FtpAdapter->Configurations->Outbound connection pool .  In javax.rescources.cci.ConnectionFactory connection pool. Create the instance with the name of JNDO as you gathered in step 1.

image

3. Select the “eis/test/FtpAdapter”  and update the below properties values with environment specific.

    • Authentication Type – > publickey
    • host                             --> <Remote SFTP server host >
    • port                             --> 22
    • privateKeyFile           --> /home/<user1>/.ssh/id_rsa
    • username                   --> <user2>
    • useSftp                        ---> true

4. Once we have updated the values, we need to update the deployment FTP Adapter. And activate the changes.

image

5. FTP Adapter Service is ready to used by other SOA composites

2 comments:

  1. Thanks for the best topic. Very useful information.
    We IT hub Online Training are good in giving the oracle soa Training

    ReplyDelete

  2. Thanks for the nice blog here.I was searching this one for a long time.This blog is very helpful for my studies..I got another one site also,which is same as yours Oracle OSB.Check this one also Oracle Fusion HCM Sure it will be helpful for you too..Once more iam thanking you for your creative blog.

    ReplyDelete