public class IgniteSecurityProcessor extends IgniteSecurityAdapter
IgniteSecurity implementation.
IgniteSecurityProcessor serves here as a facade with is exposed to Ignite internal code,
while GridSecurityProcessor is hidden and managed from IgniteSecurityProcessor.
This implementation of IgniteSecurity is responsible for:
GridSecurityProcessor;GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_GRID_SEC_PROC_CLASS
Internal attribute name constant.
|
ctx, diagnosticLog| Constructor and Description |
|---|
IgniteSecurityProcessor(GridKernalContext ctx,
GridSecurityProcessor secPrc) |
| Modifier and Type | Method and Description |
|---|---|
void |
alterUser(String login,
char[] pwd)
Alters password of user with the specified login.
|
SecurityContext |
authenticate(AuthenticationContext ctx)
Delegates call to
GridSecurityProcessor.authenticate(AuthenticationContext) |
SecuritySubject |
authenticatedSubject(UUID subjId)
Delegates call to
GridSecurityProcessor.authenticatedSubject(UUID) |
Collection<SecuritySubject> |
authenticatedSubjects()
Delegates call to
GridSecurityProcessor.authenticatedSubjects() |
SecurityContext |
authenticateNode(ClusterNode node,
SecurityCredentials cred)
|
void |
authorize(String name,
SecurityPermission perm)
Authorizes grid operation.
|
void |
collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receiving
TcpDiscoveryNodeAddedMessage. |
void |
collectJoiningNodeData(DiscoveryDataBag dataBag)
Collects discovery data on joining node before sending
TcpDiscoveryJoinRequestMessage request. |
void |
createUser(String login,
char[] pwd)
Creates user with the specified login and password.
|
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
void |
dropUser(String login)
Drops user with the specified login.
|
boolean |
enabled() |
boolean |
isDefaultContext() |
boolean |
isGlobalNodeAuthentication()
Delegates call to
GridSecurityProcessor.isGlobalNodeAuthentication() |
boolean |
isSystemType(Class<?> cls) |
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node).
|
void |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onLocalJoin()
Callback for local join events for which the regular events are not generated.
|
@Nullable IgniteInternalFuture<?> |
onReconnected(boolean clusterRestarted)
Client reconnected callback.
|
void |
onSessionExpired(UUID subjId)
Delegates call to
GridSecurityProcessor.onSessionExpired(UUID) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
IgniteSandbox |
sandbox() |
SecurityContext |
securityContext() |
GridSecurityProcessor |
securityProcessor() |
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
@Nullable IgniteNodeValidationResult |
validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
@Nullable IgniteNodeValidationResult |
validateNode(ClusterNode node,
DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
OperationSecurityContext |
withContext(SecurityContext secCtx)
Creates
OperationSecurityContext. |
OperationSecurityContext |
withContext(UUID subjId)
Creates
OperationSecurityContext. |
assertParameter, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitauthorizepublic static final String ATTR_GRID_SEC_PROC_CLASS
public IgniteSecurityProcessor(GridKernalContext ctx, GridSecurityProcessor secPrc)
ctx - Grid kernal context.secPrc - Security processor.public OperationSecurityContext withContext(SecurityContext secCtx)
OperationSecurityContext. All calls of methods IgniteSecurity.authorize(String, SecurityPermission) or IgniteSecurity.authorize(SecurityPermission) will be processed into the context of passed SecurityContext until
holder OperationSecurityContext will be closed.secCtx - Security Context.public OperationSecurityContext withContext(UUID subjId)
OperationSecurityContext. All calls of methods IgniteSecurity.authorize(String, SecurityPermission) or IgniteSecurity.authorize(SecurityPermission) will be processed into the context of SecurityContext that is owned by
the node with given nodeId until holder OperationSecurityContext will be closed.subjId - Node id.public boolean isDefaultContext()
True if current thread executed in default security context.public SecurityContext securityContext()
OperationSecurityContext.public SecurityContext authenticateNode(ClusterNode node, SecurityCredentials cred) throws IgniteCheckedException
GridSecurityProcessor.authenticateNode(org.apache.ignite.cluster.ClusterNode,
org.apache.ignite.plugin.security.SecurityCredentials)IgniteCheckedExceptionpublic boolean isGlobalNodeAuthentication()
GridSecurityProcessor.isGlobalNodeAuthentication()public SecurityContext authenticate(AuthenticationContext ctx) throws IgniteCheckedException
GridSecurityProcessor.authenticate(AuthenticationContext)IgniteCheckedExceptionpublic Collection<SecuritySubject> authenticatedSubjects() throws IgniteCheckedException
GridSecurityProcessor.authenticatedSubjects()IgniteCheckedExceptionpublic SecuritySubject authenticatedSubject(UUID subjId) throws IgniteCheckedException
GridSecurityProcessor.authenticatedSubject(UUID)IgniteCheckedExceptionpublic void onSessionExpired(UUID subjId)
GridSecurityProcessor.onSessionExpired(UUID)public void authorize(String name, SecurityPermission perm) throws SecurityException
name - Cache name or task class name.perm - Permission to authorize.SecurityException - If security check failed.public IgniteSandbox sandbox()
public boolean enabled()
public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.GridDiscoveryData interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived in interface GridComponentonJoiningNodeDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.JoiningNodeDiscoveryData interface to retrieve discovery data of joining node.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapter@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.null in case of success.@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.discoData - Joining node discovery data.null in case of success.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.IgniteCheckedException - If failed.@Nullable public @Nullable IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapterclusterRestarted - Cluster restarted flag.IgniteCheckedException - If failed.public void createUser(String login, char[] pwd) throws IgniteCheckedException
login - Login of the user to be created.pwd - User password.IgniteCheckedException - If error occurred.public void alterUser(String login, char[] pwd) throws IgniteCheckedException
login - Login of the user which password should be altered.pwd - User password to alter.IgniteCheckedException - If error occurred.public void dropUser(String login) throws IgniteCheckedException
login - Login of the user to be dropped.IgniteCheckedException - If error occurred.public void onLocalJoin()
public boolean isSystemType(Class<?> cls)
isSystemType in interface IgniteSecurityisSystemType in class IgniteSecurityAdaptercls - The class for which the check is to be performed.GridSecurityProcessor.isSystemType(Class)public GridSecurityProcessor securityProcessor()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023