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/03/02 02:13:56 UTC

[GitHub] [rocketmq] ni-ze edited a comment on pull request #3910: [ISSUE#3909]fix fail to add back acl account after delete an account

ni-ze edited a comment on pull request #3910:
URL: https://github.com/apache/rocketmq/pull/3910#issuecomment-1056063500


   ```java
          String targetFileName = System.getProperty("rocketmq.home.dir") + File.separator + "conf/plain_acl.yml";
           Map<String, Object> backUpAclConfigMap = AclUtils.getYamlDataObject(targetFileName, Map.class);
   
           PlainAccessConfig plainAccessConfig = new PlainAccessConfig();
           plainAccessConfig.setAccessKey("rocketmq3");
           plainAccessConfig.setSecretKey("1234567890");
           plainAccessConfig.setWhiteRemoteAddress("192.168.0.*");
           plainAccessConfig.setDefaultGroupPerm("PUB");
           plainAccessConfig.setDefaultTopicPerm("SUB");
           List<String> topicPerms = new ArrayList<String>();
           topicPerms.add("topicC=PUB|SUB");
           topicPerms.add("topicB=PUB");
           plainAccessConfig.setTopicPerms(topicPerms);
           List<String> groupPerms = new ArrayList<String>();
           groupPerms.add("groupB=PUB|SUB");
           groupPerms.add("groupC=DENY");
           plainAccessConfig.setGroupPerms(groupPerms);
   
           PlainAccessValidator plainAccessValidator = new PlainAccessValidator();
           plainAccessValidator.updateAccessConfig(plainAccessConfig);
           
          //delete first.
           String accessKey = "rocketmq3";
           plainAccessValidator.deleteAccessConfig(accessKey);
           Thread.sleep(10000);
           
         //add again
          plainAccessValidator.updateAccessConfig(plainAccessConfig);
   ```
   The above test can reproduce 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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

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