You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an bug of ACL during my work on RocketMQ.
When I tried to delete the last item of the ACL topic/group perms, there was an error which indicates the resouce fomat is incrorrect. And there's also an similar problem of the global white list, which is always remain an empty data at last.
Steps to Reproduce
To reproduce you can use two ways:
If you use the Dashboard(take the topic/group perms for example)
1.1 Create an ACL with mutiple topic perms and group perms.
1.2 Delete the topic perms or group perms one by one.
1.3 The error woud appear when delete the last one.
If you want to create an test method for reproduce
2.1 New an DefaultMQAdminExt and config it with namesrv and then start it.
2.2 New an PlainAccessConfig and setGroupPerms(Collections.EMPTY_LIST), setTopicPerms(Collections.EMPTY_LIST).
2.3 Then call DefaultMQAdminExt #createAndUpdatePlainAccessConfig.
2.4 Or to call DefaultMQAdminExt #updateGlobalWhiteAddrConfig with the second parmeter an empty string.
What Did You Expect to See?
For the topic/group perms, it should not be an error to delete the last item.
For the global white list, it should not be an empty data
What Did You See Instead?
For the topic/group perms, it popup an error:
org.apache.rocketmq.client.exception.MQClientException: CODE: 209 DESC: Parse Resource format error for .
The expected resource format is 'Res=Perm'. For example: topicA=SUB
For the global white list, it remains an empty data
Additional Context
I've already found and fixed the bug, and I'll submit an PR later.
The text was updated successfully, but these errors were encountered:
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
OS(CentOS release 7.6.1810)
RocketMQ version
branch(develop) version(5.1.5-SNAPSHOT)
JDK Version
Compliler(Oracke JDK 1.8.0_361) OS(CentOS release 7.6.1810)
Describe the Bug
I found an bug of ACL during my work on RocketMQ.
When I tried to delete the last item of the ACL topic/group perms, there was an error which indicates the resouce fomat is incrorrect. And there's also an similar problem of the global white list, which is always remain an empty data at last.
Steps to Reproduce
To reproduce you can use two ways:
1.1 Create an ACL with mutiple topic perms and group perms.
1.2 Delete the topic perms or group perms one by one.
1.3 The error woud appear when delete the last one.
2.1 New an DefaultMQAdminExt and config it with namesrv and then start it.
2.2 New an PlainAccessConfig and setGroupPerms(Collections.EMPTY_LIST), setTopicPerms(Collections.EMPTY_LIST).
2.3 Then call DefaultMQAdminExt #createAndUpdatePlainAccessConfig.
2.4 Or to call DefaultMQAdminExt #updateGlobalWhiteAddrConfig with the second parmeter an empty string.
What Did You Expect to See?
For the topic/group perms, it should not be an error to delete the last item.
For the global white list, it should not be an empty data
What Did You See Instead?
For the topic/group perms, it popup an error:
org.apache.rocketmq.client.exception.MQClientException: CODE: 209 DESC: Parse Resource format error for .
The expected resource format is 'Res=Perm'. For example: topicA=SUB
For the global white list, it remains an empty data
Additional Context
I've already found and fixed the bug, and I'll submit an PR later.
The text was updated successfully, but these errors were encountered: