skoppu22 commented on code in PR #2648:
URL: https://github.com/apache/cassandra/pull/2648#discussion_r1321788285


##########
src/java/org/apache/cassandra/auth/CassandraCIDRAuthorizer.java:
##########
@@ -154,4 +154,10 @@ public boolean hasAccessFromIp(RoleResource role, 
InetAddress ipAddress)
                                                           
TimeUnit.NANOSECONDS);
         return hasAccess;
     }
+
+    @VisibleForTesting
+    public boolean has(RoleResource role)

Review Comment:
   CassandraCIDRAuthorizer has two caches in it - CIDRPermissionsCache and 
CIDRGroupsMappingCache. Naming this function has() doesn't indicate which cache 
are we looking into. Also, the same function won't be available when 
AllowAllCIDRAuthorizer is used. I prefer moving this has() into 
CIDRPermissionsManager, so we can make this function available regardless of 
CIDR authorizer selected, also available for nodetool commands through 
CIDRPermissionsManager mbean. I mean similar to the way 
CIDRPermissionsManager::invalidateCidrPermissionsCache implemented. If you 
don't mind, I can make those changes and send them to you to include here.



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