Skip to content

[FIXED] MQTT: Account mapping was not used when sending JS requests#7598

Merged
derekcollison merged 1 commit intomainfrom
mqtt_js_api_mapping
Dec 2, 2025
Merged

[FIXED] MQTT: Account mapping was not used when sending JS requests#7598
derekcollison merged 1 commit intomainfrom
mqtt_js_api_mapping

Conversation

@kozlovic
Copy link
Copy Markdown
Member

@kozlovic kozlovic commented Dec 2, 2025

See new test TestMQTTJSApiMapping added in this PR. A leaf server has an account called "HUB" that does not have JetStream enabled but had mapping to convert JS.API.> to JS.HUB.API.>. The "HUB" account in the hub server has JetStream enabled.
The idea is that using the "HUB" account from the leafnode server should allow an MQTT client to connect. Without the fix, it would not because the request were sent on JS.API.> and not mapped properly.

Signed-off-by: Ivan Kozlovic ivan@synadia.com

See new test `TestMQTTJSApiMapping` added in this PR. A leaf server
has an account called "HUB" that does not have JetStream enabled
but had mapping to convert `JS.API.>` to `JS.HUB.API.>`. The "HUB"
account in the hub server has JetStream enabled.
The idea is that using the "HUB" account from the leafnode server
should allow an MQTT client to connect. Without the fix, it would
not because the request were sent on `JS.API.>` and not mapped
properly.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic requested a review from a team as a code owner December 2, 2025 02:00
Copy link
Copy Markdown
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 34b2c93 into main Dec 2, 2025
68 of 70 checks passed
@derekcollison derekcollison deleted the mqtt_js_api_mapping branch December 2, 2025 03:01
neilalexander added a commit that referenced this pull request Dec 5, 2025
Includes the following:

- #7581
- #7585
- #7586
- #7565
- #7588
- #7593
- #7589
- #7594
- #7595
- #7596
- #7597
- #7598
- #7600
- #7601
- #7602
- #7604
- #7605
- #7607
- #7609
- #7610
- #7616
- #7614

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Dec 18, 2025
Includes the following:

- #7553
- #7555
- #7579
- #7578
- #7581
- #7585
- #7586
- #7588
- #7593
- #7594
- #7595
- #7596
- #7597
- #7598
- #7601
- #7604
- #7605
- #7610
- #7616
- #7614
- #7622
- #7619
- #7624
- #7625
- #7627
- #7636
- #7637
- #7643
- #7648
- #7634
- #7655
- #7656

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants