kingkh1995 opened a new issue, #8615:
URL: https://github.com/apache/rocketmq/issues/8615

   ### 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
   
   windows11
   
   ### RocketMQ version
   
   develop
   
   ### JDK Version
   
   jdk8
   
   ### Describe the Bug
   
   if  authentication enabled and authorization disabled,execute 
DeleteUserSubCommand command will return failed,due to 'The 
authorizationMetadataProvider is not configured'。
   
   ### Steps to Reproduce
   
   1. broker.conf
   brokerClusterName = DefaultCluster
   brokerName = broker-a
   brokerId = 0
   deleteWhen = 04
   fileReservedTime = 48
   brokerRole = ASYNC_MASTER
   flushDiskType = ASYNC_FLUSH
   
   authenticationEnabled = true
   authenticationProvider = 
org.apache.rocketmq.auth.authentication.provider.DefaultAuthenticationProvider
   initAuthenticationUser = {"username":"rocketmq","password":"12345678"}
   innerClientAuthenticationCredentials = 
{"accessKey":"rocketmq","secretKey":"12345678"}
   authenticationMetadataProvider = 
org.apache.rocketmq.auth.authentication.provider.LocalAuthenticationMetadataProvider
   authenticationStrategy = 
org.apache.rocketmq.auth.authentication.strategy.StatefulAuthenticationStrategy
   
   2. execute DeleteUserSubCommand command 
   
   ### What Did You Expect to See?
   
   execute DeleteUserSubCommand command  success
   
   ### What Did You See Instead?
   
   org.apache.rocketmq.tools.command.SubCommandException: DeleteUserSubCommand 
command failed
        at 
org.apache.rocketmq.tools.command.auth.DeleteUserSubCommand.execute(DeleteUserSubCommand.java:97)
        at 
org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:179)
        at 
org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:129)
   Caused by: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 1  
DESC: An system error occurred, please try again later.
   For more information, please visit the url, 
https://rocketmq.apache.org/docs/bestPractice/06FAQ
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.deleteUser(MQClientAPIImpl.java:3402)
        at 
org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.deleteUser(DefaultMQAdminExtImpl.java:2021)
        at 
org.apache.rocketmq.tools.admin.DefaultMQAdminExt.deleteUser(DefaultMQAdminExt.java:942)
        at 
org.apache.rocketmq.tools.command.auth.DeleteUserSubCommand.execute(DeleteUserSubCommand.java:89)
        ... 2 more
   
   
   java.util.concurrent.CompletionException: java.lang.IllegalStateException: 
The authorizationMetadataProvider is not configured
        at 
java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
        at 
java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:998)
        at 
java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
        at 
org.apache.rocketmq.broker.processor.AdminBrokerProcessor.deleteUser(AdminBrokerProcessor.java:3068)
        at 
org.apache.rocketmq.broker.processor.AdminBrokerProcessor.processRequest(AdminBrokerProcessor.java:377)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.lambda$buildProcessRequestHandler$1(NettyRemotingAbstract.java:338)
        at 
org.apache.rocketmq.remoting.netty.RequestTask.run(RequestTask.java:80)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
   Caused by: java.lang.IllegalStateException: The 
authorizationMetadataProvider is not configured
        at 
org.apache.rocketmq.auth.authentication.manager.AuthenticationMetadataManagerImpl.getAuthorizationMetadataProvider(AuthenticationMetadataManagerImpl.java:218)
        at 
org.apache.rocketmq.auth.authentication.manager.AuthenticationMetadataManagerImpl.deleteUser(AuthenticationMetadataManagerImpl.java:149)
        at 
org.apache.rocketmq.broker.processor.AdminBrokerProcessor.lambda$deleteUser$6(AdminBrokerProcessor.java:3075)
        at 
java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
        ... 10 common frames omitted
   
   ### 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-unsubscr...@rocketmq.apache.org.apache.org

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

Reply via email to