You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/06/14 02:48:04 UTC

[GitHub] [rocketmq] lizhiboo commented on a diff in pull request #4457: [ISSUE #4426]fix ACL issue when sending messages back

lizhiboo commented on code in PR #4457:
URL: https://github.com/apache/rocketmq/pull/4457#discussion_r896324047


##########
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessValidator.java:
##########
@@ -72,13 +73,22 @@ public AccessResource parse(RemotingCommand request, String remoteAddr) {
         try {
             switch (request.getCode()) {
                 case RequestCode.SEND_MESSAGE:
-                    accessResource.addResourceAndPerm(request.getExtFields().get("topic"), Permission.PUB);
+                    final String topic = request.getExtFields().get("topic");
+                    if (PlainAccessResource.isRetryTopic(topic)) {
+                        accessResource.addResourceAndPerm(getRetryTopic(request.getExtFields().get("group")), Permission.SUB);

Review Comment:
   IMO, use topic as resource, because group is empty



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org