Form Upload to SFTP

Request/Response & Json Schema

Overview

This interface provides a detailed overview of technical and business functioning of ALIP SFTP Interface API for uploading the files to SFTP server. The client applications can send ACORD request over SOAP/REST/JMS. The request and response are in form of 510/51000 ACORD format.. One or more files data can be uploaded to SFTP server using this interface. Hence response contains status for each file uploaded, whether it succeed or failed. The SFTP file upload also creates below files for each uploaded file.

Main file

Metadata file

Go file for main file

Go file for metadata file

The metadata file is xml based file containing more information on file and application.The metadata file details are also listed in excel in section 3.1.9. Go files are empty files indicating that corresponding file is uploaded correctly. “Go file for main file” and “Go file for metadata file” creation can be controlled by configuration options as described in configuration settings listed in section 3.1.9. . Naming convention for each mainfile, metadata file and go files is provided in section 3.1.3 Business Requirement. The main file data and data of metadata file can also be encrypted using public key provided by the client. The encryption can also be turned ON/OFF by configuration settings. Encryption details supported are listed assumption section 3.1.6

Technical Requirements

TR ID# Technical Requirements
TR1 ACORD version 2.36 shall be used to communicate.
TR2 Form Upload to SFTP Interface request “integrationPoint=FORM_SFTP_UPLOAD” should be used for executing interface
TR3 Interface must always return an error code and desc in the event of processing failure in addition to HTTP 400 response code.
TR4 For a successful transaction a return code of HTTP 200 response code is returned.
TR5 The interface can be invoked using SOAP/REST/JMS protocol

Business Requirements

BR ID# Business Requirements
BR1 Form Upload to SFTP interface request should have single attachment data block for each file data that will stored on sftp using this interface
BR2 SFTP interface can upload one more files using single request
BR3 The data of the files to be copied on the SFTP server should be Base64 Encoded format and should be available within the incoming Request without any spaces or new line string within the encoding
BR4 The files are copied in below sequence for each main file.Main FileOne Blank Go File (.go) for representing main file copied correctlyMetadata File (.md)Second Blank Go File (.go) for representing metadata copied correctlyFor each file copied on the SFTP server, a metadata(if configuration is set to create metafile) and a go file should be created for each mainfile and metadata file in the above order(if configuration is set to create go file) by the interface.Also the Main file and the metadata files created will be encrypted ( if encryption is enabled) using RSA Public key provided for encryption.
BR5 Name of file will be in below format_YYYY-MM-DD_HH_MM_SS_sss_filenameNote:- filename is name of file as provided in the request. APPID is trackingID passed in the request
BR6 Name of file for metadata file will be in below format_YYYY-MM-DD_HH_MM_SS_sss_filename.mdNote:- filename is name of file as provided in the request. APPID is trackingID passed in the request
BR7 Name of file go file for mainfile will be _YYYY-MM-DD_HH_MM_SS_sss_filename.goName of file go file for metadata will be 00000000000APPID_YYYY-MM-DD_HH_MM_SS_sss_filename.md.goNote:- filename is name of file as provided in the request. APPID is trackingID passed in the request
BR8 In case when all files are successfully a code of 1 in TransResult, will be returned by the interface.
BR9 In case of failure occurs during processing like encryption of uploadind file to SFTP server, an error message with suitable description and code will be returned by the interface.

Process Flow Diagram

Process Flow Description

ALIP will receive a new request for SFTP form upload, on the ALIP Request Queue.

The ALIP process server will pick up the message. It will first validate request for correct input using. If there is any issue in request input, an integration failure would be created and stored in ALIP and error response is returned.

ALIP will parse the ACORD message to set internal data like finding numbers of files to be uploaded and etc. It will encrypt data for each file using client’s public key. It creates metadata file for each file data in request by fetching data for the application using application id from the request. For each file it will transfer mainfile, metadata file and go file on SFTP server.

If all files are transferred successfully to SFTP server, a successful ACORD response is created giving details about each file transferred in the message. If there is any failure during processing of request or during transfer of the request, it will form ACORD error message giving details that files were not transferred to SFTP server.

Impact on ALIP system

N/A

Assumptions

SFTP details like ftp url, ftp port no, folder to copy files, credential to connect to ftp like should be present within the process-server.properties within the ALIP system.

The data required for copying file on the SFTP server should be Base64 encoded and should be available within the incoming Request.

The incoming request also should provide a valid Application id and file name and the application with matching Application Id should be available within the ALIP system.

The file data should not contain any space within the Base64 encoded string.

Encryption supported is algorithm - RSA, mode – ECB, padding PKCS1Padding.

Since RSA does not support encryption of data more than bytes,files data will be encrypted in blocks of 245 and appended.

To turn on encryption of file data, pem formatted public key file need to be provided with key length of 2048. This file need to be place at location accessible to the ALIP process server. The path of file server should be correctly configured in process-server.properties file.

Main file, metadata file and go files will be placed in the folders as provided in configuration settings.

Dependencies

The client should provide public key for the SFTP server and also provide credentials to connect to SFTP server.

Request Data Elements

Response Data Elements

Success/Error Handling

Success Success Scenario Description Message Code Message Description Message Type Additional Comments
#1 The interface call was successful when all files are copied to SFTP server 1 Success Informational TXLife/TXLifeResponse/TransResult/ResultCode/@tc =1
#2 The interface call failed while decoding any of file data 5 Failure Informational TXLife/TXLifeResponse/TransResult/ResultCode/@tc =5
#3 The interface call failed with XSD/System error. 5 Failure Informational TXLife/TXLifeResponse/TransResult/ResultCode/@tc =5
#4 The interface call failed while copying any of file data to the SFTP server 5 Failure Informational TXLife/TXLifeResponse/TransResult/ResultCode/@tc =5
#5 The SFTP interface call failed while encrypting any of file data 5 Failure Informational TXLife/TXLifeResponse/TransResult/ResultCode/@tc =5