public class GridEncryptionManager extends GridManagerAdapter<EncryptionSpi> implements MetastorageLifecycleListener, IgniteChangeGlobalStateSupport
EncryptionSpi instances.
NOTE: Following protocol applied to statically configured caches.
For dynamically created caches key generated in request creation.
Group keys generation protocol:
| Modifier and Type | Class and Description |
|---|---|
static class |
GridEncryptionManager.NodeEncryptionKeys |
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
ENCRYPTION_KEY_PREFIX
Prefix for a encryption group key in meta store.
|
ctx, log| Constructor and Description |
|---|
GridEncryptionManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeCacheGroupStart(int grpId,
byte[] encKey)
Callback for cache group start event.
|
void |
checkEncryptedCacheSupported()
Checks cache encryption supported by all nodes in cluster.
|
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. |
GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
IgniteInternalFuture<Collection<byte[]>> |
generateKeys(int keyCnt) |
Serializable |
groupKey(int grpId)
Returns group encryption key.
|
void |
groupKey(int grpId,
byte[] encGrpKey)
Store group encryption key.
|
void |
onActivate(GridKernalContext kctx)
Called when cluster performing activation.
|
void |
onCacheGroupDestroyed(int grpId)
Callback for cache group destroy event.
|
void |
onDeActivate(GridKernalContext kctx)
Called when cluster performing deactivation.
|
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).
|
protected void |
onKernalStart0() |
protected void |
onKernalStop0(boolean cancel) |
void |
onLocalJoin()
Callback for local join.
|
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 clusterRestarted)
Client reconnected callback.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
IgniteNodeValidationResult |
validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
IgniteNodeValidationResult |
validateNode(ClusterNode node,
DiscoveryDataBag.JoiningNodeDiscoveryData discoData) |
assertParameter, enabled, getSpi, getSpi, getSpis, inject, onAfterSpiStart, onBeforeSpiStart, onKernalStart, onKernalStop, printMemoryStats, startInfo, startSpi, stopInfo, stopSpi, toStringpublic static final String ENCRYPTION_KEY_PREFIX
public GridEncryptionManager(GridKernalContext ctx)
ctx - Kernel context.public void start()
throws IgniteCheckedException
start in interface GridComponentIgniteCheckedException - Throws in case of any errors.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentcancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.protected void onKernalStart0()
throws IgniteCheckedException
onKernalStart0 in class GridManagerAdapter<EncryptionSpi>IgniteCheckedException - If failed.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<EncryptionSpi>cancel - Cancel flag.public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected in interface GridComponentonDisconnected in class GridManagerAdapter<EncryptionSpi>reconnectFut - Reconnect future.public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted)
onReconnected in interface GridComponentonReconnected in class GridManagerAdapter<EncryptionSpi>clusterRestarted - Cluster restarted flag.public void onLocalJoin()
@Nullable public IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
validateNode in interface GridComponentvalidateNode in class GridManagerAdapter<EncryptionSpi>@Nullable public IgniteNodeValidationResult validateNode(ClusterNode node)
validateNode in interface GridComponentvalidateNode in class GridManagerAdapter<EncryptionSpi>node - Joining node.null in case of success.public void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridManagerAdapter<EncryptionSpi>dataBag - container object to store discovery data in.public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived in interface GridComponentonJoiningNodeDataReceived in class GridManagerAdapter<EncryptionSpi>data - DiscoveryDataBag.JoiningNodeDiscoveryData interface to retrieve discovery data of joining node.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridManagerAdapter<EncryptionSpi>dataBag - container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridManagerAdapter<EncryptionSpi>data - DiscoveryDataBag.GridDiscoveryData interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).@Nullable public Serializable groupKey(int grpId)
grpId - Group id.public void groupKey(int grpId,
byte[] encGrpKey)
grpId - Group id.encGrpKey - Encrypted group key.public void beforeCacheGroupStart(int grpId,
@Nullable
byte[] encKey)
grpId - Group id.encKey - Encryption keypublic void onCacheGroupDestroyed(int grpId)
grpId - Group id.public void onReadyForRead(ReadOnlyMetastorage metastorage)
onReadyForRead in interface MetastorageLifecycleListenermetastorage - Read-only meta storage.public void onReadyForReadWrite(ReadWriteMetastorage metaStorage) throws IgniteCheckedException
onReadyForReadWrite in interface MetastorageLifecycleListenermetaStorage - Fully functional meta storage.IgniteCheckedExceptionpublic void onActivate(GridKernalContext kctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.IgniteCheckedException - If failed.public void onDeActivate(GridKernalContext kctx)
onDeActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.public IgniteInternalFuture<Collection<byte[]>> generateKeys(int keyCnt)
keyCnt - Count of keys to generate.public void checkEncryptedCacheSupported()
throws IgniteCheckedException
IgniteCheckedException - If check fails.public GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridManagerAdapter<EncryptionSpi>
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019