Skip to content

[fix][broker] Use correct file path for tls trust certificates - #18712

Merged
nodece merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-tls-trust-cert-config
Dec 5, 2022
Merged

nodece merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-tls-trust-cert-config

Conversation

@michaeljmarshall

Copy link
Copy Markdown
Member

Motivation

This is a trivial cleanup, though it might technically break some deployments. Given that the getBrokerClientTrustCertsFilePath takes precedence over the getTlsCertificateFilePath, it is unlikely to have been used with any frequency. However, it is better to correctly update the trust certs file path. The consequence of this breaking change will be immediately obvious to any impacted users, as their pulsar clients will not trust certificates that they may have trusted before.

This is not a security vulnerability.

Modifications

  • Replace getTlsCertificateFilePath with getTlsTrustCertsFilePath when calling setTlsTrustCertsFilePath on the pulsar client in the pulsar broker.

Verifying this change

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

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
  • Anything that affects deployment

Documentation

  • doc-not-needed

@codecov-commenter

codecov-commenter commented Dec 2, 2022 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 46.18%. Comparing base (bbc7a25) to head (676173b).
⚠️ Report is 3214 commits behind head on master.

Files with missing lines Patch % Lines
...n/java/org/apache/pulsar/broker/PulsarService.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18712      +/-   ##
============================================
- Coverage     48.34%   46.18%   -2.17%     
- Complexity     9368    10296     +928     
============================================
  Files           618      699      +81     
  Lines         58586    68728   +10142     
  Branches       6097     7373    +1276     
============================================
+ Hits          28326    31744    +3418     
- Misses        27078    33377    +6299     
- Partials       3182     3607     +425     
Flag Coverage Δ
unittests 46.18% <0.00%> (-2.17%) ⬇️

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

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 57.48% <0.00%> (+0.57%) ⬆️

... and 167 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.

BewareMyPower pushed a commit to streamnative/kop that referenced this pull request Dec 5, 2022
### Motivation

This is a trivial fix. The `getTlsCertificateFilePath` is meant to be
the tls certificate chain when sending to a peer, and the
`getTlsTrustCertsFilePath` is meant to be the root CAs.

This PR could technically break installations. I'm unsure how we'd like
to handle backwards compatibility here.

Note that this PR is the same as
apache/pulsar#18712.

### Modifications

* Fix an incorrect reference to trusted certificates.
@nodece
nodece merged commit d7e5936 into apache:master Dec 5, 2022
@michaeljmarshall
michaeljmarshall deleted the fix-tls-trust-cert-config branch December 7, 2022 16:31
eolivelli pushed a commit to datastax/starlight-for-kafka that referenced this pull request Dec 10, 2022
### Motivation

This is a trivial fix. The `getTlsCertificateFilePath` is meant to be
the tls certificate chain when sending to a peer, and the
`getTlsTrustCertsFilePath` is meant to be the root CAs.

This PR could technically break installations. I'm unsure how we'd like
to handle backwards compatibility here.

Note that this PR is the same as
apache/pulsar#18712.

### Modifications

* Fix an incorrect reference to trusted certificates.

(cherry picked from commit 4cd64d8)
eolivelli pushed a commit to datastax/starlight-for-kafka that referenced this pull request Dec 10, 2022
### Motivation

This is a trivial fix. The `getTlsCertificateFilePath` is meant to be
the tls certificate chain when sending to a peer, and the
`getTlsTrustCertsFilePath` is meant to be the root CAs.

This PR could technically break installations. I'm unsure how we'd like
to handle backwards compatibility here.

Note that this PR is the same as
apache/pulsar#18712.

### Modifications

* Fix an incorrect reference to trusted certificates.

(cherry picked from commit 4cd64d8)
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker area/config area/security doc-not-needed Your PR changes do not impact docs ready-to-test type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants