pan3793 commented on code in PR #5182:
URL: https://github.com/apache/kyuubi/pull/5182#discussion_r1304014588


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/SessionLimiter.scala:
##########
@@ -101,14 +101,21 @@ class SessionLimiterImpl(userLimit: Int, ipAddressLimit: 
Int, userIpAddressLimit
   }
 }
 
-class SessionLimiterWithUnlimitedUsersImpl(
+class SessionLimiterWithAccessControlListImpl(
     userLimit: Int,
     ipAddressLimit: Int,
     userIpAddressLimit: Int,
-    var unlimitedUsers: Set[String])
+    var unlimitedUsers: Set[String],
+    var limitedUsers: Set[String])
   extends SessionLimiterImpl(userLimit, ipAddressLimit, userIpAddressLimit) {
   override def increment(userIpAddress: UserIpAddress): Unit = {
-    if (!unlimitedUsers.contains(userIpAddress.user)) {
+    val user = userIpAddress.user
+    if (StringUtils.isNotBlank(user) && limitedUsers.contains(user)) {

Review Comment:
   I suppose when "limited user" is configured, connections from those users 
will be limited not rejected.
   
   e.g. 
   
   ```
   kyuubi.server.limit.connections.user.limited.list=tom,jerry
   kyuubi.server.limit.connections.per.user=10
   ```
   
   user "tom" and "jerry" are limited to opening up to 10 connections for each 
user, other users are not limited.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to