Closed byteneumann closed 1 month ago
Thanks for the report. The null-check would probably have been enough, but I added an extra check to make sure that the user is registered as anonymous when the username is null. I also added some tests for this situation.
I'll release a new version with the fix soon.
I noticed that subscribing the MQTT server, with authentication enabled, without a user leads to unresponsive behaviour.
Setup
I am using Helm to run FROST-Server and mqtt.js as client.
frost.auth.provider
is set tode.fraunhofer.iosb.ilt.frostserver.auth.basic.BasicAuthProvider
and TLS is configured for MQTT.Problem
When connecting to the WebSocket (Secure) endpoint and while not providing a
user
for authentication, the Podfrost-server-mqtt
logs the following:After that, the Websocket endpoint seems instable. One or two subscribes may be successful, but for subsequent reconnects the MQTT server appears offline. It may come back, but I also observed a fast change from
subscribed
tooffline
.Only after a
kubectl rollout restart
, the server is ok, again.Fix?
Maybe adding
user == null ||
in https://github.com/FraunhoferIOSB/FROST-Server/blob/6a0bb1c6775addf20f3f3bd5120bf6a8fa7b180a/FROST-Server.MQTT.Moquette/src/main/java/de/fraunhofer/iosb/ilt/frostserver/mqtt/moquette/AuthWrapper.java#L183 will be enough to fix this?