You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2026/08/31 10:48:15 UTC

(pulsar) branch branch-4.2 updated: [fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory (#26423)

This is an automated email from the ASF dual-hosted git repository.

Technoboy- pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new 65dc28360fef [fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory (#26423)
65dc28360fef is described below

commit 65dc28360fef7abe2efddacf32a76c0d53f73cfd
Author: Jeremy Schoemaker <je...@shoemoney.com>
AuthorDate: Mon Aug 31 05:48:09 2026 -0500

    [fix][misc][branch-4.2] Pass webServiceTlsCiphers to Jetty factory (#26423)
---
 .../src/main/java/org/apache/pulsar/broker/web/WebService.java    | 8 +++++++-
 .../main/java/org/apache/pulsar/proxy/server/ProxyConnection.java | 2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
index 21c99f8196fe..9ef193ff9f13 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
@@ -25,6 +25,7 @@ import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
+import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
@@ -171,7 +172,8 @@ public class WebService implements AutoCloseable {
                 SslContextFactory.Server sslCtxFactory =
                         JettySslContextFactory.createSslContextFactory(config.getWebServiceTlsProvider(),
                                 this.sslFactory, config.isTlsRequireTrustedClientCertOnConnect(),
-                                config.getTlsCiphers(), config.getTlsProtocols());
+                                firstNonEmpty(config.getWebServiceTlsCiphers(), config.getTlsCiphers()),
+                                firstNonEmpty(config.getWebServiceTlsProtocols(), config.getTlsProtocols()));
                 List<ConnectionFactory> connectionFactories = new ArrayList<>();
                 if (config.isWebServiceHaProxyProtocolEnabled()) {
                     connectionFactories.add(new ProxyConnectionFactory());
@@ -532,5 +534,9 @@ public class WebService implements AutoCloseable {
         }
     }
 
+    private static Set<String> firstNonEmpty(Set<String> preferred, Set<String> fallback) {
+        return preferred != null && !preferred.isEmpty() ? preferred : fallback;
+    }
+
     private static final Logger log = LoggerFactory.getLogger(WebService.class);
 }
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
index cfe788e52296..9271319fe136 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
@@ -797,6 +797,8 @@ public class ProxyConnection extends PulsarHandler {
                 clientConf.setTlsCertificateFilePath(proxyConfig.getBrokerClientCertificateFilePath());
             }
             clientConf.setTlsAllowInsecureConnection(proxyConfig.isTlsAllowInsecureConnection());
+            clientConf.setTlsCiphers(proxyConfig.getBrokerClientTlsCiphers());
+            clientConf.setTlsProtocols(proxyConfig.getBrokerClientTlsProtocols());
         }
         return clientConf;
     }