I have set the acl_file property in /etc/mosquitto/mosquitto.conf to /home/ubuntu/my.acl. In the ACL file, I have allow_anonymous false to disallow connections from clients that do not have user name.
From MQTT Lens, I tried connecting to this broker without passing user name. I don't see a connect message immediately in the log. However, when I delete the connection from MQTT Lens, I see the message as connected followed by a disconnect message.
ubuntu@ip-172-31-42-207:/var/log/mosquitto$ tail -f mosquitto.log
1527666604: New connection from 183.xx.xx.xx on port 1883.
1527666604: New client connected from 183.xx.xx.xx as lens_bWIkzTxFSc2BIIUQqqT35ipsiPV (c1, k120).
1527666746: Client lens_bWIkzTxFSc2BIIUQqqT35ipsiPV disconnected.
How can I confirm that allow_anonymous false actually denied the connection?