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
07-31-2020 06:14 PM
I've setup a different server to handle services that can easily be done with a command.
There's a way to execute console commands using ecc queue but I've found it to be unreliable. The better way is to just create a REST API wrapper around the command. It's much easier to call REST API from ServiceNow compared to using the ecc queue. A simple wrapper API can be written using Python Flask in few lines.
Finally, putting too much load on MID server will cause performance problem on service interaction so I have a different server to execute command rather than running it on MID server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2023 08:30 AM
I have a requirement from a customer who is doing a flat file import via SFTP to provide a ServiceNow Public Key so they can encrypt the file before it is dropped onto the FTP server and ServiceNow can decrypt it once the file is received.
After pointing out that SFTP is already an encrypted transfer via SSH, they still have the security requirement of encrypting the file before it is put on the FTP.
As far as I can tell, ServiceNow does not support his activity.
Does anyone have any experience overcoming this requirement?