JWT Generate Policy KID

Hi,

I am wondering how do I adjust Generate JWT Policy in order to populate a kid field inside header.

{
  "kid": "xxxxx",
  "typ": "JWT",
  "alg": "RS256"
}

I saw the example of google API issuer generating kid but without google API, how do I create the kid in my JWT token payload header.

Below is my policy.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateJWT async="false" continueOnError="false" enabled="true" name="Generate-JWT">
    <DisplayName>Generate JWT</DisplayName>
    <Algorithm>RS256</Algorithm>
    <PrivateKey>
        <Value ref="private.key"/>
    </PrivateKey>
    <Subject ref="requester"/>
    <Audience>https://example.com/</Audience>
    <ExpiresIn>30m</ExpiresIn>
    <CustomClaims>
        <Claim name="custom_claim_data" ref="claim_data"/>
    </CustomClaims>
    <OutputVariable>output_jwt</OutputVariable>
</GenerateJWT>
Solved Solved
0 3 1,549
1 ACCEPTED SOLUTION

faijahmad
Participant V

Hello @Imran Mohamad , Please read this article by @Dino . Please look in the comments. Though i am not sure what you need is available or not but i am just highlighting one comment by Dino. Hope this will help

"Ah yes, it is not possible to do that using the Alpha policy. This is a feature people have asked for. We have added it to the policy, and it will be possible when we release in January."

https://community.apigee.com/articles/49280/jwt-policies-in-apigee-edge.html

View solution in original post

3 REPLIES 3

@Dino Can you please advise?.

faijahmad
Participant V

Hello @Imran Mohamad , Please read this article by @Dino . Please look in the comments. Though i am not sure what you need is available or not but i am just highlighting one comment by Dino. Hope this will help

"Ah yes, it is not possible to do that using the Alpha policy. This is a feature people have asked for. We have added it to the policy, and it will be possible when we release in January."

https://community.apigee.com/articles/49280/jwt-policies-in-apigee-edge.html

Thank you. I missed that particular comment conversation. Perhaps, updating FAQs might help next time 🙂