public class IgniteAuthenticationProcessor extends GridProcessorAdapter implements GridSecurityProcessor, MetastorageLifecycleListener, PartitionsExchangeAware
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
IgniteAuthenticationProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
alterUser(String login,
char[] passwd)
Alters password of user with the specified login.
|
SecurityContext |
authenticate(AuthenticationContext authCtx)
Authenticates subject via underlying Authenticator.
|
SecuritySubject |
authenticatedSubject(UUID subjId)
Gets authenticated node subject.
|
Collection<SecuritySubject> |
authenticatedSubjects()
Gets collection of authenticated nodes.
|
SecurityContext |
authenticateNode(ClusterNode node,
SecurityCredentials cred)
Authenticates grid node with it's attributes via underlying Authenticator.
|
void |
authorize(String name,
SecurityPermission perm,
SecurityContext securityCtx)
Authorizes grid operation.
|
void |
checkUserOperation(UserManagementOperation op) |
void |
collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receiving
TcpDiscoveryNodeAddedMessage. |
void |
createUser(String login,
char[] passwd)
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 |
isGlobalNodeAuthentication()
Gets flag indicating whether all nodes or coordinator only should run the authentication for joining node.
|
void |
onDisconnected(IgniteFuture reconnectFut)
Client disconnected callback.
|
void |
onDoneBeforeTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
Callback from exchange process completion; called before topology is unlocked.
|
void |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onReadyForRead(ReadOnlyMetastorage metastorage)
Is called when metastorage is made ready for read-only operations very early on node startup phase.
|
void |
onReadyForReadWrite(ReadWriteMetastorage metastorage)
Fully functional metastore capable of performing reading and writing operations.
|
IgniteInternalFuture<?> |
onReconnected(boolean active)
Client reconnected callback.
|
void |
onSessionExpired(UUID subjId)
Callback invoked when subject session got expired.
|
SecurityContext |
securityContext(UUID subjId)
Gets security context for authenticated nodes and thin clients.
|
void |
startProcessor()
Starts processor.
|
void |
stop(boolean cancel)
Stops grid component.
|
static void |
validate(String login,
char[] passwd) |
assertParameter, collectJoiningNodeData, onJoiningNodeDataReceived, onKernalStart, printMemoryStats, start, toString, validateNode, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsandboxEnabledcollectJoiningNodeData, onJoiningNodeDataReceived, onKernalStart, printMemoryStats, start, validateNode, validateNodeonDoneAfterTopologyUnlock, onInitAfterTopologyLock, onInitBeforeTopologyLockpublic IgniteAuthenticationProcessor(GridKernalContext ctx)
ctx - Kernal context.public void startProcessor()
throws IgniteCheckedException
IgniteCheckedExceptionpublic 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 onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void onDisconnected(IgniteFuture reconnectFut)
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.public IgniteInternalFuture<?> onReconnected(boolean active)
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapteractive - Cluster restarted flag.public SecurityContext authenticate(AuthenticationContext authCtx) throws IgniteCheckedException
authenticate in interface GridSecurityProcessorauthCtx - Authentication context.True if succeeded, false otherwise.IgniteCheckedException - If error occurred.public static void validate(String login, char[] passwd) throws UserManagementException
login - User's login.passwd - Password.UserManagementException - On error.public void createUser(String login, char[] passwd) throws IgniteCheckedException
createUser in interface GridSecurityProcessorlogin - Login of the user to be created.passwd - User password.IgniteCheckedException - If error occurred.public void dropUser(String login) throws IgniteCheckedException
dropUser in interface GridSecurityProcessorlogin - Login of the user to be dropped.IgniteCheckedException - If error occurred.public void alterUser(String login, char[] passwd) throws IgniteCheckedException
alterUser in interface GridSecurityProcessorlogin - Login of the user which password should be altered.passwd - User password to alter.IgniteCheckedException - If error occurred.public void onReadyForRead(ReadOnlyMetastorage metastorage) throws IgniteCheckedException
onReadyForRead in interface MetastorageLifecycleListenermetastorage - Read-only meta storage.IgniteCheckedExceptionpublic void onReadyForReadWrite(ReadWriteMetastorage metastorage)
onReadyForReadWrite in interface MetastorageLifecycleListenermetastorage - Fully functional meta storage.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic 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 boolean enabled()
enabled in interface GridSecurityProcessorpublic void onDoneBeforeTopologyUnlock(GridDhtPartitionsExchangeFuture fut)
onDoneBeforeTopologyUnlock in interface PartitionsExchangeAwarefut - Partition map exchange future.public SecurityContext authenticateNode(ClusterNode node, SecurityCredentials cred) throws IgniteCheckedException
GridSecurityProcessor allows any Ignite node to join the Ignite cluster
without authentication check.authenticateNode in interface GridSecurityProcessornode - Node id to authenticate.cred - Security credentials.True if succeeded, false otherwise.IgniteCheckedException - If error occurred.public SecuritySubject authenticatedSubject(UUID subjId) throws IgniteCheckedException
authenticatedSubject in interface GridSecurityProcessorsubjId - Subject ID.IgniteCheckedException - If error occurred.public Collection<SecuritySubject> authenticatedSubjects() throws IgniteCheckedException
authenticatedSubjects in interface GridSecurityProcessorIgniteCheckedException - If error occurred.public boolean isGlobalNodeAuthentication()
isGlobalNodeAuthentication in interface GridSecurityProcessorTrue if all nodes should run authentication process, false otherwise.public void authorize(String name, SecurityPermission perm, SecurityContext securityCtx) throws SecurityException
authorize in interface GridSecurityProcessorname - Cache name or task class name.perm - Permission to authorize.securityCtx - Optional security context.SecurityException - If security check failed.public void onSessionExpired(UUID subjId)
onSessionExpired in interface GridSecurityProcessorsubjId - Subject ID.public SecurityContext securityContext(UUID subjId)
SecurityContext associated with the Ignite node is stored in
node attributes and is obtained automatically by the Ignite using the node ID
(see IgniteSecurityProcessor.withContext(java.util.UUID)). Since we use the node ID as the subject ID
during node authentication, this method is used for obtaining security context for thin clients only.
Note, that the returned security context does not contain the address of the security subject.
Since the client node does not store user data, the SecurityContext returned by the client node does
not contain any user information, address, or username.securityContext in interface GridSecurityProcessorsubjId - Security subject id.public void checkUserOperation(UserManagementOperation op) throws IgniteAccessControlException
op - User operation to check.IgniteAccessControlException - If operation check fails: user hasn't permissions for user management
or try to remove default user.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021