Skip to content
New issue

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

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

Already on GitHub? # to your account

[fix][cli] Fix Pulsar-Client to allow consume encrypted messages with appropriate crypto-failure-action #23346

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

rdhabalia
Copy link
Contributor

@rdhabalia rdhabalia commented Sep 24, 2024

Motivation

Currently user wants to consume encrypted message using pulsar-client CLI for any kind of troubleshooting and validation but CLI tool doesn't support option to consume encrypted message by ignoring decryption failure. Therefore, client-cli should have configuration to define crypto-failure-action for consumer so, client can use it for their consumption usecase.

Modifications

add param --crypto-failure-action to client-cli to support encrypted message consumption.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@rdhabalia rdhabalia added area/cli doc-not-needed Your PR changes do not impact docs ready-to-test labels Sep 24, 2024
@rdhabalia rdhabalia self-assigned this Sep 24, 2024
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.56%. Comparing base (bbc6224) to head (03c46db).
Report is 603 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23346      +/-   ##
============================================
+ Coverage     73.57%   74.56%   +0.99%     
- Complexity    32624    34443    +1819     
============================================
  Files          1877     1934      +57     
  Lines        139502   144994    +5492     
  Branches      15299    15838     +539     
============================================
+ Hits         102638   108122    +5484     
+ Misses        28908    28587     -321     
- Partials       7956     8285     +329     
Flag Coverage Δ
inttests 27.44% <50.00%> (+2.86%) ⬆️
systests 24.53% <0.00%> (+0.21%) ⬆️
unittests 73.93% <100.00%> (+1.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../java/org/apache/pulsar/client/cli/CmdConsume.java 41.91% <100.00%> (+0.60%) ⬆️
...ain/java/org/apache/pulsar/client/cli/CmdRead.java 41.72% <100.00%> (+0.59%) ⬆️

... and 600 files with indirect coverage changes

@rdhabalia rdhabalia merged commit 31f27a0 into apache:master Sep 25, 2024
56 checks passed
@rdhabalia rdhabalia deleted the enc_param2 branch October 7, 2024 17:48
@lhotari lhotari added this to the 4.0.0 milestone Oct 14, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/cli doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants