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

Could not find a matching Public Key: policy(verifyJWT) -Error

Hello ,

Below is the policy snippet for verify JWT :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VerifyJWT async="false" continueOnError="false" enabled="true" name="verifyJWT">
<Algorithm>RS256</Algorithm>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<PublicKey>
<JWKS uri=" Cert url"/>
</PublicKey>
<AdditionalHeaders/>
<IgnoreCriticalHeaders>false</IgnoreCriticalHeaders>
<AdditionalClaims/>
<IgnoreIssuedAt>false</IgnoreIssuedAt>
</VerifyJWT>

and the content of uri is given below

{"keys":[{"kty":"RSA","use":"sig","kid":"2","x5c”:[“*********\u003d\u003d"]},,{"kty":"RSA","use":"sig","kid":"1","x5c”:[“*****************************”]}]}

When a JWT Token is sentfor verification, below error is displayed .

jwt.verifyJWT.error 

Could not find a matching Public Key: policy(verifyJWT)
{"fault":{"faultstring":"Could not find a matching Public Key: policy(verifyJWT)","detail":{"errorcode":"steps.jwt.NoMatchingPublicKey"}}}
Solved Solved
1 9 2,743
2 ACCEPTED SOLUTIONS

You can try using this Java callout to transform your JWKS:

https://github.com/DinoChiesa/Apigee-Java-Transform-Jwks

View solution in original post

Hi @dchiesa1 ,

Thanks for the API Bundle. We will try from our end will update the status

Regards,

Suma

View solution in original post

9 REPLIES 9