Repository navigation
use sni in the tls handshake - #12374
Merged
Merged
Conversation
3 tasks done
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
saintstack
approved these changes
Sep 16, 2025
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
|
These failed: The following tests FAILED: I have a fix coming for these transient failures... but not ready yet. Meantime, let me retry. |
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
kakaiu
approved these changes
Sep 16, 2025
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
jzhou77
reviewed
Sep 16, 2025
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
jzhou77
reviewed
Sep 17, 2025
jzhou77
left a comment
Collaborator
There was a problem hiding this comment.
looks like a clang-format is needed.
Contributor
Author
|
@jzhou77 thanks for the hint :) |
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Collaborator
|
20250918-155625-jzhou-dab0cc3c453fcfef compressed=True data_size=40477684 duration=6080157 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=1:02:14 sanity=False started=100000 stopped=20250918-165839 submitted=20250918-155625 timeout=5400 username=jzhou |
jzhou77
pushed a commit
to jzhou77/foundationdb
that referenced
this pull request
Sep 22, 2025
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- Co-authored-by: stack <[email protected]>
5 tasks
jzhou77
added a commit
that referenced
this pull request
Sep 23, 2025
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- Co-authored-by: Evgeny <[email protected]> Co-authored-by: stack <[email protected]>
spraza
pushed a commit
to spraza/foundationdb
that referenced
this pull request
Oct 6, 2025
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- Co-authored-by: stack <[email protected]>
laflechejonathan
pushed a commit
to laflechejonathan/foundationdb
that referenced
this pull request
Nov 4, 2025
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- Co-authored-by: Evgeny <[email protected]> Co-authored-by: stack <[email protected]>
arnav-ag
pushed a commit
to arnav-ag/foundationdb
that referenced
this pull request
Apr 27, 2026
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- Co-authored-by: stack <[email protected]> (cherry picked from commit 947276f)
spraza
pushed a commit
that referenced
this pull request
May 1, 2026
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- (cherry picked from commit 947276f) Co-authored-by: Evgeny <[email protected]> Co-authored-by: stack <[email protected]>
neethuhaneesha
pushed a commit
to neethuhaneesha/foundationdb
that referenced
this pull request
Jun 11, 2026
* use sni in the tls handshake * Ran clang-format -i * Remove accidental overcommit * drop too spamy logs * clang-format -style=file -i flow/Net2.actor.cpp --------- (cherry picked from commit 947276f) Co-authored-by: Evgeny <[email protected]> Co-authored-by: stack <[email protected]>
androndo
added a commit
to cozystack/cozystack
that referenced
this pull request
Oct 14, 2026
FoundationDB sends TLS SNI only from 7.3.78 and 7.4.6 (apple/foundationdb#12374). The provisioned bucket endpoint is an ingress that routes by SNI and aborts the handshake without it, so the 7.3.63 binaries the operator ships, and the 7.3.63 backup_agent of a default cluster, fail with "Network connection failed" before any S3 request. Bump the operator's init containers, which supply the fdbbackup and fdbrestore binaries picked by the cluster's major.minor, to 7.3.79 and 7.4.8. Add minimumAgentVersions to the FoundationDB strategy template: a cluster on an older patch of a listed major.minor runs its backup_agent at the listed version instead. Patch releases of one minor are wire-compatible, so this needs no cluster upgrade. The default strategy lists the same two versions as the operator. Assisted-by: LLM Signed-off-by: Andrey Kolkov <[email protected]>
Open
12 tasks
androndo
added a commit
to cozystack/cozystack
that referenced
this pull request
Nov 9, 2026
FoundationDB sends TLS SNI only from 7.3.78 and 7.4.6 (apple/foundationdb#12374). The provisioned bucket endpoint is an ingress that routes by SNI and aborts the handshake without it, so the 7.3.63 binaries the operator ships, and the 7.3.63 backup_agent of a default cluster, fail with "Network connection failed" before any S3 request. Bump the operator's init containers, which supply the fdbbackup and fdbrestore binaries picked by the cluster's major.minor, to 7.3.79 and 7.4.8. Add minimumAgentVersions to the FoundationDB strategy template: a cluster on an older patch of a listed major.minor runs its backup_agent at the listed version instead. Patch releases of one minor are wire-compatible, so this needs no cluster upgrade. The default strategy lists the same two versions as the operator. Assisted-by: LLM Signed-off-by: Andrey Kolkov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Original PR is in #12366
Problem
FoundationDB's network layer was not properly setting Server Name Indication (SNI) when making TLS connections to hostnames that require SNI for proper certificate selection. This caused failures when connecting to services like Google Cloud Storage, which returns a dummy self-signed certificate when SNI is not provided.
Symptoms:
Backup agent fails with "VerifyError": "self signed certificate" when connecting to storage.googleapis.com
TLS handshake errors: "certificate verify failed"
Network captures showed TLS Client Hello without SNI extension
Root Cause: The connection flow resolved hostnames to IP addresses early in the process but lost the original hostname string needed for SNI. When INetworkConnections::connect(host, service, isTLS) was called:
- resolveTCPEndpoint() resolved hostname to IP addresses
- One IP was selected and addr.fromHostname = true was set
- The original hostname string was discarded
- connectExternal(addr) was called with only the IP address
- During TLS handshake, no SNI was set because the hostname was lost
Solution
Modified the network connection chain to preserve hostname information for SNI
Testing
Verification Methods:
Network capture: tshark -Y "tls.handshake.extensions_server_name" confirms SNI is now sent in TLS Client Hello
Trace logs: Added SSLConnectionWithHostname and SSLSetSNI events for debugging
Real-world test: Backup agent connecting to storage.googleapis.com now sends proper SNI
[x] The PR has a description, explaining both the problem and the solution.
[x] The description mentions which forms of testing were done and the testing seems reasonable.
[x] Every function/class/actor that was touched is reasonably well documented.