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


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -2647,31 +2612,12 @@ class KafkaApis(val requestChannel: RequestChannel,
     zkSupport.controller.listPartitionReassignments(partitionsOpt, 
sendResponseCallback)
   }
 
-  private def configsAuthorizationApiError(resource: ConfigResource): ApiError 
= {
-    val error = resource.`type` match {
-      case ConfigResource.Type.BROKER | ConfigResource.Type.BROKER_LOGGER => 
Errors.CLUSTER_AUTHORIZATION_FAILED
-      case ConfigResource.Type.TOPIC => Errors.TOPIC_AUTHORIZATION_FAILED
-      case ConfigResource.Type.GROUP => Errors.GROUP_AUTHORIZATION_FAILED
-      case rt => throw new InvalidRequestException(s"Unexpected resource type 
$rt for resource ${resource.name}")
-    }
-    new ApiError(error, null)
-  }
-
   def handleIncrementalAlterConfigsRequest(request: RequestChannel.Request): 
Unit = {
     val original = request.body[IncrementalAlterConfigsRequest]
     val preprocessingResponses = configManager.preprocess(original.data(),
       (rType, rName) => authHelper.authorize(request.context, ALTER_CONFIGS, 
rType, rName))

Review Comment:
   For my understanding (and here I am working under the assumption that these 
requests ought to be authorised on the KRaft controller now), should this be 
removed as well?



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

Review Comment:
   For my understanding, this is a ZK-only test because authorisation should no 
longer happen on a broker because the requests are forwarded to the KRaft 
controller where authorisation ought to happen?



-- 
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