TakaHiR07 commented on code in PR #16792:
URL: https://github.com/apache/pulsar/pull/16792#discussion_r938399106
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java:
##########
@@ -392,23 +392,6 @@ public CompletableFuture<Boolean>
checkPermission(TopicName topicName, String ro
return true;
}
}
-
Review Comment:
> I mean that both can produce messages.
Actually in pulsar old version, this situation can only produce to one
partition.
If we just authorized "pulsar-admin topics permissions
persistent://my-tenant/my-namespace/my-topic-partition-0" in old version, only
the 0 partition has permission, and the base topic has no permission, therefore
msg can only be produced to partition 0, but cannot be produced to base topic.
So if we do compatible with the behavior of the old version, it should only
can produce to partition 0, but not have permission to produce to base topic?
Or do you think that both should be able to produced in the new version?
Besides, If we authorized "pulsar-admin topics permissions
persistent://my-tenant/my-namespace/my-topic" in old version, both the base
topic and the two partitions will have permissions. Then this pr use
topicName.getPartitionedTopicName() to grant, revoke and check. No matter
whether the request is the partition "my-topic-partition-0" or the base topic
"my-topic", it will be mapped to base topic "my-topic". Since old version has
base topic permission, I think this can satisfy the compatibility with old
version.
Thank you for your review and Please take a look about it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]