THRIFT-6275: Present the client certificate from the Go cross-test client - #3857
Draft
slachiewicz wants to merge 1 commit into
Draft
slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
…ient Client: go,test The Go test client sent no client certificate, so every socket transport over SSL failed the handshake against the Python server, which requires one. It now takes the server's --certPath flag and loads client_v3. Go 1.27 and later refuse to load client_v3.crt as shipped: its alternative names include ::ffff:127.0.0.1, and the x509 parser rejects an IPv4-mapped IPv6 SAN since go1.27.0. The lib-go job runs on 1.27 and test/go now loads the certificate, so it is regenerated without that entry. THRIFT-3660 added it for the Python peer-address check, which since THRIFT-6201 reduces a mapped address itself. The new certificate is self-signed with the same key, distinguished name and extensions, as the shipped one was. The Java client keystore is regenerated from it, and the README recipe now produces what is shipped instead of a CA-signed certificate the Python server does not trust. The 18 py-go SSL entries leave the known failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
slachiewicz
force-pushed
the
THRIFT-6275
branch
from
September 16, 2026 13:16
8c61352 to
14ff0f6
Compare
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.
JIRA: THRIFT-6275
Client: go,test
The 18
py-go_*-ip-sslcross-test rows have been listed as known failures since 2015.The Go test client sent no client certificate, while the Python test server requires one, so every socket transport over SSL failed the handshake with
tls: certificate required. The client now takes the same--certPathflag as the server and loadsclient_v3.crtandclient_v3.keyinto the TLS configuration it uses for sockets and HTTPS;tests.jsonpasses the flag. This alone makes the 18 rows pass in the cross-test image, which builds with Go 1.24.Loading the certificate exposes a second problem on newer Go.
client_v3.crtas shipped lists::ffff:127.0.0.1among its alternative names, and Go 1.27.0 and later reject a certificate with an IPv4-mapped IPv6 SAN (x509: SAN iPAddress contains IPv4-mapped IPv6 address,crypto/x509/parser.go, no GODEBUG). Thelib-gojob runs on Go 1.26 and 1.27, andgo test ./src/common/intest/gonow loads the certificate, so it would fail there on 1.27. THRIFT-3660 added that entry in 2016 for the Python peer-address check, which since THRIFT-6201 reduces a mapped address to its IPv4 form itself on Python 3.12 and later, and with #3839 (THRIFT-6233) on every Python version. This PR depends on #3839: without it a Python server on 3.11 or earlier still runsssl.match_hostname, which would refuse an IPv4 client of a dual-stack listener once the mapped entry is gone. The certificate is regenerated self-signed with the same key, the same distinguished name and extensions, and the alternative names127.0.0.1,::1andlocalhost. The Java client keystore is regenerated from it with the command in the keys README. The README recipe itself now produces what is shipped; it described a CA-signed certificate that the Python server rejects withunable to get local issuer certificate, which is not how the shipped certificate was made.The 18 entries leave
test/known_failures_Linux.json, so the cross-test jobs here are the check that the rows pass.What is not touched: the other 59 Go entries in the file, which fail for other reasons recorded on THRIFT-5809.
Verified: the shipped
client_v3.crtloads withtls.LoadX509KeyPairunder go1.24.3 and go1.26.2 and fails under go1.27.1 with the error above; all twelve py-go SSL combinations (binary, compact, json, header over buffered, framed, zlib) pass locally with a Python server built from master and the Go client from this branch;go test ./src/common/intest/gopasses with the regenerated certificate on Go 1.27; the keystore's certificate fingerprint matches the regeneratedclient_v3.crt. Not run locally: the other clients against the regenerated certificate, which the cross-test matrix covers.This change was created with AI assistance.