Decrypt PGP encrypted files in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 06:03 PM
I have a requirement where I need to import an encrypted csv file from an SFTP location into ServiceNow and then, in theory, decrypt the file and process its decrypted contents using a import set/transform map to create and maintain user records on the sys_user table.
The encrypted file needs to use PGP encryption.
I can generate the public/private pair of keys and provide the public key to have the file encrypted before that is posted on the SFTP.
I understand there is already transport encryption when using SFTP but the solution still requires the file to have its contents encrypted with PGP at the source, before it gets to ServiceNow.
I know if the file encryption was not a requirement, I could create a Data Source to get the file from the SFTP server and process its contents via import set/transform map.
My question is if there is any way this could be accomplished in ServiceNow or if I will have to decrypt the file outside of the platform and then retrieve its contents. I experimented a bit with the Encryption Support plugin but that doesn't appear to be an option. I also came across the post below but it doesn't appear to be a fit for the requirements I have.
https://community.servicenow.com/thread/226555
Any thoughts would be greatly appreciated.
Marcelo Correia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 03:45 AM
Hi Marcelo,
Any type of file manipulation needs to be done outside ServiceNow preferably MID Server.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 05:51 AM
Thanks Ankur. I came across the post you replied with and since that was quite old I was hoping that some support for PGP were added to the platform more recently but it looks like that doesn't seem to be the case.
Marcelo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2017 05:55 AM
Hi Marcelo,
That's correct. You will have to use MID Server in this scenario.
Pass file, key and decrypt the file in MID Server and send the decrypted file back into ServiceNow and attach that to data source and trigger the transform map.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 01:37 AM - edited 07-01-2024 11:54 PM
Hey @Ankur Bawiskar / @marcelorsc ,
I need to implement a similar scenario where we need to pull PGP encrypted file from SFTP Server. I am thinking of leveraging SFTP step in a custom action & use the mid server. When I add a SFTP Step in the actions & choose SFTP Command as 'Cope Files to this Instance' then under Capabilities I see all the options such as SSH, etc but not PGP. So how will I decrypt the file using Mid Server if I cannot choose the Capability ?
Any response will be greatly appreciated !
Thanks,
Ritika Saran