Skip to content

ACL deny by server on Publish still produces Success in client (python) #895

Description

@nipil

Bug Description

A python client publishing to a topic denied by ACL still gets a '0/success' reason_code

Reproduction

Environment

  • Python version: 3.11
  • Library version: paho-mqtt 2.1
  • Operating system (including version): docker/linux
  • MQTT server : mosquitto 2.0.21
  • server authentication : user foo password foo

Logs

Publishing to foo by authenticated foo user : expected "Success", got "Success"

CLIENT : Sending PUBLISH (d0, q0, r0, m1), 'b'foo'', ... (3 bytes)
SERVER: Received PUBLISH from auto-03B09290-F39A-6397-1F35-9F5F045BD652 (d0, q0, r0, m0, 'foo', ... (3 bytes))
CLIENT : on_publish mid=1 reason_code=0/Success

Publishing to bar by authenticated foo user : expected anything but "Success", yet still got "Success"

CLIENT: Sending PUBLISH (d0, q0, r0, m2), 'b'bar'', ... (3 bytes)
SERVER: Denied PUBLISH from auto-03B09290-F39A-6397-1F35-9F5F045BD652 (d0, q0, r0, m0, 'bar', ... (3 bytes))
CLIENT: on_publish mid=2 reason_code=0/Success

In case this is a normal/accepted/de-facto behaviour, please provide some insight as to :

  • where this is communicated in the documentation or specification
  • how it could be changed so that clients are actually notified of denyed publish

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions