Package org.apache.cassandra.auth
Class CassandraNetworkAuthorizer
- java.lang.Object
-
- org.apache.cassandra.auth.CassandraNetworkAuthorizer
-
- All Implemented Interfaces:
AuthCache.BulkLoader<RoleResource,DCPermissions>
,INetworkAuthorizer
public class CassandraNetworkAuthorizer extends java.lang.Object implements INetworkAuthorizer
-
-
Constructor Summary
Constructors Constructor Description CassandraNetworkAuthorizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DCPermissions
authorize(RoleResource role)
Returns the dc permissions associated with the given rolejava.util.function.Supplier<java.util.Map<RoleResource,DCPermissions>>
bulkLoader()
void
drop(RoleResource role)
Called when a role is deleted, so any corresponding network permissions data can also be cleaned upvoid
setRoleDatacenters(RoleResource role, DCPermissions permissions)
void
setup()
Setup is called once upon system startup to initialize the INetworkAuthorizer.void
validateConfiguration()
Validates configuration of IAuthorizer implementation (if configurable).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.auth.INetworkAuthorizer
requireAuthorization
-
-
-
-
Method Detail
-
setup
public void setup()
Description copied from interface:INetworkAuthorizer
Setup is called once upon system startup to initialize the INetworkAuthorizer. For example, use this method to create any required keyspaces/column families.- Specified by:
setup
in interfaceINetworkAuthorizer
-
authorize
public DCPermissions authorize(RoleResource role)
Description copied from interface:INetworkAuthorizer
Returns the dc permissions associated with the given role- Specified by:
authorize
in interfaceINetworkAuthorizer
-
setRoleDatacenters
public void setRoleDatacenters(RoleResource role, DCPermissions permissions)
- Specified by:
setRoleDatacenters
in interfaceINetworkAuthorizer
-
drop
public void drop(RoleResource role)
Description copied from interface:INetworkAuthorizer
Called when a role is deleted, so any corresponding network permissions data can also be cleaned up- Specified by:
drop
in interfaceINetworkAuthorizer
-
validateConfiguration
public void validateConfiguration() throws ConfigurationException
Description copied from interface:INetworkAuthorizer
Validates configuration of IAuthorizer implementation (if configurable).- Specified by:
validateConfiguration
in interfaceINetworkAuthorizer
- Throws:
ConfigurationException
- when there is a configuration error.
-
bulkLoader
public java.util.function.Supplier<java.util.Map<RoleResource,DCPermissions>> bulkLoader()
- Specified by:
bulkLoader
in interfaceAuthCache.BulkLoader<RoleResource,DCPermissions>
-
-