Interface DataEncryptionKeyManager
- All Superinterfaces:
org.apache.ignite.internal.lang.Debuggable,org.apache.ignite.internal.manager.IgniteComponent
This manager organizes Data Encryption Keys (DEKs) into chains, where each chain represents a logical grouping of keys with a specific purpose (e.g., table encryption, cache encryption). Each key chain maintains multiple keys over time, with one key designated as active for new encryption operations. This design supports key rotation while maintaining access to historical keys for decrypting existing data.
Key chains provide isolation between different encrypted entities and enable independent key rotation policies. All keys within a chain share the same encryption provider configuration.
-
Field Summary
Fields inherited from interface org.apache.ignite.internal.lang.Debuggable
INDENTATION -
Method Summary
Modifier and TypeMethodDescriptionReturns active key for provided chain identifier.voidaddKey(String chainId, DataEncryptionKey newKey) Adds new data encryption key to chain with provided identifier.voidchangeActiveKey(String chainId, int keyId) Changes active data encryption key to key with provided identifier in key chain.booleancreateKeyChain(String chainId, DataEncryptionKey key, @Nullable String providerName) Creates new key chain with provided identifier and store key as active.Returns key with provided key identifier from chain with provided identifier.booleankeyChainExists(String chainId) Returns true if chain with provided identifier exists or false if not.voidregisterRotationListener(DekRotationListener listener) Registers a listener to receive notifications about DEK rotation events.voidRemoves key chain.voidInitiates a key rotation operation for the specified key chain.voidUnregisters a previously registered DEK rotation listener.Methods inherited from interface org.apache.ignite.internal.lang.Debuggable
dumpStateMethods inherited from interface org.apache.ignite.internal.manager.IgniteComponent
beforeNodeStop, startAsync, stopAsync, stopAsync
-
Method Details
-
createKeyChain
boolean createKeyChain(String chainId, DataEncryptionKey key, @Nullable @Nullable String providerName) Creates new key chain with provided identifier and store key as active. Provider name using to encrypt.- Parameters:
chainId- Key chain identifier.key- Data encryption key.providerName- Encryption provider name.- Returns:
trueif key chain is created andfalsein case when chain withchainIdalready exists.
-
activeKey
Returns active key for provided chain identifier.- Parameters:
chainId- Chain identifier.
-
getKey
Returns key with provided key identifier from chain with provided identifier.- Parameters:
chainId- Chain identifier.keyId- Key identifier.
-
keyChainExists
Returns true if chain with provided identifier exists or false if not.- Parameters:
chainId- Chain identifier.
-
addKey
Adds new data encryption key to chain with provided identifier.- Parameters:
chainId- Chain identifier.newKey- Data encryption key.
-
changeActiveKey
Changes active data encryption key to key with provided identifier in key chain.- Parameters:
chainId- Chain identifier.keyId- Key identifier.
-
remove
Removes key chain.- Parameters:
chainId- Chain identifier.
-
rotateKey
Initiates a key rotation operation for the specified key chain.This method generates a new Data Encryption Key (DEK) and adds it to the chain, then sets it as the active key. After rotation, new encryption operations will use the new key, while the previous keys remain available for decrypting existing data.
The rotation process triggers notifications to all registered
DekRotationListenerinstances, allowing dependent components to react to the key change, such as initiating re-encryption of existing data.- Parameters:
chainId- The identifier of the key chain to rotate.
-
registerRotationListener
Registers a listener to receive notifications about DEK rotation events.The listener will be notified when key rotation operations are completed for any key chain managed by this manager. This allows components to react to key changes, such as triggering re-encryption of data or updating cached keys.
- Parameters:
listener- The listener to register. Must not benull.- See Also:
-
unregisterRotationListener
Unregisters a previously registered DEK rotation listener.After unregistration, the listener will no longer receive notifications about key rotation events. If the listener was not previously registered, this method has no effect.
- Parameters:
listener- The listener to unregister. Must not benull.- See Also:
-