How do we include an RSA key / AES256 encryption with a REST API Post call?

dave_edgar
Mega Guru

So, we use a REST API call to create tickets with one of our vendors and they use one to send us back updates to said tickets but they need us to use an RSA key in the API.  I can't find much info on using an RSA key and my keyword searches on RSA seem to send me towards edge encryptions and other areas rather then REST calls.

They want to use AES256 encryption

 

Has anyone already done this.  Is it as simple as implementing something this this::

var restMessage = new sn_ws.RESTMessageV2();
restMessage.setBasicAuth(gs.getProperty('thousandeyes.user'), gs.getProperty('thousandeyes.pass'));
restMessage.setHttpMethod("get");

 

Any help will be useful atm.

4 REPLIES 4

nthumma
Giga Guru

Did you look at encryption contexts?

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/encryption/task/t_EncryptionContextSetup.html

 

Type of encryption used to encrypt your data:

  • AES 128-bit: Advanced Encryption Standard
  • AES 256-bit: Advanced Encryption Standard using 256-bit encryption

 

Thanks for the link but i can't see this working with the 3rd party vendor though sadly.  it's the actual API message that needs the encryption adding

Harish30
Kilo Contributor

Hi Dave,

I am also facing the similar requirement.

Did you crack this isssue? How do we encrypt any string using RSA public/private key

 

thanks in advance.