Interface ICIDRAuthorizer

All Known Implementing Classes:
AbstractCIDRAuthorizer, AllowAllCIDRAuthorizer, CassandraCIDRAuthorizer

public interface ICIDRAuthorizer
Backend for CIDR authorization feature
  • Method Details

    • setup

      void setup()
    • initCaches

      void initCaches()
      Init caches held by CIDR authorizer
    • getCidrGroupsMappingManager

      CIDRGroupsMappingManager getCidrGroupsMappingManager()
    • getCidrAuthorizerMetrics

      CIDRAuthorizerMetrics getCidrAuthorizerMetrics()
    • requireAuthorization

      boolean requireAuthorization()
    • setCidrGroupsForRole

      void setCidrGroupsForRole(RoleResource role, CIDRPermissions cidrPermissions)
      Set CIDR permissions for a given role
      Parameters:
      role - role for which to set CIDR permissions
      cidrPermissions - CIR permissions to set for the role
    • dropCidrPermissionsForRole

      void dropCidrPermissionsForRole(RoleResource role)
      Drop CIDR permissions of a role
      Parameters:
      role - for which to drop cidr permissions
    • invalidateCidrPermissionsCache

      boolean invalidateCidrPermissionsCache(String roleName)
      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
    • validateConfiguration

      void validateConfiguration() throws ConfigurationException
      Throws:
      ConfigurationException
    • loadCidrGroupsCache

      void loadCidrGroupsCache()
      Load CIDR groups mapping cache
    • lookupCidrGroupsForIp

      Set<String> lookupCidrGroupsForIp(InetAddress ip)
      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

      boolean hasAccessFromIp(RoleResource role, InetAddress ipAddress)
      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