Class EncryptionExecutor
java.lang.Object
io.confluent.kafka.schemaregistry.encryption.EncryptionExecutor
- All Implemented Interfaces:
RuleBase,RuleExecutor,AutoCloseable,org.apache.kafka.common.Configurable
In envelope encryption, a user generates a data encryption key (DEK) locally, encrypts data with
the DEK, sends the DEK to a KMS to be encrypted (with a key managed by KMS - KEK), and then
stores the encrypted DEK. At a later point, a user can retrieve the encrypted DEK for the
encrypted data, use the KEK from KMS to decrypt the DEK, and use the decrypted DEK to decrypt
the data.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final byte[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final intprotected static final byteprotected static final intstatic final Stringprotected static final intFields inherited from interface io.confluent.kafka.schemaregistry.rules.RuleBase
DEFAULT_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()voidprotected byte[]generateDek(DekFormat dekFormat) newTransform(RuleContext ctx) voidsetSchemaRegistryClient(SchemaRegistryClient schemaRegistryClient) transform(RuleContext ctx, Object message) type()
-
Field Details
-
TYPE
- See Also:
-
ENCRYPT_KEK_NAME
- See Also:
-
ENCRYPT_KMS_KEY_ID
- See Also:
-
ENCRYPT_KMS_TYPE
- See Also:
-
ENCRYPT_DEK_ALGORITHM
- See Also:
-
ENCRYPT_DEK_EXPIRY_DAYS
- See Also:
-
ENCRYPT_ALTERNATE_KMS_KEY_IDS
- See Also:
-
KMS_TYPE_SUFFIX
- See Also:
-
EMPTY_AAD
public static final byte[] EMPTY_AAD -
CACHE_EXPIRY_SECS
- See Also:
-
CACHE_SIZE
- See Also:
-
CLOCK
- See Also:
-
LATEST_VERSION
protected static final int LATEST_VERSION- See Also:
-
MAGIC_BYTE
protected static final byte MAGIC_BYTE- See Also:
-
MILLIS_IN_DAY
protected static final int MILLIS_IN_DAY- See Also:
-
VERSION_SIZE
protected static final int VERSION_SIZE- See Also:
-
-
Constructor Details
-
EncryptionExecutor
public EncryptionExecutor()
-
-
Method Details
-
addOriginalConfigs
public boolean addOriginalConfigs()- Specified by:
addOriginalConfigsin interfaceRuleBase
-
setSchemaRegistryClient
- Specified by:
setSchemaRegistryClientin interfaceRuleBase
-
configure
-
type
-
transform
- Specified by:
transformin interfaceRuleExecutor- Throws:
RuleException
-
newTransform
public EncryptionExecutor.EncryptionExecutorTransform newTransform(RuleContext ctx) throws RuleException - Throws:
RuleException
-
getCryptors
-
generateDek
- Throws:
GeneralSecurityException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRuleBase- Throws:
RuleException
-