dragonls opened a new issue #10300:
URL: https://github.com/apache/pulsar/issues/10300


   **Describe the bug**
   While using partitioned topic, if we control the authorization of the topic 
in topic level and update the topic partiton number, new producer/consumer will 
recerive auth error 
`org.apache.pulsar.client.api.PulsarClientException$LookupException: Proxy 
Client is not authorized to Lookup`
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Having a pulsar cluster using JWT for authentication
   2. Create a partitionen topic `persistent://test/auth/topic` with 2 
partitions: `./bin/pulsar-admin topics create-partitioned-topic -p 2 
persistent://test/auth/topic`
   3. Grant `produce` and `consume` permissions to role `roleA`: 
`./bin/pulsar-admin topics grant-permission --role roleA --actions 
produce,consume persistent://test/auth/topic`
   4. Try produce and consume this topic using subscription `roleA-test`, 
shoule be normal till now
   5. Update the topic partition number: `./bin/pulsar-admin topics 
update-partitioned-topic -p 4 persistent://test/auth/topic`
   5. Try to use role `roleA` to produce/consume the topic using subscription 
`roleA-test` again, we will get error:
      - produce get error: 
`org.apache.pulsar.client.api.PulsarClientException$LookupException: Proxy 
Client is not authorized to Lookup`
      - consume get error: 
`org.apache.pulsar.client.api.PulsarClientException$LookupException: Failed to 
subscribe persistent://test/auth/topic with 4 partitions`
   
   **Expected behavior**
   After updating the partitioned topic, new producer/consumer of this topic 
should not get error.
   
   **Additional context**
   I tried branch 2.7 and master, both having this bug.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to