cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP NodeJS application : SFTP On-Premise Server

zameer0448
Participant
0 Kudos
800

Hi Experts,

Need your help. We have NodeJS applications running in XSA environment of On-premise HANA DB. The application will place the file in SFTP location of On-Premise environment with the help of user provided services(UPS). We will maintain the user id, credentials, SFTP host name and port to access the SFTP server and with the help of path, The application will place the file.

We are planning to move this application to cloud foundry environment. We wanted to understand, how the application running in BTP can place the file in SFTP server of On-premise.

We can register the SFTP server to the Subaccount where the application is running in Cloud Connector. But What kind of destination we need to create in BTP.

How can the application read the User provided services like user id, password and path?

Please if anyone has achieved using Nodejs application placing the file in SFTP on-premise server. We can achieve this with help of CPI and SFTP adapter but we want this to be done via NodeJS application. Kindly share some knowledge on this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi zameer0448,

User Provided Services is still available for a CF and you can still bind it to an application. You can also design the environment variables in yaml or mta format instead of json and use the deployment files (manifest.yaml or mta.yaml) to deploy the application as a CF microservice and it will "gain" the variables the same way as you did with UPS. Technically it makes no difference the way you choose to use it.

Once you define your variables (I'd include the ssl certificates as plain text as env variable for the SFTP protocol) you can pick them up using the application's environment variables - same way as you used to with XSA. For Java or NodeJS there should be Accessor Classes that would help in obtaining the variables you want. But those are just "facilitators" in the process of retrieving the information you need.

For connection via BTP, I recommend using the Connectivity Service on BTP which will be integrated with the Cloud Connector for TCP applications such as SFTP via a SOCKS5 Proxy service.

The following blog can be used as reference to make your microservice on CF to connect via SOCKS5 proxy to the Cloud Connector and then to your SFTP service. It uses Java Spring to implement the connection to a database, but the same will apply for SFTP.

https://blogs.sap.com/2021/07/26/how-to-connect-to-databaseon-prem-via-sap-cloud-connector-from-sap-...

I have no idea what you meant by "ITL Lite Application" - but I recall XSA being able to run Java and NodeJS code, both available on CF as well. So, please adapt the Java code to your language of preference.

Here you will find the documentation on this topic:

https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/using-tcp-protocol-for-cloud-applicat...

Best regards,
Ivan