Content-Length: 297906 | pFad | http://github.com/confluentinc/confluent-kafka-python/pull/2011

EF DGS-21268 Add support for full payload encryption by rayokota · Pull Request #2011 · confluentinc/confluent-kafka-python · GitHub
Skip to content

DGS-21268 Add support for full payload encryption #2011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rayokota
Copy link
Member

What

Add support for full payload encryption

Checklist

  • [Y] Contains customer facing changes? Including API/behavior changes
  • [Y] Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA:

Test & Review

Open questions / Follow-ups

@Copilot Copilot AI review requested due to automatic review settings July 14, 2025 16:33
@rayokota rayokota requested review from MSeal and a team as code owners July 14, 2025 16:33
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds full payload encryption support by introducing a new payload-level executor, extending rule phases, and wiring encoding-phase rule execution into all sync/async serdes.

  • Introduce EncryptionExecutor alongside legacy FieldEncryptionExecutor to handle full payload encryption.
  • Add a new RulePhase.ENCODING and encoding_rules in RuleSet for payload-phase rules.
  • Update all sync and async JSON/Avro/Protobuf serializers/deserializers to run encoding-phase rules before serialization and after deserialization.
  • Add end-to-end payload encryption tests (test_*_payload_encryption) for JSON, Avro, and Protobuf in both sync and async contexts.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/schema_registry/_sync/test_proto_serdes.py Imported EncryptionExecutor, adjusted client references, added payload encryption test
tests/schema_registry/_sync/test_json_serdes.py Imported EncryptionExecutor, adjusted client references, added payload encryption test
tests/schema_registry/_sync/test_avro_serdes.py Imported EncryptionExecutor, adjusted client references, added payload encryption test
src/confluent_kafka/schema_registry/rules/encryption/*.py Added EncryptionExecutor, renamed transform signatures, wrapped field executor
src/confluent_kafka/schema_registry/common/schema_registry_client.py Added RulePhase.ENCODING and encoding_rules in RuleSet
src/confluent_kafka/schema_registry/_sync/serde.py Added _execute_rules_with_phase and wired encoding-phase rules
src/confluent_kafka/schema_registry/_sync/{protobuf,json_schema,avro}.py Hooked encoding-phase execution in serializers/deserializers
src/confluent_kafka/schema_registry/_async/serde.py Mirrored sync serde changes for async
src/confluent_kafka/schema_registry/_async/{protobuf,json_schema,avro}.py Mirrored sync serializers/deserializers changes for async
Comments suppressed due to low confidence (2)

tests/schema_registry/_sync/test_json_serdes.py:998

  • [nitpick] Rename the test function to test_json_payload_encryption for consistency with the other payload encryption test names.
def test_json_payloadencryption():

tests/schema_registry/_async/test_json_serdes.py:998

  • [nitpick] Rename the async test function to test_json_payload_encryption for consistency with other payload encryption test names.
async def test_json_payloadencryption():

@sonarqube-confluent
Copy link

Failed

  • 77.40% Coverage on New Code (is less than 80.00%)

Analysis Details

51 Issues

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 51 Code Smells

Coverage and Duplications

  • Coverage 77.40% Coverage (66.10% Estimated after merge)
  • Duplications No duplication information (5.50% Estimated after merge)

Project ID: confluent-kafka-python

View in SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/confluentinc/confluent-kafka-python/pull/2011

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy