splett2 commented on a change in pull request #9628:
URL: https://github.com/apache/kafka/pull/9628#discussion_r536391337



##########
File path: core/src/main/scala/kafka/admin/ConfigCommand.scala
##########
@@ -864,11 +885,21 @@ object ConfigCommand extends Config {
         }
       }
 
+      if (hasEntityName && entityTypeVals.contains(ConfigType.Ip)) {
+        Seq(entityName, 
ip).filter(options.has(_)).map(options.valueOf(_)).foreach { ipAddress =>
+          if (!Utils.validHostPattern(ipAddress))

Review comment:
       it looks like `max.connections.per.ip` permits hosts in addition to IPs.
   
   ```
       val invalidAddresses = 
maxConnectionsPerIpOverrides.keys.filterNot(address => 
Utils.validHostPattern(address))
       if (!invalidAddresses.isEmpty)
         throw new 
IllegalArgumentException(s"${KafkaConfig.MaxConnectionsPerIpOverridesProp} 
contains invalid addresses : ${invalidAddresses.mkString(",")}")
   ```
   Do you think we should go for consistency with the existing IP quota prop or 
go for more strict enforcement (only IPs permitted).




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

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


Reply via email to