DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  HTTPS => SFTP?

    Posted Wed September 18, 2024 04:47 AM

    Hi,
    Is it possible to configure a MPG with HTTPS handler and send the request on to a SFTP-server?
    If it is, do you know of any example how to configure?

    Regards

    Jocke D



    ------------------------------
    Joacim Dahlblom
    ------------------------------


  • 2.  RE: HTTPS => SFTP?

    Posted Wed September 18, 2024 09:20 AM

    Joacim, 

    Though your situation may be far more complicated, you could try the simplest approach.

    On the backend URL, put in the SFTP server name, like "sftp://SFTPServerName".

    Then, in the User Agent of the XML Manager (suggest creating customs of both), navigate to the "SFTP Client Policy" (don't know which UI you are using) and add a policy entry.

    In the "URL Matching Expression", you can just type "sftp*" (without the surrounding double-quotes).   However, if you have more than one SFTP server to which you are sending traffic (a dynamic SFTP endpoint), you may have to be more precise and have more than one policy.

    In the "SSH Client Profile", either create one or select an existing one where you can configure the username and other security settings for the connection.

    Then choose the correct value for "Use Unique File Names" as appropriate for your use case.

    Even if your back end is dynamic, as long as the back end resolved is "sftp://" something, this should work, provided your SFTP Client Policy is defined correctly.



    ------------------------------
    Joseph Morgan
    CEO - Independent
    Joseph Morgan
    Dallas TX
    ------------------------------



  • 3.  RE: HTTPS => SFTP?

    Posted Fri September 20, 2024 03:18 AM

    Hi Joacim,

    It is definitely possible. Joseph pointed out the specific objects that you need to consider when performing the configuration. Usually it is more than just sending all request data to SFTP meaning you need to define how the folder path, filenames, etc. are derived as part of the processing logic. For example a very common use case that I have seen is to store the documents sent as HTTP(S) multipart message or SOAP attachments to an (S)FTP server. 



    ------------------------------
    Hermanni Pernaa
    Solutions Architect
    Digia Plc
    Helsinki
    ------------------------------