-
Notifications
You must be signed in to change notification settings - Fork 9
Decryption using python and aws kms #19
Description
Hello @hpgrahsl, we are planning to create an encryption/decryption architecture using kryptonite-for-kafka in Debezium source connector but facing some issues mentioned below:
-
I have successfully produced encrypted data in Kafka using the kryptonite transformation package, but I want to decrypt this data using Python/PySpark. How can I achieve it? As per my understanding, in your code, you have used Kryo serialization, but this is not available in Python. Can you please help me with this or provide me a sample Python script for decryption?
-
How can we pass AWS KMS key payload directly in the source connector?
transforms.cipher.cipher_data_keys: {
"KeyMetadata": {
"AWSAccountId": "123456789012",
"KeyId": "arn:aws:kms:us-east-1:123456789012:key/abcd1234-a123-456a-a12b-a123b4cd56ef",
"Arn": "arn:aws:kms:us-east-1:123456789012:key/abcd1234-a123-456a-a12b-a123b4cd56ef",
"CreationDate": 1642604273.418,
"Enabled": true,
"Description": "",
"KeyUsage": "ENCRYPT_DECRYPT",
"KeyState": "Enabled",
"Origin": "AWS_KMS",
"KeyManager": "CUSTOMER",
"CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
"EncryptionAlgorithms": [
"SYMMETRIC_DEFAULT"
],
"SigningAlgorithms": [
"RSASSA_PSS_SHA_512"
]
}
}
- How to use field-level keys (different keys for different fields)?
exm: tabl1 has three column c1,c2 and c3 i want to encrypt those column with three different keys
5.I have a single source connector for multiple fact tables then, how to configure the transforms.cipher.field_config parameter for different tables with different fields?
table.include.list: 'dbo.table1,dbo.table2,dbo.table3,...dbo.tableN'
encrypt.fields.table1: 'mobile'
encrypt.fields.table2: 'userid'
Hope you will provide a response with sample examples.