Generate JWT token with ES256 signature

oleg7
Tera Contributor

Hi, 

I'm looking for ways to generate JWT in ServiceNow and signing it with ES256 algorithm.

ServiceNow only supports RSA256 in its ootb functionality, but I'm wondering if this can be somehow achieved with CertificateEncryption API?

I see its sign method has support for SHA256withECDSA, so this is what we need.

 

I see it is possible with help of MID server and external java libraries, but I would prefer implementing everything locally without relying on MID server.

1 REPLY 1

RajeshS45028713
Tera Contributor

Hi @oleg7 ,

Did you find any solution or working approach for this requirement? I have the same requirement.

ServiceNow supports RS256 for JWT signing, but Apple APNs requires ES256 using a .p8 private key.

Is there any way to generate an ES256 JWT in ServiceNow using the Apple .p8 key (or after converting it to JKS)?

Thanks & Regards,
Rajesh