Manage Client-Side Encryption in Confluent Platform for Self-Managed Connectors
Client-Side Field Level Encryption (CSFLE) and client-side payload encryption (CSPE) are security features that allow you to safeguard sensitive data, such as personally identifiable information (PII), by enabling field-level or payload encryption both at the producer and consumer levels. By encrypting and decrypting individual fields or complete payload/message within your data, CSFLE or CSPE ensures that access to sensitive information is tightly controlled, granting only authorized stakeholders access to the data they are permitted to see.
Important
For self-managed connectors on Confluent Platform, CSFLE or CSPE is supported only on Confluent Enterprise 8.0 and later.
Limitations
Note the following limitations:
The connector does not support automatic schema registration. You must manually register schemas before creating the connectors.
The connector only supports encryption for fields of type
stringorbytesfor CSFLE.CSFLE does not support
stringandbytesfields within nested JSON_SR formats when thevalue.converter.decimal.formatis set toBASE64. To workaround this limitation, setvalue.converter.decimal.formattoNUMERIC.The reporter topics are not covered. Ensure that the error and success response do not contain any sensitive information while using reporter topics.
Supported connectors
The following table list the connector and its minimum version that support CSFLE.
Connector | Minimum supported version |
|---|---|
12.2.9 | |
2.0.1 | |
1.4.1 | |
1.3.27 | |
1.2.6 | |
10.6.0 | |
2.6.10 | |
2.0.3 | |
1.0.5 | |
2.0.10 | |
2.6.10 | |
1.6.27 | |
1.6.27 | |
1.1.7 | |
Kafka Connect for Azure Cosmos DB (Source and Sink) | 1.17.0 |
2.0.4 | |
1.0.9 | |
2.5.7 | |
2.0.10 | |
1.2.6 | |
1.0.19 | |
Datadog Logs Sink | 1.3.0 |
2.4.2 | |
2.5.4 | |
2.5.4 | |
14.1.2 | |
1.2.4 | |
10.2.1 | |
10.2.1 | |
2.1.8 | |
1.2.9 | |
1.0.16 | |
Google Firebase Realtime Database Connector (Source and Sink) | 1.2.6 |
2.6.10 | |
1.2.4 | |
1.0.9 | |
1.7.8 | |
0.2.5 | |
2.1.15 | |
12.2.9 | |
1.2.11 | |
10.8.2 | |
1.2.13 | |
2.1.15 | |
12.2.9 | |
MongoDB Atlas Sink | 1.15.0 |
1.0.7 | |
1.1.0 | |
1.0.10 | |
0.0.8 | |
2.0.25 | |
2.0.25 | |
2.5.4 | |
3.2.11 | |
1.3.2 | |
Snowflake Sink | 3.1.1 |
1.2.8 | |
2.1.15 | |
2.2.1 | |
1.1.5 | |
2.0.67 | |
1.5.10 | |
2.1.15 | |
1.2.9 | |
1.3.2 | |
1.0.18 | |
1.3.4 |
Requirements
To use CSFLE or CSPE in Confluent Platform with self-managed connectors, you must meet the following requirements:
An installation of Confluent Enterprise 8.0 and later with the CSFLE or CSPE Add-On enabled.
Ensure Schema Registry is configured with the following properties before it starts:
resource.extension.class=io.confluent.kafka.schemaregistry.rulehandler.RuleSetResourceExtension,io.confluent.dekregistry.DekRegistryResourceExtension confluent.license=<cpe-license-key> confluent.license.addon.csfle=<cpe-license-key>
Note
The value for
confluent.license.addon.csfleis the same as your mainconfluent.licensekey.An external KMS to manage your Key Encryption Keys (KEKs). For more information, see Manage KEKs.
The KMS provider must be configured for the connector.
A Kafka topic to use as a data source or destination.
Manage client-side encryption
At a high level, you can manage client-side encryption for self-managed connectors using the following 2-step process:
Configure CSFLE in Confluent Platform
CSFLE is available in Confluent Enterprise 8.0 and later to help you protect sensitive data in your Confluent Platform account and perform stream processing on encrypted data. You must configure CSFLE in Confluent Platform before you modify an existing self-managed connector or create a new one with CSFLE enabled.
Complete the following configuration steps:
Define the schema for the topic and add tags to the fields in the schema that you want to encrypt. For more information, see add tags to the schema fields.
Define an encryption policy that specifies rules to use to encrypt the tags. For more information, see add encryption rules
Grant DeveloperWrite permission for encryption key.
Add the following parameters in the connector configuration:
For AWS, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.access.key.id=?The AWS access key identifier.
rule.executors._default_.param.secret.access.key=?The AWS secret access key.
For Azure, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.tenant.idThe Azure tenant identifier.
rule.executors._default_.param.client.idThe Azure client identifier.
rule.executors._default_.param.client.secretThe Azure client secret.
- sync:
google-cloud-csfle-rule-executor
For Google Cloud, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.account.typeThis parameter contains the Google Cloud account type.
rule.executors._default_.param.client.idThe Google Cloud client identifier.
rule.executors._default_.param.client.emailThe Google Cloud client email address.
rule.executors._default_.param.private.key.idThe Google Cloud private key identifier.
rule.executors._default_.param.private.keyThe Google Cloud private key.
For HashiCorp Vault, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.token.idThe token identifier for HashiCorp Vault.
rule.executors._default_.param.namespaceThe namespace for HashiCorp Vault Enterprise (optional).
For more information, see Configure CSFLE for use with Confluent Enterprise.
Configure CSPE in Confluent Platform
CSPE is available in Confluent Enterprise 8.0 and later to help you protect sensitive data in your Confluent Platform account and perform stream processing on encrypted data. You must configure CSPE in Confluent Platform before you modify an existing self-managed connector or create a new one with CSPE enabled.
Complete the following configuration steps:
Define the schema for the topic that you want to encrypt.
Define an encryption policy that specifies rules for encoding. For more information, see add encoding rules.
Grant DeveloperWrite permission for encryption key.
Add the following parameters in the connector configuration:
For AWS, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.access.key.id=?The AWS access key identifier.
rule.executors._default_.param.secret.access.key=?The AWS secret access key.
For Azure, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.tenant.idThe Azure tenant identifier.
rule.executors._default_.param.client.idThe Azure client identifier.
rule.executors._default_.param.client.secretThe Azure client secret.
- sync:
google-cloud-cspe-rule-executor
For Google Cloud, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.account.typeThis parameter contains the Google Cloud account type.
rule.executors._default_.param.client.idThe Google Cloud client identifier.
rule.executors._default_.param.client.emailThe Google Cloud client email address.
rule.executors._default_.param.private.key.idThe Google Cloud private key identifier.
rule.executors._default_.param.private.keyThe Google Cloud private key.
For HashiCorp Vault, pass the following configuration parameters:
Parameter
Description
rule.executors._default_.param.token.idThe token identifier for HashiCorp Vault.
rule.executors._default_.param.namespaceThe namespace for HashiCorp Vault Enterprise (optional).
For more information, see Configure CSPE for use with Confluent Enterprise
Enable CSFLE or CSPE in connectors
To enable CSFLE or CSPE for connectors, define the following parameters with the mentioned boolean values in the connector configuration:
Note
If you do not add these values in the connector configuration, CSFLE or CSPE might not work properly.
csfle.enabled=truevalue.converter.auto.register.schemas=falsevalue.converter.use.latest.version=truekey.converter.auto.register.schemas=falsekey.converter.use.latest.version=true
Note
To fetch the latest value schema from Schema Registry, use
value.converter.latest.cache.ttl.sec, that allows you to define the time interval, in seconds, after which the connector fetches the latest version of the value schema. By default, its value is set to-1. To enable it, enter the desired time interval in seconds for this parameter.Similar to the value schema, use
key.converter.latest.cache.ttl.secto define the time interval, in seconds, after which the converter fetches the latest key schema from Schema Registry. The default value is-1. Change this value to the desired time interval in seconds.