Package org.apache.cassandra.auth
Interface CIDRGroupsMappingManagerMBean
- All Known Implementing Classes:
CIDRGroupsMappingManager
public interface CIDRGroupsMappingManagerMBean
This class provides utility functions to list/update/drop CIDR groups mappings.
nodetool commands invoke these functions, hence need to register mbean even when
CIDR authorization is disabled
-
Method Summary
Modifier and TypeMethodDescriptionvoiddropCidrGroup(String cidrGroupName) Delete a CIDR group and associated mapping from the tableAuthKeyspace.CIDR_GROUPSthrows exception if input cidr group name doesn't exist in the table before deletionRetrieves available CIDR groups in the tableAuthKeyspace.CIDR_GROUPSgetCidrGroupsOfIP(String ipStr) Get CIDR groups of a given IP, when CIDR authorizer is enabled.getCidrsOfCidrGroupAsStrings(String cidrGroupName) Retrieves all CIDRs associated with a given CIDR group in the tableAuthKeyspace.CIDR_GROUPS, including invalid CIDRs (if exists)voidTrigger reload of CIDR groups cachevoidrecreateCidrGroupsMapping(Map<String, List<String>> cidrGroupsMapping) UpdateAuthKeyspace.CIDR_GROUPStable with completly new mappings.voidupdateCidrGroup(String cidrGroupName, List<String> cidrs) Insert/Update CIDR group to CIDRs mapping in the tableAuthKeyspace.CIDR_GROUPS
-
Method Details
-
getAvailableCidrGroups
Retrieves available CIDR groups in the tableAuthKeyspace.CIDR_GROUPS- Returns:
- returns CIDR groups set
-
getCidrsOfCidrGroupAsStrings
Retrieves all CIDRs associated with a given CIDR group in the tableAuthKeyspace.CIDR_GROUPS, including invalid CIDRs (if exists)- Parameters:
cidrGroupName- CIDR group to retrieve associated CIDRs- Returns:
- returns set of CIDRs as strings
-
updateCidrGroup
Insert/Update CIDR group to CIDRs mapping in the tableAuthKeyspace.CIDR_GROUPS- Parameters:
cidrGroupName- CIDR group namecidrs- List of CIDRs as strings
-
dropCidrGroup
Delete a CIDR group and associated mapping from the tableAuthKeyspace.CIDR_GROUPSthrows exception if input cidr group name doesn't exist in the table before deletion- Parameters:
cidrGroupName- CIDR group name
-
recreateCidrGroupsMapping
UpdateAuthKeyspace.CIDR_GROUPStable with completly new mappings. Insert nonexisting CIDR groups, update existing CIDR groups with given set of CIDRs and delete nolonger valid CIDR groups.- Parameters:
cidrGroupsMapping- CIDR group mappings
-
getCidrGroupsOfIP
Get CIDR groups of a given IP, when CIDR authorizer is enabled. Throws exception if CIDR authorizer is disabled- Parameters:
ipStr- IP as a string- Returns:
- Set of strings
-
loadCidrGroupsCache
void loadCidrGroupsCache()Trigger reload of CIDR groups cache
-