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

Verify Migration Preparedness for GraalJS as default scripting engine to execute Adaptive Scripts #21612

Closed
aaujayasena opened this issue Nov 5, 2024 · 5 comments
Labels
7.1.0-migration Affected/7.1.0-m4 Issue that get reported against IS7.1.0-M4 pack will be get this label Priority/Highest QA-Reported Issues reported by a QA Team/Authentication & registration Type/Bug
Milestone

Comments

@aaujayasena
Copy link
Contributor

aaujayasena commented Nov 5, 2024

Describe the issue:
From 7.1.0 uses GraalJS as the default engine for adaptive authentication scripts, replacing Nashorn [1]. This change could potentially impact customers who have developed their own adaptive functions [2]. Therefore, It would be essential to develop a migration plan and prioritize.

[1] #21182
[2] https://is.docs.wso2.com/en/next/references/extend/authentication/conditional-auth/write-custom-functions-for-conditional-authentication/

Key Considerations:

  • Identify Affected Customers:Identify any customers who have implemented custom adaptive functions and are planning to migrate to IS 7.1.0.
  • Migration Plan: Identify necessary changes for adaptive authentication scripts, create a detailed migration plan, and ensure resources are available to support script updates.
  • Engine Switching Options: Since WSO2 Identity Server now supports three JavaScript engines—Nashorn, OpenJDK Nashorn, and GraalJS—develop and share comprehensive guidance on how to switch between these engines, including clear configuration steps.
@aaujayasena aaujayasena added 7.1.0-migration Affected/7.1.0-m4 Issue that get reported against IS7.1.0-M4 pack will be get this label Priority/Highest QA-Reported Issues reported by a QA Team/Authentication & registration labels Nov 5, 2024
@shanggeeth shanggeeth changed the title Verify Migration Preparedness for Graal as default scripting engine to execute Adaptive Scripts Verify Migration Preparedness for GraalJS as default scripting engine to execute Adaptive Scripts Nov 6, 2024
@shanggeeth
Copy link
Contributor

Required Migration Steps:

In case customers have implemented their own custom adaptive functions,

  • They have to add the @HostAccess.Export imported from org.graalvm.polyglot.HostAccess package to the method of the class that is implementing @FunctionalInterface
  • Alternatively they can use other script engines without the need for this code level change.
[AdaptiveAuth]
ScriptEngine = "openjdkNashorn"
[AdaptiveAuth]
ScriptEngine = "nashorn"

@nilasini
Copy link
Contributor

nilasini commented Nov 6, 2024

@shanggeeth Did we create a migration doc issue? If not shall we create it?

@shanggeeth
Copy link
Contributor

@shanggeeth Did we create a migration doc issue? If not shall we create it?

Migration Doc Issue: #20613

@nilasini
Copy link
Contributor

closing since we are tracking with #20613

@nilasini nilasini added this to the 7.1.0-m6 milestone Nov 27, 2024
@aaujayasena
Copy link
Contributor Author

@shanggeeth I am planning to re-test using IS 7.1.0-M6. Could we proceed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.1.0-migration Affected/7.1.0-m4 Issue that get reported against IS7.1.0-M4 pack will be get this label Priority/Highest QA-Reported Issues reported by a QA Team/Authentication & registration Type/Bug
Projects
Development

No branches or pull requests

3 participants