Class DataEncryptionKeyManagerImpl

java.lang.Object
org.gridgain.internal.encryption.storage.DataEncryptionKeyManagerImpl
All Implemented Interfaces:
org.apache.ignite.internal.event.EventListener<org.gridgain.internal.encryption.event.EncryptionEventParameters>, org.apache.ignite.internal.lang.Debuggable, org.apache.ignite.internal.manager.IgniteComponent, DataEncryptionKeyManager

public class DataEncryptionKeyManagerImpl extends Object implements DataEncryptionKeyManager, org.apache.ignite.internal.manager.IgniteComponent, org.apache.ignite.internal.event.EventListener<org.gridgain.internal.encryption.event.EncryptionEventParameters>
Serves for managing data encryption keys and related datastructure located in the heap.
  • Field Summary

    Fields inherited from interface org.apache.ignite.internal.lang.Debuggable

    INDENTATION
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataEncryptionKeyManagerImpl(KeyStorage storage, org.gridgain.internal.encryption.EncryptionManager encryptionManager, org.apache.ignite.internal.failure.FailureProcessor failureProcessor)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gridgain.internal.encryption.provider.DataEncryptionKey
    activeKey(String chainId)
    Returns active key for provided chain identifier.
    void
    addKey(String chainId, org.gridgain.internal.encryption.provider.DataEncryptionKey newKey)
    Adds new data encryption key to chain with provided identifier.
    void
    changeActiveKey(String chainId, int keyId)
    Changes active data encryption key to key with provided identifier in key chain.
    boolean
    createKeyChain(String chainId, org.gridgain.internal.encryption.provider.DataEncryptionKey key, @Nullable String providerName)
    Creates new key chain with provided identifier and store key as active.
    org.gridgain.internal.encryption.provider.DataEncryptionKey
    getKey(String chainId, int keyId)
    Returns key with provided key identifier from chain with provided identifier.
    boolean
    Returns true if chain with provided identifier exists or false if not.
    notify(org.gridgain.internal.encryption.event.EncryptionEventParameters parameters)
     
    void
    remove(String chainId)
    Removes key chain.
    startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
     
    stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.ignite.internal.lang.Debuggable

    dumpState

    Methods inherited from interface org.apache.ignite.internal.manager.IgniteComponent

    beforeNodeStop, stopAsync
  • Constructor Details

    • DataEncryptionKeyManagerImpl

      public DataEncryptionKeyManagerImpl(KeyStorage storage, org.gridgain.internal.encryption.EncryptionManager encryptionManager, org.apache.ignite.internal.failure.FailureProcessor failureProcessor)
      Constructor.
      Parameters:
      storage - Key chain storage.
      encryptionManager - Encryption manager.
      failureProcessor - Failure processor that is used to handle critical errors.
  • Method Details

    • activeKey

      public org.gridgain.internal.encryption.provider.DataEncryptionKey activeKey(String chainId)
      Description copied from interface: DataEncryptionKeyManager
      Returns active key for provided chain identifier.
      Specified by:
      activeKey in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
    • getKey

      public org.gridgain.internal.encryption.provider.DataEncryptionKey getKey(String chainId, int keyId)
      Description copied from interface: DataEncryptionKeyManager
      Returns key with provided key identifier from chain with provided identifier.
      Specified by:
      getKey in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
      keyId - Key identifier.
    • keyChainExists

      public boolean keyChainExists(String chainId)
      Description copied from interface: DataEncryptionKeyManager
      Returns true if chain with provided identifier exists or false if not.
      Specified by:
      keyChainExists in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
    • createKeyChain

      public boolean createKeyChain(String chainId, org.gridgain.internal.encryption.provider.DataEncryptionKey key, @Nullable @Nullable String providerName)
      Description copied from interface: DataEncryptionKeyManager
      Creates new key chain with provided identifier and store key as active. Provider name using to encrypt.
      Specified by:
      createKeyChain in interface DataEncryptionKeyManager
      Parameters:
      chainId - Key chain identifier.
      key - Data encryption key.
      providerName - Encryption provider name.
      Returns:
      true if key chain is created and false in case when chain with chainId already exists.
    • addKey

      public void addKey(String chainId, org.gridgain.internal.encryption.provider.DataEncryptionKey newKey)
      Description copied from interface: DataEncryptionKeyManager
      Adds new data encryption key to chain with provided identifier.
      Specified by:
      addKey in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
      newKey - Data encryption key.
    • changeActiveKey

      public void changeActiveKey(String chainId, int keyId)
      Description copied from interface: DataEncryptionKeyManager
      Changes active data encryption key to key with provided identifier in key chain.
      Specified by:
      changeActiveKey in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
      keyId - Key identifier.
    • remove

      public void remove(String chainId)
      Description copied from interface: DataEncryptionKeyManager
      Removes key chain.
      Specified by:
      remove in interface DataEncryptionKeyManager
      Parameters:
      chainId - Chain identifier.
    • startAsync

      public CompletableFuture<Void> startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      startAsync in interface org.apache.ignite.internal.manager.IgniteComponent
    • stopAsync

      public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      stopAsync in interface org.apache.ignite.internal.manager.IgniteComponent
    • notify

      public CompletableFuture<Boolean> notify(org.gridgain.internal.encryption.event.EncryptionEventParameters parameters)
      Specified by:
      notify in interface org.apache.ignite.internal.event.EventListener<org.gridgain.internal.encryption.event.EncryptionEventParameters>