Skip to content

[6.2] Request multi-tenancy configuration as JSON instead of parsing HOCON #3807

Description

@Kinplemelon

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions