Summary
The Dashboard currently loads the multi-tenancy configuration through GET /configs?key=multi_tenancy and parses the HOCON response on the frontend.
When post_auth_tns_expression contains quotation marks, EMQX can represent the value using its multiline HOCON syntax ("""~...~"""). Handling that custom syntax in the Dashboard can cause the saved value to be displayed incorrectly when the configuration drawer is reopened.
Request the configuration in JSON format instead by sending Accept: application/json, then consume the JSON response directly.
Expected behavior
- The multi-tenancy configuration request asks EMQX for JSON.
- A saved
post_auth_tns_expression containing quotation marks is returned and displayed without modification.
- Reopening the namespace configuration drawer preserves values such as
"abcd" and coalesce(client_attrs.tag, "default").
Additional context
Summary
The Dashboard currently loads the multi-tenancy configuration through
GET /configs?key=multi_tenancyand parses the HOCON response on the frontend.When
post_auth_tns_expressioncontains quotation marks, EMQX can represent the value using its multiline HOCON syntax ("""~...~"""). Handling that custom syntax in the Dashboard can cause the saved value to be displayed incorrectly when the configuration drawer is reopened.Request the configuration in JSON format instead by sending
Accept: application/json, then consume the JSON response directly.Expected behavior
post_auth_tns_expressioncontaining quotation marks is returned and displayed without modification."abcd"andcoalesce(client_attrs.tag, "default").Additional context