Package de.otto.kafka.messaging.e2ee
Interface EncryptionKeyProvider
- All Known Implementing Classes:
CachedEncryptionKeyProvider,VaultEncryptionKeyProvider
public interface EncryptionKeyProvider
This is the central interface for the vault access.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classbase64 and URL-Encoded encoded AES key -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisEncryptedTopic(String kafkaTopicName) retrieveKeyForDecryption(String topic, int version) retrieveKeyForDecryption(String topic, int version, String encryptionKeyAttributeName) retrieveKeyForEncryption(String topic)
-
Method Details
-
retrieveKeyForEncryption
- Parameters:
topic- the name of the topic to encrypt- Returns:
- a key for encryption or
nullif encryption is not needed
-
retrieveKeyForDecryption
- Parameters:
topic- the name of the topic to decryptversion- the version of the key- Returns:
- base64 and URL-Encoded encoded key
-
retrieveKeyForDecryption
- Parameters:
topic- the name of the topic to decryptversion- the version of the keyencryptionKeyAttributeName- the name of the encryption key within the vault. Whennullthen the default value must be used.- Returns:
- base64 and URL-Encoded encoded key
-
isEncryptedTopic
- Parameters:
kafkaTopicName- the name of the topic- Returns:
truewhen the topic can contain encrypted payloads
-