-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][pip] PIP-432: Add isEncrypted field to EncryptionContext #24481
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
Conversation
|
/pulsarbot run-failure-checks |
liangyepianzhou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/pulsarbot run-failure-checks |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24481 +/- ##
============================================
+ Coverage 73.57% 74.27% +0.70%
+ Complexity 32624 32494 -130
============================================
Files 1877 1868 -9
Lines 139502 145939 +6437
Branches 15299 16734 +1435
============================================
+ Hits 102638 108399 +5761
- Misses 28908 28951 +43
- Partials 7956 8589 +633
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
pulsar-client-api/src/main/java/org/apache/pulsar/common/api/EncryptionContext.java
Show resolved
Hide resolved
|
LGTM. Additionally, could we introduce a new decryptFailListener to handle decryption failures, instead of using if-else checks? This would provide a more elegant solution. The code might look like this: |
|
@3pacccccc Yes, that's a good idea to have a listener for the decryption failures. Do you want to create a proposal for it? With the decryption failure listener, we can suggest users to use listener instead of ConsumerCryptoFailureAction. They can decide in the listener to discard, or decrypt, or anything they want. |
yes,I‘m sooo glad if I can do anything to help |
|
/pulsarbot run-failure-checks |
e0b1444 to
09731b1
Compare
Clarify that the field indicates whether message payload remains encrypted (true) or has been successfully decrypted (false). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove trailing whitespace - Fix line length violation by breaking long assertion message 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Motivation
Applications using Pulsar's encryption feature with
ConsumerCryptoFailureAction.CONSUMEneed to determine whether received messages were successfully decrypted or if decryption failed. This is essential for:Current situation:
CONSUMEaction receive messages regardless of decryption successUse cases this solves:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-complete