Skip to content

[fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory - #26423

Merged
Technoboy- merged 1 commit into
apache:branch-4.2from
shoemoney:fix/pulsar-tls-cipher
Aug 31, 2026
Merged

[fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory#26423
Technoboy- merged 1 commit into
apache:branch-4.2from
shoemoney:fix/pulsar-tls-cipher

Conversation

@shoemoney

@shoemoney shoemoney commented Aug 25, 2026

Copy link
Copy Markdown

Fixes silent ignore of TLS cipher and protocol restrictions in the broker WebService and proxy lookup leg.

Motivation

WebService.java:608 passes getTlsCiphers/getTlsProtocols to the Jetty factory, ignoring webServiceTlsCiphers/webServiceTlsProtocols. ProxyConnection.createClientConfiguration omits ciphers/protocols entirely for the broker lookup client. This allows silent bypass of TLS security restrictions configured by operators.

Modifications

  • WebService: use firstNonEmpty(getWebServiceTlsCiphers, getTlsCiphers) and same for protocols with fallback, mirroring DefaultBrokerTlsFactory.webPolicy
  • ProxyConnection: propagate brokerClientTlsCiphers/brokerClientTlsProtocols to ClientConfigurationData for the lookup leg

Verifying this change

  • Make sure that the change passes the CI checks.
  • This change is already covered by existing tests (WebService and ProxyConnection).

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

  • The default values of configurations
  • Anything that affects deployment

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. There's currently PIP-478 implementation PRs in progress for the master branch which will cover this gap. Please target branch-4.2 with this change (rebase your PR branch on top of origin/branch-4.2 and update the target branch for this PR to apache:branch-4.2).

Rebased onto branch-4.2 per maintainer request (PIP-478 covers
master). Same fix as the original commit, reapplied against
branch-4.2's WebService/ProxyConnection code: WebService passes
config.getTlsCiphers/getTlsProtocols to the Jetty SSL context
factory, ignoring webServiceTlsCiphers/webServiceTlsProtocols.
ProxyConnection.createClientConfiguration omits ciphers/protocols
for the broker lookup client.
@shoemoney
shoemoney force-pushed the fix/pulsar-tls-cipher branch from 3a15cc7 to 62661b3 Compare August 27, 2026 20:40
@shoemoney
shoemoney changed the base branch from master to branch-4.2 August 27, 2026 20:40
@shoemoney

Copy link
Copy Markdown
Author

Done, rebased onto branch-4.2 and retargeted the PR (fixed in 62661b3).

@lhotari lhotari changed the title fix(pulsar): pass webServiceTlsCiphers to Jetty factory [fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory Aug 28, 2026
@lhotari lhotari added this to the 5.0.0-M2 milestone Aug 28, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.88%. Comparing base (dff9973) to head (62661b3).
⚠️ Report is 140 commits behind head on branch-4.2.

Files with missing lines Patch % Lines
.../java/org/apache/pulsar/broker/web/WebService.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             branch-4.2   #26423      +/-   ##
================================================
+ Coverage         72.26%   72.88%   +0.61%     
- Complexity         2427    35002   +32575     
================================================
  Files              1963     1970       +7     
  Lines            156135   157094     +959     
  Branches          17896    18061     +165     
================================================
+ Hits             112838   114502    +1664     
+ Misses            34151    33370     -781     
- Partials           9146     9222      +76     
Flag Coverage Δ
inttests 25.74% <80.00%> (+0.02%) ⬆️
systests 22.33% <0.00%> (-0.09%) ⬇️
unittests 73.96% <80.00%> (+0.71%) ⬆️

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

Files with missing lines Coverage Δ
...rg/apache/pulsar/proxy/server/ProxyConnection.java 57.69% <100.00%> (-0.49%) ⬇️
.../java/org/apache/pulsar/broker/web/WebService.java 89.89% <66.66%> (-0.30%) ⬇️

... and 156 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Technoboy-
Technoboy- merged commit 65dc283 into apache:branch-4.2 Aug 31, 2026
59 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants