GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native support by lhotari · Pull Request #26314 · apache/pulsar

Conversation

@lhotari

@lhotari lhotari commented Aug 12, 2026

Copy link
Copy Markdown
Member

Motivation

org.conscrypt:conscrypt-openjdk-uber has been pinned at 2.5.2, which ships natives for only four platforms and none for aarch64:

2.5.2: conscrypt_openjdk_jni-windows-x86.dll
       conscrypt_openjdk_jni-windows-x86_64.dll
       libconscrypt_openjdk_jni-linux-x86_64.so
       libconscrypt_openjdk_jni-osx-x86_64.dylib

This matters more than it looks, because Conscrypt is a shipped default, not an opt-in: webServiceTlsProvider=Conscrypt in conf/broker.conf, conf/proxy.conf and conf/standalone.conf, and tlsProvider=Conscrypt in conf/websocket.conf.

On ARM64 that default has never been honoured. Conscrypt.checkAvailability() throws UnsatisfiedLinkError, the provider is never registered, and SecurityUtility.resolveProvider silently substitutes the JDK default:

provider = Security.getProvider(providerName);   // null - Conscrypt never registered
if (provider == null) {
    provider = SSLContext.getDefault().getProvider();
}

The fallback is logged at DEBUG only, so ARM64 operators get the JDK JSSE provider while their configuration says Conscrypt, with no indication anything was substituted.

Conscrypt 2.6.0 adds linux-aarch_64 and osx-aarch_64 natives, which fixes this. Two secondary reasons to move now:

  • Jetty already expects 2.6.0. jetty-project:12.1.12 declares <conscrypt.version>2.6.0</conscrypt.version>, so our catalog pin was downgrading Jetty's dependency to 2.5.2. After this change it upgrades it to 2.6.1 instead.
  • The google/conscrypt#1015 workaround becomes dead code. Conscrypt 2.6.0 includes Fix use the default hostname verifier google/conscrypt#1060, which fixes that bug upstream.

Modifications

1. Bump the version catalog — conscrypt = "2.5.2" → "2.6.1", plus the jar name in both LICENSE.bin.txt files (server and shell use different naming conventions, both updated).

2. Remove the obsolete google/conscrypt#1015 workaround. Pulsar sets a process-global CN-tolerant hostname verifier via Conscrypt.setDefaultHostnameVerifier(...), but under 2.5.2 TrustManagerImpl ignored it, so Pulsar had to copy it onto every TrustManager instance by hand. google/conscrypt#1060 added the missing fallback. Comparing TrustManagerImpl.getHttpsVerifier() — the sole consumer of that field — across the two jars:

2.5.2 2.6.1
getHttpsVerifier() hostnameVerifier → Platform.getDefaultHostnameVerifier() hostnameVerifier → defaultHostnameVerifier → Platform.getDefaultHostnameVerifier()

2.5.2 never reads the static defaultHostnameVerifier field; 2.6.1 does. So processConscryptTrustManager(s) is removed from both SecurityUtility (the wired PIP-337 path) and JcaProviders (the PIP-478 path), along with the two call sites in KeyStoreSSLContext and JdkSslContexts. The setDefaultHostnameVerifier call itself is kept — that is what installs the verifier; only the redundant per-instance propagation is gone.

Net: +18 / −103.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests — 138 TLS tests in pulsar-common (JcaProvidersTest, JdkSslContextsTest, JcaProviderPinningTest, DefaultPulsarSslFactoryTest, FileBasedTlsFactoryTest, keystore-TLS) and 37 in pulsar-broker-common, all green before and after the removal. ./gradlew sanityCheck is green across all 582 tasks, which also confirms nothing outside pulsar-common referenced the removed public method.

./gradlew checkBinaryLicense passes for both distributions. As a negative control, reverting just the server LICENSE.bin.txt line to 2.5.2 fails as expected — which confirms both that the check is real and that 2.6.1 is the version actually resolved and bundled:

org.conscrypt-conscrypt-openjdk-uber-2.6.1.jar unaccounted for in LICENSE
org.conscrypt-conscrypt-openjdk-uber-2.5.2.jar mentioned in LICENSE, but not bundled

The API surface was verified rather than assumed: Pulsar reaches Conscrypt reflectively, so the compiler cannot catch breakage. All reflectively-referenced members still resolve in 2.6.1 with identical signatures (checkAvailability, wrapHostnameVerifier, set/getDefaultHostnameVerifier, set/getHostnameVerifier, plus OpenSSLProvider and TrustManagerImpl).

The #1015 fix was also confirmed at runtime — same JVM, only the jar swapped, workaround deliberately not applied:

conscrypt 2.5.2 -> EFFECTIVE getHttpsVerifier() = org.conscrypt.OkHostnameVerifier@32e6e9c3
                   default verifier honoured WITHOUT workaround = false
conscrypt 2.6.1 -> EFFECTIVE getHttpsVerifier() = PULSAR_CUSTOM_VERIFIER
                   default verifier honoured WITHOUT workaround = true

Native loading was smoke-tested in Pulsar's actual container base images (load + SSLContext + TLSv1.3):

Image 2.5.2 2.6.1
Alpine arm64 (musl + gcompat) UnsatisfiedLinkError OK
Alpine x86_64 (musl + gcompat) OK OK
Wolfi arm64 (glibc 2.43) not run (no aarch64 native in 2.5.2) OK
Ubuntu 20.04 x86_64 (glibc 2.31) OK GLIBC_2.35' not found

Notes for reviewers

Three consequences of the upgrade that are worth an explicit decision:

1. glibc 2.35 floor on linux-x86_64 (tarball installs only). The 2.6.1 linux-x86_64 native references _dl_find_object@GLIBC_2.35 (2.5.2 topped out at 2.14). On glibc < 2.35 hosts — Ubuntu 20.04, Debian 11, RHEL/CentOS 8, Amazon Linux 2 — Conscrypt now fails to load and TLS falls back to the JDK provider. This is a silent performance degradation, not an outage: the fallback shown in the Motivation section keeps TLS working, and the failure is logged at DEBUG. Worth a release note.

Both shipped Docker images are unaffected: Wolfi has glibc 2.43, and the Alpine image already installs gcompat with LD_PRELOAD=/lib/libgcompat.so.0, under which the native loads fine on both architectures (verified above). The linux-aarch_64 native tops out at GLIBC_2.34, so the floor is x86_64-only.

2. Hostname verification becomes more lenient in code paths Pulsar does not own. This follows from the upgrade itself, not from the workaround removal. setDefaultHostnameVerifier is process-global. Under 2.5.2 that global was inert, so Pulsar's CN-tolerant TlsHostnameVerifier only reached the TrustManagers Pulsar explicitly post-processed. Under 2.6.1 every Conscrypt TrustManagerImpl in the JVM falls back to it — including ones created by Jetty, connectors or offloaders, which previously got Conscrypt's stricter SAN-only OkHostnameVerifier. Removing the workaround is behaviour-neutral here; keeping it would not prevent the widening. Flagging it because it runs opposite to PIP-478's move to SAN-only verification, so it may deserve a follow-up.

3. Smaller packaging notes. The uber jar grows ~9.7 MB → ~14 MB (docker/pulsar/build-scripts/remove-unnecessary-native-binaries.sh prunes netty-tcnative and RocksDB but not Conscrypt — could be a follow-up). 32-bit Windows (windows-x86) loses Conscrypt, as 2.6.0 dropped that native. 2.5.2 was a signed jar and 2.6.1 is not. The bytecode floor rises from Java 7 to Java 8, well under Pulsar's minimum. No new license obligations: neither jar bundles a META-INF/LICENSE or NOTICE, and BoringSSL was already statically embedded in 2.5.2.

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

Dependencies: org.conscrypt:conscrypt-openjdk-uber 2.5.2 → 2.6.1.

Deployment: ARM64 deployments start actually using Conscrypt where they previously fell back to the JDK provider, and tarball installs on glibc < 2.35 now fall back where they previously used Conscrypt. See Notes for reviewers.

Public API: SecurityUtility.processConscryptTrustManagers was public but annotated @InterfaceAudience.Private, so its removal is not a public-API break under Pulsar's compatibility policy. sanityCheck confirms it had no callers outside pulsar-common.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lhotari
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native support
c612146
Conscrypt 2.6.0 adds linux-aarch_64 and osx-aarch_64 natives. Since
`webServiceTlsProvider=Conscrypt` is the shipped default in broker.conf,
proxy.conf and standalone.conf (and `tlsProvider=Conscrypt` in
websocket.conf), ARM64 deployments have been silently falling back to the
JDK provider because 2.5.2 shipped no aarch64 native at all.

Jetty 12.1.12 already declares conscrypt 2.6.0, so the previous 2.5.2 pin
was downgrading it; 2.6.1 upgrades it instead.

Also removes the now-obsolete workaround for google/conscrypt#1015:
conscrypt 2.6.0 included google/conscrypt#1060, which makes
TrustManagerImpl fall back to the default hostname verifier on its own,
so Pulsar no longer has to copy it onto every TrustManager instance.

Assisted-by: Claude Code (Opus 5)
@lhotari
lhotari requested review from Technoboy-, dao-jun, merlimat and nodece August 12, 2026 12:27
@lhotari lhotari mentioned this pull request Aug 12, 2026
[feat][client] PIP-478: asynchronous v5 client authentication and TLS factory integration (core migration) #26282
Merged
5 of 14 tasks
@lhotari
lhotari requested a review from david-streamlio August 12, 2026 12:37
Technoboy-
Technoboy- approved these changes Aug 12, 2026
View reviewed changes
@lhotari
lhotari merged commit 86ff200 into apache:master Aug 12, 2026
82 of 84 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@lhotari lhotari added release/4.0.13 release/4.2.5 labels Aug 12, 2026
@lhotari lhotari added this to the 5.0.0-M2 milestone Aug 12, 2026
lhotari added a commit to lhotari/pulsar that referenced this pull request Aug 12, 2026
@lhotari
[improve][misc] PIP-478: correct the Conscrypt platform rationale for…
ea827a7
… 2.6.1

Merging master brought in apache#26314, which upgrades Conscrypt to 2.6.1 for aarch64 native support and drops
the issue-1015 hostname-verifier workaround that 2.6.0 made unnecessary. The merge itself was clean and
the workaround had no callers in this branch beyond the files that commit already updated.

It does falsify the justification the previous commit gave for the conditional web-listener default,
which said the uber jar ships x86_64 natives only and that aarch64 would fail at startup. As of 2.6.1
aarch64 is covered, so that reasoning is corrected everywhere it appears: the `resolveWebJsseProvider`
javadoc, the four `@FieldContext` descriptions, the five conf files, both pip-478.md passages and the
test comment.

The mechanism is unchanged and still warranted — availability is tested rather than assumed, because the
jar still does not cover every platform Pulsar runs on (s390x) and need not be on the class path at all.
What changes is the reach of the default: it now applies on aarch64 too, so Apple silicon and ARM servers
get Conscrypt rather than the JVM default.

One practical consequence for verification: this machine is aarch64, so before the upgrade a local build
could exercise only the fallback branch and the Conscrypt branch was reachable only on CI. With 2.6.1
`checkAvailability()` succeeds here, and `DefaultBrokerTlsPolicyTest` now covers the Conscrypt branch
locally as well.

Assisted-by: Claude Code (Opus 5)
lhotari added a commit that referenced this pull request Aug 12, 2026
@lhotari
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp…
4408cc8
…ort (#26314)

(cherry picked from commit 86ff200)
@lhotari lhotari added cherry-picked/branch-4.2 release/4.0.14 and removed release/4.0.13 labels Aug 12, 2026
lhotari added a commit that referenced this pull request Aug 12, 2026
@lhotari
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp…
556f07e
…ort (#26314)

(cherry picked from commit 86ff200)
@lhotari lhotari added the cherry-picked/branch-4.0 label Aug 12, 2026
This was referenced Aug 12, 2026
[improve][misc] Upgrade Conscrypt to 2.6.2 to restore the native library glibc baseline #26315
Merged
[improve][ci] Gate CI in apache/pulsar on the pull request being ready for testing #26323
Merged
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Aug 28, 2026
@lhotari @nodece
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp…
0d10a1b
…ort (apache#26314)

(cherry picked from commit 86ff200)
Radiancebobo pushed a commit to Radiancebobo/pulsar that referenced this pull request Oct 8, 2026
@lhotari hechengbo
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp…
8b27b47
…ort (apache#26314)
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Nov 16, 2026
@lhotari @nodece
[improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp…
d3cd151
…ort (apache#26314)

(cherry picked from commit 86ff200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Technoboy- Technoboy- Technoboy- approved these changes
@merlimat merlimat Awaiting requested review from merlimat
@nodece nodece Awaiting requested review from nodece
@dao-jun dao-jun Awaiting requested review from dao-jun
@david-streamlio david-streamlio Awaiting requested review from david-streamlio

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cherry-picked/branch-4.0 cherry-picked/branch-4.2 release/4.0.14 release/4.2.5

Projects

None yet

Milestone

5.0.0-M2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lhotari @Technoboy-
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.