Class VaultKeyStorage

java.lang.Object
org.gridgain.internal.encryption.storage.VaultKeyStorage
All Implemented Interfaces:
KeyStorage

public class VaultKeyStorage extends Object implements KeyStorage
Implementation of KeyStorage interface based on VaultManager.
  • Field Details

    • ENCRYPTION_KEYS_PREFIX

      public static final String ENCRYPTION_KEYS_PREFIX
      Default vault key prefix, used for table data encryption key chains (keyed by table id).
      See Also:
  • Constructor Details

    • VaultKeyStorage

      public VaultKeyStorage(org.apache.ignite.internal.vault.VaultManager vaultManager, org.gridgain.internal.encryption.EncryptionManager encryptionManager)
      Creates a storage that uses the default table encryption key prefix.
    • VaultKeyStorage

      public VaultKeyStorage(org.apache.ignite.internal.vault.VaultManager vaultManager, org.gridgain.internal.encryption.EncryptionManager encryptionManager, String prefix)
      Creates a storage that keeps its key chains under the given vault key prefix.
      Parameters:
      vaultManager - Vault manager.
      encryptionManager - Encryption manager used to wrap data encryption keys with the active KEK.
      prefix - Vault key prefix. Must be unique per subsystem so that chains of different subsystems do not collide.
  • Method Details

    • store

      public void store(String id, KeyChain keyChain)
      Description copied from interface: KeyStorage
      Stores provided key chain with identifier.
      Specified by:
      store in interface KeyStorage
      Parameters:
      id - Key chain identifier.
      keyChain - Key chain.
    • storeAll

      public void storeAll(Map<String,KeyChain> keyChains)
      Description copied from interface: KeyStorage
      Stores all provided key chains with associated identifiers.
      Specified by:
      storeAll in interface KeyStorage
      Parameters:
      keyChains - Key chains.
    • remove

      public void remove(String id)
      Description copied from interface: KeyStorage
      Removes key chain from storage associated with provided identifier.
      Specified by:
      remove in interface KeyStorage
      Parameters:
      id - Key chain identifier.
    • getKeyChain

      @Nullable public @Nullable KeyChain getKeyChain(String id)
      Description copied from interface: KeyStorage
      Returns key chain for provided identifier.
      Specified by:
      getKeyChain in interface KeyStorage
      Parameters:
      id - Key chain identifier.
    • getKeyChains

      public Map<String,KeyChain> getKeyChains()
      Description copied from interface: KeyStorage
      Returns all key chains.
      Specified by:
      getKeyChains in interface KeyStorage