Need JWT with x5c header

Hi Everyone,

I need to generate a JWT from a Token Profile that includes the x5c (certificate chain) header.

Setup:

  • Token Profile: JSON Web Token
  • Security: Signature → Asymmetric → RS256

When I try to set x5c manually (pasting the cert chain), I get this error:

“JWS Alias — Please provide correct algorithm key with correct key length.”

Is there any way to make Pega include the x5c header automatically when generating the JWT?

Thanks!

@SebastianCatrina Pega’s OOTB JWT Token Profile cannot include an x5c header automatically, because x5c is a list/array of strings and that header format is not supported in the Token Profile headers.
So the one workable solution is to bypass the Token Profile for token generation and generate/sign the JWT in custom code (for example, a Java step/library) where you can read the certificate chain from your keystore and set x5c as a proper JSON array, then use that JWT in your connector/request.