Error saving a proxy with GenerateJWT with PrivateKey

I am getting an error while saving an API Proxy with GenerateJWT using PrivateKey (RS256 algorithm). I am using Apigee OPDK v4.18.01. Pls help?

"Invalid variable name for secret : policy(SEC-GJ-Generate-JWT) element(PrivateKey/Value)."

0 2 154
2 REPLIES 2

Here is the policy:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GenerateJWT async="false" continueOnError="false" enabled="true" name="SEC-GJ-Generate-JWT">
    <DisplayName>SEC-GJ-Generate-JWT</DisplayName>
    <Algorithm>RS256</Algorithm>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <PrivateKey>
        <Value ref="private.privatekey"/>
        <Password ref="private.privatekey-password"/>
        <Id ref="private.privatekey-id"/>
    </PrivateKey>
    <Subject>Test JWT</Subject>
    <Issuer>https://apigee.com/trust</Issuer>
    <Audience>https://apigee.com/apis</Audience>
    <ExpiresIn>1h</ExpiresIn>
    <OutputVariable>jwt-variable</OutputVariable>
</GenerateJWT>

robert
Participant V

I just checked that your policy does work fine on Edge Cloud.

If my memory is correct, in 18.01 the JWT policies were in Beta. In 18.05 they went GA. Unfortunately I don't have access to an 18.05 environment, but if you do, maybe confirm there? Or if someone else here on the community can confirm the above policy works on 18.05, that would be great! If so, then the answer might be to upgrade.