locked
Basic sFTP logic app - decrypt message RRS feed

  • Question

  • I have a Logic app to connect to an sFTP server then post back the file content to a REST based service that I am hosting elsewhere. It is working just fine but I am confused on the decryption portion of the file on the sFTP server. How can I decrypt the file content so I can pass it decrypted to the REST service ?



    • Edited by mrbtd1 Friday, August 5, 2016 5:30 PM
    Friday, August 5, 2016 5:29 PM

All replies

  • How was the file encrypted?  You would likely need to write an Azure function or API app you could call that could decrypt using the certificate or service needed.  If, for example, you were using Azure Key Vault to encrypt/decrypt you could call the "decrypt" key vault API from an HTTP action with Azure AD Auth to decrypt the contents.

    Let me know

    Wednesday, August 10, 2016 4:08 AM
  • Wondering if the user ever got this accomplished.  I need to do the same with encrypting a file to send with  PGP encryption. (Decryption on the download) and also for another client  GPG encryption/decryption.  And I was guessing an Azure function or Web Job would be the way to go.  Its just the files reside on a Corporate file share but could move to a Blob or read content of files with File System connector I suppose. I'm just not sure the right approach to take.   

    Susan J. Swanger

    Wednesday, December 20, 2017 8:09 PM
  • Hi ,

    As Jeff suggested you can use functions to do encryption and decryption  or you can run your API App . Good option is to store the file at blob store and perform  delete operation on blob  once processing is complete .This way you don't loose content incase of any failure

    Sample code for PGP encryption and decryption can be found at https://code.msdn.microsoft.com/windowsdesktop/Pretty-Good-Privacy-using-4f473c67


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Wednesday, December 20, 2017 11:36 PM
  • @Abhishek0127 I am not able to access the link you mentioned in your answer. Even I am trying to do Encryption using Logic App before dropping it in to the SFTP server. 

    Tuesday, February 19, 2019 3:51 PM