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.
This commit is contained in:
ArnabChatterjee20k committed 2026-09-18 11:50:42 +05:30
1 parent 655f3c8e6a
commit 43cdd8d691
1 file changed
+4 -5
+4 -5
View File
@@ -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)://<host>/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://<host>/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