Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWS Policy doesn't work with Java 17 #9211

Closed
exalate-issue-sync bot opened this issue Aug 29, 2023 · 1 comment
Closed

JWS Policy doesn't work with Java 17 #9211

exalate-issue-sync bot opened this issue Aug 29, 2023 · 1 comment

Comments

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Aug 29, 2023

Description

Using JWS in 3.20.10 generates this error:

ERROR io.vertx.core.impl.ContextImpl - Unhandled exception java.lang.IllegalAccessError: class io.gravitee.policy.jws.JWSPolicy (in unnamed module @0x409b9f38) cannot access class sun.security.x509.X509CertImpl (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @0x409b9f38 at io.gravitee.policy.jws.JWSPolicy.validateCRLSFromCertificate(JWSPolicy.java:245)

It is due to the fact this policy is still relying on an old gravitee-parent, meaning an old java version.

Problem is classes that are used by the policies (sun.security.x509.*) has been moved with the introduction of JIGSAW in Java 9.

See: https://wiki.openjdk.org/display/JDK8/Java+Dependency+Analysis+Tool#JavaDependencyAnalysisTool-ReplaceusesoftheJDK'sinternalAPIs

What to do ?

  • update policy dependencies to comply with supported versions of APIM
  • migrate the code to use the new package. it may need some rewriting of the policy as the class has changed a bit
  • create an integration test thanks to the sdk to verify everything works as expected
@exalate-issue-sync exalate-issue-sync bot changed the title [JWS Policy] Support Java 17 JWS Policy doesn't work with Java 17 Oct 26, 2023
@exalate-issue-sync
Copy link
Author

This issue has been fixed in versions 4.0.11, 3.20.22, 4.2.0, 4.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants