Add team broker admin API credentials for the Expert bridge - #360
Merged
Conversation
The Expert chat bridge provisions itself through the EMQX admin API, but the forge config enabled the team broker without any broker.teamBroker.api credentials, so the bridge failed to build (Invalid URL, no connector). Add the api block, sourced from BROKER_API_KEY/BROKER_API_SECRET, and drive the emqx-api bootstrap from the same variables so the two always match.
hardillb
requested changes
Aug 4, 2026
hardillb
reviewed
Aug 4, 2026
hardillb
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The template enables Expert (
expert.enabled: truewithcentralBroker.server) and the team broker (broker.teamBroker.enabled: true), but the team broker had noapiblock. The Expert chat bridge provisions itself by calling the EMQX admin API, so without those credentials the bridge fails to build — forge logsError syncing EMQX bridge: Invalid URLand no connector is created, leaving chat with no responses.This adds
broker.teamBroker.api(url + key + secret) and drives both it and the existingemqx-apibootstrap key from the sameBROKER_API_KEY/BROKER_API_SECRETvariables, so an override can't put the two out of sync. Defaults match the previously hardcoded bootstrap (flowfuse/verySecret), so behaviour is unchanged for anyone not overriding them.Verification
Reproduced on a local stack: with the
apiblock removed the bridge logsInvalid URLand creates 0 connectors; with it present the connector comes upstatus=connectedand all bridge rules/sources are created. Confirmeddocker compose configrenders correctly with defaults and with overrides (both sides stay in sync).