mop icon indicating copy to clipboard operation
mop copied to clipboard

Fix mqtt disconnect due to appId permission bug when namespace policies update

Open oneby-wang opened this issue 5 months ago • 1 comments

Motivation

MQTTConsumer appId field is equivalent to the userRole in Authentication. The appId field will be used to do checkPermissionsAsync when namespace policies update. https://github.com/apache/pulsar/blob/0a949de4bfa3734194be87a8655763a4411be1b6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java#L1042-L1044

Modifications

Before: appId is set to "" After: appId is set to connection.getUserRole()

Verifying this change

  • [ ] Make sure that the change passes the CI checks.

Documentation

Check the box below.

Need to update docs?

  • [ ] doc-required

    (If you need help on updating docs, create a doc issue)

  • [x] no-need-doc

    (Please explain why)

  • [ ] doc

    (If this PR contains doc changes)

oneby-wang avatar Sep 08 '25 02:09 oneby-wang

@oneby-wang:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

github-actions[bot] avatar Sep 08 '25 02:09 github-actions[bot]