Issues with using Apigee-CustomPolicy-EncryptedJWT

Hi,

We are using the Java Custom Callout from GitHub - DinoChiesa/Apigee-CustomPolicy-EncryptedJWT to verify a JWE signature. Below is our Java Callout configuration and the java resources:

<JavaCallout continueOnError="false" enabled="true" name="JC-Verify">
<DisplayName>JC-Verify</DisplayName>
<Properties>
<Property name="key-encryption">RSA-OAEP</Property>
<Property name="content-encryption">A256GCM</Property>
<Property name="debug">true</Property>
<Property name="source">response.content</Property>
<Property name="private-key">{private-key}</Property>
</Properties>
<ClassName>com.google.apigee.callouts.VerifyJwe</ClassName>
<ResourceURL>java://apigee-callout-encrypted-jwt-20241203.jar</ResourceURL>
<!--<ResourceURL>java://nimbus-jose-jwt-8.22.jar</ResourceURL>-->
</JavaCallout>

However, we are encountering the following error when executing the callout:

Failed to execute JavaCallout. com/nimbusds/jose/JWEObject

Additionally, the older Java resource (apigee-callout-encrypted-jwt-20211021.jar) was working previously but started throwing this error on February 6, 2025:

{
"fault": {
"faultstring": "Failed to instantiate the JavaCallout Class com.google.apigee.callouts.VerifyJwe",
"detail": {
"errorcode": "steps.javacallout.JavaCalloutInstantiationFailed"
}}}

Steps Taken:

  • Verified that all required JAR files are included in the Apigee deployment.
  • Checked for missing dependencies in the JAR files.
  • Ensured that the private-key property is correctly set.
  • Reviewed the Apigee logs for more details.

Questions:

  • Has anyone successfully used this callout with Apigee X?
  • Could this be due to a missing dependency in nimbus-jose-jwt-8.22.jar?
  • Are there additional configuration steps needed to properly instantiate the Java Callout?
  • Any insights or suggestions would be greatly appreciated!

Thanks in advance.

Hey @EdgeXplorer , we’ve seen that your question hasn’t gotten a response yet. We’ll keep checking in on this thread and encourage other members to share their thoughts.

By the way, we’re hosting a tech talk & office hour tomorrow at 4:00 PM CET | 9:00 AM CST—if you’re interested, you can [sign up here] to join and get the link :blush:

Read this response, and try the advice there. It’s not the same Callout, but the suggestion I provided there applies to you as well.

If that does not work, You should contact Apigee support about this. This is a known issue at this point.

1 Like