Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed to parse key: policy(Verify-JWT-Token) when reading from variable

Hi

I am retrieving public key from URL (https://<host>/v2/common/jwks.json) via service callout policy then storing response in variable "publicKey". Since URL for public key will be different for different environment, I thought of using this URL from KVM for my service callout policy and extracting public key and putting in variable "publicKey". Here everything works fine. Now I simply want to pass reference of this variable to <JWKS ref="publicKey"/> below. but it gives  

Failed to parse key: policy(Verify-JWT-Token) when reading from variable

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VerifyJWT async="false" continueOnError="false" enabled="true" name="Verify-JWT-Token">
<DisplayName>Verify JWT-Token</DisplayName>
<Algorithm>RS256</Algorithm>
<Source>oauthtoken</Source>
<PublicKey>
<JWKS ref="publicKey"/> 
</PublicKey>

My Goal is, I want to read JWKS dynamically. 

When I use <JWKS uri="https://<host>/v2/common/jwks.json"/> it works fine. But this URL will be different for different environment. Another issue is I cant use variable with  <JWKS uri="variable"/> - It does not support variable and give error on Save

0 2 872
2 REPLIES 2