Package org.apache.cassandra.auth
Class CIDRPermissionsManager
java.lang.Object
org.apache.cassandra.auth.CIDRPermissionsManager
- All Implemented Interfaces:
AuthCache.BulkLoader<RoleResource,,CIDRPermissions> CIDRPermissionsManagerMBean
public class CIDRPermissionsManager
extends Object
implements CIDRPermissionsManagerMBean, AuthCache.BulkLoader<RoleResource,CIDRPermissions>
Provides functionality to list/update/drop CIDR permissions of a role
Backend to build Role to CIDR permissions cache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFunction to bulk load role to cidr permissions cache This gets called when cache warmup is enabled in the configvoiddrop(RoleResource role) Drop CIDR permissions of a role, i.e, delete corresponding row from the tableGet CIDR permissions of a rolebooleaninvalidateCidrPermissionsCache(String roleName) Invalidate given role from CIDR permissions cachevoidsetCidrGroupsForRole(RoleResource role, CIDRPermissions cidrPermissions) Set CIDR permissions for a given rolevoidsetup()
-
Field Details
-
MBEAN_NAME
- See Also:
-
-
Constructor Details
-
CIDRPermissionsManager
public CIDRPermissionsManager()
-
-
Method Details
-
setup
public void setup() -
getCidrPermissionsForRole
Get CIDR permissions of a role- Parameters:
role- role for which to get CIDR permissions- Returns:
- returns CIDR permissions of a role
-
setCidrGroupsForRole
Set CIDR permissions for a given role- Parameters:
role- role for which to set CIDR permissionscidrPermissions- CIR permissions to set for the role
-
drop
Drop CIDR permissions of a role, i.e, delete corresponding row from the table- Parameters:
role- for which to drop cidr permissions
-
bulkLoader
Function to bulk load role to cidr permissions cache This gets called when cache warmup is enabled in the config- Specified by:
bulkLoaderin interfaceAuthCache.BulkLoader<RoleResource,CIDRPermissions> - Returns:
- returns nothing
-
invalidateCidrPermissionsCache
Description copied from interface:CIDRPermissionsManagerMBeanInvalidate given role from CIDR permissions cache- Specified by:
invalidateCidrPermissionsCachein interfaceCIDRPermissionsManagerMBean- Parameters:
roleName- role to invalidate- Returns:
- returns true if given role found in the cache and invalidated, false otherwise
-