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

[Java 21 runtime] Java 21 runtime support for WSO2 Identity Server #21158

Open
indeewari opened this issue Sep 25, 2024 · 8 comments
Open

[Java 21 runtime] Java 21 runtime support for WSO2 Identity Server #21158

indeewari opened this issue Sep 25, 2024 · 8 comments
Assignees
Milestone

Comments

@indeewari
Copy link
Contributor

indeewari commented Sep 25, 2024

Describe the issue:
The latest LTS release of Java; Java 21 was released on September 2023. As Identity Server is a downloadable product which will be used years after its releases, its important to plan for the latest LTS support for a upcoming release proactively.

This initiative aims to ensure compatibility with the Java 21 runtime for the IS product.

  1. Remove sun.java dependencies to ensure compatibility with the Java 21 LTS .
  2. Resolving Strong Encapsulation Errors.
  3. Product IS builder github actions for 17 and 21.
  4. Test failures with Nashorn.
  5. Update the Docker images on Java 21 runtime.
  6. Update the official IS documentation for Java 21 runtime support.
@indeewari
Copy link
Contributor Author

indeewari commented Sep 25, 2024

  1. Remove sun.java dependencies to ensure compatibility with the Java 21 LTS runtime.

With the introduction of Java 21 LTS, most of the sun.java classes and methods are no longer supported. These internal APIs were never intended for public use and have been strongly encapsulated since Java 9. Continuing to rely on them in Java 21 poses significant risks, including potential runtime failures and compatibility issues. Therefore, it's essential to refactor the codebase to replace sun.java dependencies with standard, supported Java APIs to ensure long-term stability and maintainability of the product.

Related PRs

@indeewari indeewari self-assigned this Sep 26, 2024
@indeewari
Copy link
Contributor Author

indeewari commented Sep 26, 2024

  1. Resolving Strong Encapsulation Errors in JDK Internals

Some non-critical JDK internals, which are strongly encapsulated, are accessed via reflection for audit purposes. There are two approaches to address this:

  1. Eliminate the use of strongly encapsulated JDK internals accessed through reflection.
  2. Opt for relaxed strong encapsulation.

The choice between these options should be made on a case-by-case basis.

After evaluating backward compatibility, impact areas, and implementation complexity, we have opted for relaxed strong encapsulation for the following modules:

For java.base:

  • sun.security.util
  • java.security
  • sun.security.rsa
  • java.security.cert

Related PRs

@indeewari
Copy link
Contributor Author

indeewari commented Oct 4, 2024

@indeewari
Copy link
Contributor Author

indeewari commented Oct 4, 2024

@indeewari
Copy link
Contributor Author

indeewari commented Oct 21, 2024

@indeewari
Copy link
Contributor Author

indeewari commented Oct 21, 2024

  1. Update the official IS documentation for Java 21 runtime support.
    Email "[Architecture] Review of JDK Compatibility Matrix for WSO2 Identity Server"

@indeewari
Copy link
Contributor Author

indeewari commented Oct 25, 2024

This task is in the state of completed.
Waiting for wso2/docs-is#4824 pr to be merged to close the issue.

Email reference "Review of JDK Compatibility Matrix for WSO2 Identity Server"

@indeewari
Copy link
Contributor Author

  1. Update the error message on startup

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

2 participants