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:
- Having a pulsar cluster using JWT for authentication
- Create a partitionen topic
persistent://test/auth/topic with 2 partitions: ./bin/pulsar-admin topics create-partitioned-topic -p 2 persistent://test/auth/topic
- Grant
produce and consume permissions to role roleA: ./bin/pulsar-admin topics grant-permission --role roleA --actions produce,consume persistent://test/auth/topic
- Try produce and consume this topic using subscription
roleA-test, shoule be normal till now
- Update the topic partition number:
./bin/pulsar-admin topics update-partitioned-topic -p 4 persistent://test/auth/topic
- 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.
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 LookupTo Reproduce
Steps to reproduce the behavior:
persistent://test/auth/topicwith 2 partitions:./bin/pulsar-admin topics create-partitioned-topic -p 2 persistent://test/auth/topicproduceandconsumepermissions to roleroleA:./bin/pulsar-admin topics grant-permission --role roleA --actions produce,consume persistent://test/auth/topicroleA-test, shoule be normal till now./bin/pulsar-admin topics update-partitioned-topic -p 4 persistent://test/auth/topicroleAto produce/consume the topic using subscriptionroleA-testagain, we will get error:org.apache.pulsar.client.api.PulsarClientException$LookupException: Proxy Client is not authorized to Lookuporg.apache.pulsar.client.api.PulsarClientException$LookupException: Failed to subscribe persistent://test/auth/topic with 4 partitionsExpected 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.