Dear Vebi,
The jwt issuer should publish the needed public keys (usually jwks) on line, so we can download it from a url.
It's expected the jwks will change in time, we can control it in policy logic, and download it when needed.
The policy structure below is just to explain the idea,
- At least folder
- \_ All folder
---- \_ lookup jwks in cache, use decode json web token assertion to validate jwt token, etc.
- \_ All folder
---- \_ route via http to jwks url, store to cache, etc.
---- |_ use decode json web token assertion to validate jwt token
- \_ All folder
---- \_ error handling for invalid jwt token
Note: for jwks, we need "kid" to find the correct public key in the key set, the kid will need to be extracted from the jwt -- use another Decode json web token assertion with "None" validation method to extract jwt header and then use json path to get the "kid" from jwt header. Product document has the sample code,
https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/security-configuration-in-policy-manager/policy-manager-other-security/working-with-json-web-tokens.html
(start from line 32 in the screenshot of the sample policy)
Regards,
Mark