Package org.apache.cassandra.auth
Class CIDRGroupsMappingManager
java.lang.Object
org.apache.cassandra.auth.CIDRGroupsMappingManager
- All Implemented Interfaces:
CIDRGroupsMappingManagerMBean
-
Field Summary
Fields -
Constructor Summary
Constructors -
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)protected static StringgetCidrTuplesSetString(List<CIDR> cidrs) voidTrigger reload of CIDR groups cachevoidrecreateCidrGroupsMapping(Map<String, List<String>> cidrGroupsMapping) UpdateAuthKeyspace.CIDR_GROUPStable with completly new mappings.voidsetup()voidupdateCidrGroup(String cidrGroupName, List<String> cidrs) Insert/Update CIDR group to CIDRs mapping in the tableAuthKeyspace.CIDR_GROUPS
-
Field Details
-
MBEAN_NAME
- See Also:
-
-
Constructor Details
-
CIDRGroupsMappingManager
public CIDRGroupsMappingManager()
-
-
Method Details
-
setup
public void setup() -
getCidrTuplesSetString
-
getCidrGroupsTableEntries
-
getAvailableCidrGroups
Description copied from interface:CIDRGroupsMappingManagerMBeanRetrieves available CIDR groups in the tableAuthKeyspace.CIDR_GROUPS- Specified by:
getAvailableCidrGroupsin interfaceCIDRGroupsMappingManagerMBean- Returns:
- returns CIDR groups set
-
retrieveCidrsFromRow
-
getCidrsOfCidrGroupAsStrings
Description copied from interface:CIDRGroupsMappingManagerMBeanRetrieves all CIDRs associated with a given CIDR group in the tableAuthKeyspace.CIDR_GROUPS, including invalid CIDRs (if exists)- Specified by:
getCidrsOfCidrGroupAsStringsin interfaceCIDRGroupsMappingManagerMBean- Parameters:
cidrGroupName- CIDR group to retrieve associated CIDRs- Returns:
- returns set of CIDRs as strings
-
updateCidrGroup
Description copied from interface:CIDRGroupsMappingManagerMBeanInsert/Update CIDR group to CIDRs mapping in the tableAuthKeyspace.CIDR_GROUPS- Specified by:
updateCidrGroupin interfaceCIDRGroupsMappingManagerMBean- Parameters:
cidrGroupName- CIDR group namecidrs- List of CIDRs as strings
-
dropCidrGroup
Description copied from interface:CIDRGroupsMappingManagerMBeanDelete 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- Specified by:
dropCidrGroupin interfaceCIDRGroupsMappingManagerMBean- Parameters:
cidrGroupName- CIDR group name
-
recreateCidrGroupsMapping
Description copied from interface:CIDRGroupsMappingManagerMBeanUpdateAuthKeyspace.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.- Specified by:
recreateCidrGroupsMappingin interfaceCIDRGroupsMappingManagerMBean- Parameters:
cidrGroupsMapping- CIDR group mappings
-
getCidrGroupsOfIP
Description copied from interface:CIDRGroupsMappingManagerMBeanGet CIDR groups of a given IP, when CIDR authorizer is enabled. Throws exception if CIDR authorizer is disabled- Specified by:
getCidrGroupsOfIPin interfaceCIDRGroupsMappingManagerMBean- Parameters:
ipStr- IP as a string- Returns:
- Set of strings
-
loadCidrGroupsCache
public void loadCidrGroupsCache()Description copied from interface:CIDRGroupsMappingManagerMBeanTrigger reload of CIDR groups cache- Specified by:
loadCidrGroupsCachein interfaceCIDRGroupsMappingManagerMBean
-