You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "javens0601 (via GitHub)" <gi...@apache.org> on 2023/12/14 11:43:09 UTC
[I] [Bug] when i updateAccessConfig with empty groupPerms, report error (org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .) [rocketmq]
javens0601 opened a new issue, #7662:
URL: https://github.com/apache/rocketmq/issues/7662
### Before Creating the Bug Report
- [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
- [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.
- [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
### Runtime platform environment
linux,windows
### RocketMQ version
rocketmq 5.1.4
### JDK Version
1.8.0
### Describe the Bug
org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .
The expected resource format is 'Res=Perm'. For example: topicA=SUB
at org.apache.rocketmq.acl.common.Permission.checkResourcePerms(Permission.java:100)
at org.apache.rocketmq.acl.plain.PlainPermissionManager.updateAccessConfig(PlainPermissionManager.java:310)
at org.apache.rocketmq.acl.plain.PlainAccessValidator.updateAccessConfig(PlainAccessValidator.java:55)
at org.apache.rocketmq.acl.plain.PlainAccessValidatorTest.testUpdateAccessConfigWhenGroupPermsIsNull(PlainAccessValidatorTest.java:1130)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
### Steps to Reproduce
@Test
public void testUpdateAccessConfigWhenGroupPermsIsNull() {
List<String> groupPerms = new ArrayList<>();
CreateAccessConfigRequestHeader requestHeader = new CreateAccessConfigRequestHeader();
requestHeader.setAccessKey("admin-user");
requestHeader.setSecretKey("123456789");
requestHeader.setAdmin(true);
requestHeader.setGroupPerms(UtilAll.join(groupPerms, ","));
PlainAccessValidator plainAccessValidator = new PlainAccessValidator();
PlainAccessConfig plainAccessConfig = new PlainAccessConfig();
plainAccessConfig.setAccessKey(requestHeader.getAccessKey());
plainAccessConfig.setSecretKey(requestHeader.getSecretKey());
plainAccessConfig.setAdmin(requestHeader.isAdmin());
plainAccessConfig.setGroupPerms(UtilAll.split(requestHeader.getGroupPerms(), ","));
// update
plainAccessValidator.updateAccessConfig(plainAccessConfig);
}
### What Did You Expect to See?
updateAccessConfig success
### What Did You See Instead?
org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .
The expected resource format is 'Res=Perm'. For example: topicA=SUB
### Additional Context
_No response_
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] when i updateAccessConfig with empty groupPerms, report error (org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7662:
URL: https://github.com/apache/rocketmq/issues/7662#issuecomment-2542574389
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] when i updateAccessConfig with empty groupPerms, report error (org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7662:
URL: https://github.com/apache/rocketmq/issues/7662#issuecomment-2547202347
This issue was closed because it has been inactive for 3 days since being marked as stale.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] when i updateAccessConfig with empty groupPerms, report error (org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .) [rocketmq]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7662: [Bug] when i updateAccessConfig with empty groupPerms, report error (org.apache.rocketmq.acl.common.AclException: Parse Resource format error for .)
URL: https://github.com/apache/rocketmq/issues/7662
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org