Interface EncryptionKeyProvider

All Known Implementing Classes:
CachedEncryptionKeyProvider, VaultEncryptionKeyProvider

public interface EncryptionKeyProvider
This is the central interface for the vault access.
  • Method Details

    • retrieveKeyForEncryption

      EncryptionKeyProvider.KeyVersion retrieveKeyForEncryption(String topic)
      Parameters:
      topic - the name of the topic to encrypt
      Returns:
      a key for encryption or null if encryption is not needed
    • retrieveKeyForDecryption

      String retrieveKeyForDecryption(String topic, int version)
      Parameters:
      topic - the name of the topic to decrypt
      version - the version of the key
      Returns:
      base64 and URL-Encoded encoded key
    • retrieveKeyForDecryption

      String retrieveKeyForDecryption(String topic, int version, String encryptionKeyAttributeName)
      Parameters:
      topic - the name of the topic to decrypt
      version - the version of the key
      encryptionKeyAttributeName - the name of the encryption key within the vault. When null then the default value must be used.
      Returns:
      base64 and URL-Encoded encoded key
    • isEncryptedTopic

      default boolean isEncryptedTopic(String kafkaTopicName)
      Parameters:
      kafkaTopicName - the name of the topic
      Returns:
      true when the topic can contain encrypted payloads