chia7712 commented on code in PR #18432:
URL: https://github.com/apache/kafka/pull/18432#discussion_r1910700757


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -2684,49 +2628,15 @@ class KafkaApis(val requestChannel: RequestChannel,
       }
     }
 
-    // Forwarding has not happened yet, so handle both ZK and KRaft cases here
     if (remaining.resources().isEmpty) {
       sendResponse(Some(new IncrementalAlterConfigsResponseData()))
-    } else if ((!request.isForwarded) && metadataSupport.canForward() && 
isKRaftController) {
+    } else if ((!request.isForwarded) && metadataSupport.canForward()) {

Review Comment:
   Please remove unreachable path too



##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -485,44 +412,6 @@ class KafkaApisTest extends Logging {
     }
   }
 
-  @Test
-  def testAlterConfigsWithAuthorizer(): Unit = {

Review Comment:
   > You still need to do some level of authorization before forwarding
   
   You are absolutely correct. The log4j operation is not forwarded to the 
controller because it is used to configure "this" specific broker. Therefore, 
authorization for this operation must be performed within this broker.
   
   Please ensure that the related unit tests are maintained.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to