Generate SAS Token to invoke Azure Notification Hub REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 05:50 AM
Hi all,
I'm implementing an integration with Azure to send push notification through Notification Hub to a custom mobile app from customer instance.
The authentication to the REST API is by Shared Access Secret Token with this format:
SharedAccessSignature sig=<signature-string>&se=<expiry>&skn=<keyName>&sr=<URL-encoded-resourceURI>
To generate the <signature-string> I have to compute using the HMAC-SHA256 the following string:
<resourceURI> + "\n" + expiry;
How can I use the hmac-sha256 algorithm in ServiceNow?
I've found this script include online but I'm not able to use the CryptoJS.HmacSHA256(message, key) method (row 887).
Has anyone ever used CryptoJS in ServiceNow?
Thanks,
Piero.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 05:08 PM
Hi,
Was anyone able to find an answer to this? As this is something that I am trying to do as well.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2021 12:03 PM
This may work: CertificateEncryption | ServiceNow Developers Though I have run into some limitations with it specifically with relation to AWS as AWS requires binary key output iirc.