Class AllowAllCIDRAuthorizer

java.lang.Object
org.apache.cassandra.auth.AbstractCIDRAuthorizer
org.apache.cassandra.auth.AllowAllCIDRAuthorizer
All Implemented Interfaces:
ICIDRAuthorizer

public class AllowAllCIDRAuthorizer extends AbstractCIDRAuthorizer
AllowAllCIDRAuthorizer allows any user to access from any CIDR i.e, disables CIDR authorization
  • Constructor Details

    • AllowAllCIDRAuthorizer

      public AllowAllCIDRAuthorizer()
  • Method Details

    • setup

      public void setup()
    • initCaches

      public void initCaches()
      Description copied from interface: ICIDRAuthorizer
      Init caches held by CIDR authorizer
    • requireAuthorization

      public boolean requireAuthorization()
      Specified by:
      requireAuthorization in interface ICIDRAuthorizer
      Overrides:
      requireAuthorization in class AbstractCIDRAuthorizer
    • invalidateCidrPermissionsCache

      public boolean invalidateCidrPermissionsCache(String roleName)
      Description copied from interface: ICIDRAuthorizer
      Invalidate given role from CIDR permissions cache
      Parameters:
      roleName - role to invalidate
      Returns:
      returns true if given role found in the cache and invalidated, false otherwise
    • loadCidrGroupsCache

      public void loadCidrGroupsCache()
      Description copied from interface: ICIDRAuthorizer
      Load CIDR groups mapping cache
    • lookupCidrGroupsForIp

      public Set<String> lookupCidrGroupsForIp(InetAddress ip)
      Description copied from interface: ICIDRAuthorizer
      Lookup IP in CIDR groups mapping cache
      Parameters:
      ip - input IP to lookup CIDR group
      Returns:
      returns best matching CIDR group for this IP
    • hasAccessFromIp

      public boolean hasAccessFromIp(RoleResource role, InetAddress ipAddress)
      Description copied from interface: ICIDRAuthorizer
      Determines does the given role has access from CIDR groups associated with given IP
      Parameters:
      role - role to check access
      ipAddress - IP of the client
      Returns:
      returns true if role has access from given IP, false otherwise