From 43cdd8d6915f10f6e6e9b9be0e93d91feba67638 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Fri, 18 Sep 2026 11:50:42 +0530 Subject: [PATCH] fix(mqtt): expose MQTT-over-WebSocket only over TLS (wss) Drop the plaintext port-80 ws router; the CONNECT frame carries a reusable JWT/session credential, so route /push only through the websecure entrypoint (wss), matching the TLS-only mqtts TCP router. Addresses the credentials-over-plaintext review finding. --- docker-compose.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b26a7db10b..79466a7af9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -384,11 +384,10 @@ services: - traefik.tcp.routers.appwrite_mqtt.tls=true - traefik.tcp.routers.appwrite_mqtt.service=appwrite_mqtt - traefik.tcp.services.appwrite_mqtt.loadbalancer.server.port=1883 - # MQTT-over-WebSocket for browser clients: ws(s):///push is terminated at the - # web/websecure entrypoints and forwarded to the broker's WebSocket listener (:8083). - - traefik.http.routers.appwrite_mqtt_ws.entrypoints=appwrite_web - - traefik.http.routers.appwrite_mqtt_ws.rule=PathPrefix(`/push`) - - traefik.http.routers.appwrite_mqtt_ws.service=appwrite_mqtt_ws + # MQTT-over-WebSocket for browser clients: wss:///push is terminated at the + # websecure entrypoint and forwarded to the broker's WebSocket listener (:8083). + # TLS-only (no plaintext ws on :80), mirroring the mqtts TCP router, so the reusable + # JWT/session credential in the CONNECT frame never traverses the network in the clear. - traefik.http.routers.appwrite_mqtt_ws_secure.entrypoints=appwrite_websecure - traefik.http.routers.appwrite_mqtt_ws_secure.rule=PathPrefix(`/push`) - traefik.http.routers.appwrite_mqtt_ws_secure.service=appwrite_mqtt_ws