DataPower: how to unzip an incoming *.zip file and then process the mutliple-file results ?

[Sample-input-zipped-file.zip]
[1]
My new prospect for DataPower wants to employ DataPower as a “file guard”, sitting in the DMZ.

As such, they want to be able to send zipped files into DataPower using SFTP client from external companies, for DataPower to inspect the contents of each and every zipped file and apply security, and then DataPower to either reject the file or to pass it on to one of two target FTP servers depending on values inside the zipped file.

My questions are:

1. How does DataPower best unzip a file ? (dp:inflate and compression don’t seem to be what I need.) It seems that setting Compression=On, in the SFTP Server FSH, might be the answer.
2. How to drill down a folder structure inside the unzipped result ? I am really struggling with this bit.

In more detail:

I attach an example of the file – it is a ZIP file that, when unzipped, contains two more zipped files. Each of those two zipped files needs to be processed.

I am assuming I’ll create an MPGW with an SFTP FSH (DataPower is SFTP Server) … and then I want DataPower to do all of the following:

– First apply AAA type security, using the userid that was used to sign in to the SFTP Server.
– Assuming that AAA succeeds, continue.
– Unzip file Sample Sample-input-zipped-file.zip . That will result in two zipped files, called ***Manchester/CPF_BLACKmanchester_{39d6b8d8-d42c-4053-8af7-a6e1f99d83ba}.zip*** and ***Manchester/CPF_BLACKmanchester_{699bcf86-68af-45da-9468-a7797d0e0755}.zip***.
– For each of those files, in turn:
Unzip the file.
Drill down to file ***ACT/ACT_manchester_50d79696-d13c-4172-bd73-4b03e1c3bb1d.xml*** or to file ***MCF/MCF_{ec08bd53-e7de-4cbd-acff-9229f62d1283}.xml*** respectively.
Depending on the value of field ***StageDescription*** or field ***Bookkeeping.PlanDescription***, respectively reject or route.
– Zip all the files back up again, to create one zipped file to be sent to the FTP Server.

Any suggestions welcome.

[1]: /answers/storage/temp/14634-sample-input-zipped-file.zip

Related:

Leave a Reply