Uh oh!
There was an error while loading. Please reload this page.
Unhide setting js.interpretation.enabled - #12605
Conversation
winterhazel
commented
Feb 6, 2026
@blueorangutan package |
js.interpretation.enabledblueorangutan
commented
Feb 6, 2026
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@## main #12605 +/- ##
============================================
- Coverage 18.00% 18.00% -0.01% - Complexity 16464 16465 +1
============================================
Files 5977 5976 -1 Lines 537726 537801 +75 Branches 66026 66039 +13 ============================================
+ Hits 96839 96840 +1 - Misses 429968 430039 +71 - Partials 10919 10922 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
blueorangutan
commented
Feb 6, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16729 |
DaanHoogland
commented
Feb 9, 2026
@blueorangutan test |
blueorangutan
commented
Feb 9, 2026
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Feb 9, 2026
[SF] Trillian Build Failed (tid-15416) |
Uh oh!
There was an error while loading. Please reload this page.
winterhazel
commented
Feb 9, 2026
@blueorangutan package |
blueorangutan
commented
Feb 9, 2026
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 9, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16762 |
DaanHoogland
commented
Feb 10, 2026
@blueorangutan test |
blueorangutan
commented
Feb 10, 2026
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Feb 10, 2026
[SF] Trillian Build Failed (tid-15426) |
There was a problem hiding this comment.
Pull request overview
This PR unhides the js.interpretation.enabled configuration setting, moving it from the "Hidden" category to the "System" category, and makes it dynamic so it can be changed without restarting the management server. This addresses issue #12523 where the management server would hang during startup when this setting was enabled. The PR refactors the JavaScript interpretation validation logic by introducing a new JsInterpreterHelper class that centralizes the configuration and validation logic.
Changes:
- Introduces
JsInterpreterHelperclass to centralize JS interpretation configuration and validation - Moves
js.interpretation.enabledfrom ManagementService to JsInterpreterHelper and changes it from "Hidden" to "System" category - Makes the configuration dynamic to allow runtime changes
- Migrates all validation calls from
ManagementService.checkJsInterpretationAllowedIfNeededForParameterValue()toJsInterpreterHelper.ensureInterpreterEnabledIfParameterProvided() - Adds database upgrade script to unhide and decrypt the existing configuration value
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/java/org/apache/cloudstack/jsinterpreter/JsInterpreterHelper.java | New helper class that implements Configurable interface and provides the JS_INTERPRETATION_ENABLED ConfigKey and validation method |
| server/src/main/java/com/cloud/storage/StorageManagerImpl.java | Updated to inject and use JsInterpreterHelper for validating storage pool and secondary storage selector operations |
| server/src/main/java/com/cloud/server/ManagementServerImpl.java | Removed old ConfigKey definition, jsInterpretationEnabled field, and validation method; unconditionally registers CreateSecondaryStorageSelectorCmd and UpdateSecondaryStorageSelectorCmd |
| server/src/main/java/com/cloud/resource/ResourceManagerImpl.java | Updated to inject and use JsInterpreterHelper for validating host update operations |
| plugins/database/quota/src/main/java/org/apache/cloudstack/quota/QuotaServiceImpl.java | Removed jsInterpretationEnabled field and isJsInterpretationEnabled() method |
| plugins/database/quota/src/main/java/org/apache/cloudstack/quota/QuotaService.java | Removed isJsInterpretationEnabled() method from interface |
| plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java | Updated to inject and use JsInterpreterHelper for validating quota tariff operations |
| engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42020to42030.java | Adds database migration to unhide and decrypt the js.interpretation.enabled configuration setting |
| api/src/main/java/com/cloud/server/ManagementService.java | Removed JsInterpretationEnabled ConfigKey and checkJsInterpretationAllowedIfNeededForParameterValue() method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
winterhazel
commented
Feb 19, 2026
@weizhouapache should be fixed now |
blueorangutan
commented
Feb 19, 2026
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 19, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16886 |
sureshanaparti
commented
Feb 20, 2026
@blueorangutan test |
blueorangutan
commented
Feb 20, 2026
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Feb 20, 2026
[SF] Trillian test result (tid-15503)
|
9343086 to
63c708aComparewinterhazel
commented
Apr 2, 2026
@blueorangutan package |
blueorangutan
commented
Apr 2, 2026
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Apr 2, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17345 |
There was a problem hiding this comment.
lgtm, manually tested in a local env:
Before
MariaDB [cloud]> select * from configuration where name = "js.interpretation.enabled";
+----------+----------+------------------+---------------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
| category | instance | component | name | value | description | default_value | updated | is_dynamic | group_id | subgroup_id | parent | display_text | kind | options | scope |
+----------+----------+------------------+---------------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
| Hidden | DEFAULT | ManagementServer | js.interpretation.enabled | 8M83R8t/pmuZGxpxDoQJlqvOiZHVcYFa0hBJilzKqA/T | Enable/Disable all JavaScript interpretation related functionalities to create or update Javascript rules. | false | 2026-01-08 18:09:46 | 0 | 1 | 1 | NULL | Js interpretation enabled | NULL | NULL | 1 |
+----------+----------+------------------+---------------------------+----------------------------------------------+------------------------------------------------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
1 row in set (0.001 sec)
After
MariaDB [cloud]> select * from configuration where name = "js.interpretation.enabled";
+----------+----------+---------------+---------------------------+-------+-----------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
| category | instance | component | name | value | description | default_value | updated | is_dynamic | group_id | subgroup_id | parent | display_text | kind | options | scope |
+----------+----------+---------------+---------------------------+-------+-----------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
| System | DEFAULT | JsInterpreter | js.interpretation.enabled | false | Enable/disable all JavaScript interpretation related functionalities. | false | 2026-04-09 20:53:32 | 1 | 1 | 1 | NULL | Js interpretation enabled | NULL | NULL | 1 |
+----------+----------+---------------+---------------------------+-------+-----------------------------------------------------------------------+---------------+---------------------+------------+----------+-------------+--------+---------------------------+------+---------+-------+
1 row in set (0.001 sec)
Management Server logs
> grep 'Updating setting' /var/log/cloudstack/management/management-server.log
2026-04-09 20:49:52,904 INFO [c.c.u.d.Upgrade42210to42300] (main:[]) (logid:) Updating setting 'js.interpretation.enabled' to decrypted value [false], and category 'System', component 'JsInterpreter', and is_dynamic '1'.@winterhazel, thanks for the PR. By the way, IMHO, hiding js.interpretation.enabled and changing its value to be encrypted was completely inappropriate. There are no known vulnerabilities in the ACS JS interpreter. We cannot simply hide a feature from the platform just because it has had a known vulnerability or because vulnerabilities could potentially be discovered in the future. If we follow this line of thinking, would we hide all ACS features by default?
winterhazel
commented
Apr 10, 2026
@bernardodemarco see #12523. This change was not appropriately discussed while addressing the vulnerability that prompted the introduction of the setting. |
@DaanHoogland could we run the CI here one last time? Edit: noticed a grammar mistake |
winterhazel
commented
Apr 10, 2026
@blueorangutan package |
blueorangutan
commented
Apr 10, 2026
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Apr 10, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17430 |
DaanHoogland
commented
Apr 10, 2026
@blueorangutan test |
blueorangutan
commented
Apr 10, 2026
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Apr 10, 2026
[SF] Trillian test result (tid-15850)
|
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR proposes unhiding
js.interpretation.enabled. For reference regarding why, see the discussion in #12523.Also, the configuration was made dynamic, and some extra refactoring was performed to organize the code (
JsInterpreterHelperalready exists inmain).Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
js.interpretation.enabled.Before the changes:
In the logs:
After the changes:
js.interpretation.enabledwas disabled. When the setting was enabled, I was able to create them successfully.