Repository navigation
Conversation
Meekohi
requested review from
Lang-Akshay,
brian-hussey,
crivetimihai,
ja8zyjits and
msureshkumar88
as code owners
September 10, 2026 16:13
Author
|
Hi @a-effort — a quick process note, since this is my first PR to the repo:
I'll turn review feedback around quickly. Thanks! Also refreshed the Verification table in the description: |
2 of 6 tasks
Collaborator
|
Thanks for contributing! 🙌 |
Meekohi
force-pushed
the
fix/mtls-client-cert-without-custom-ca
branch
from
October 4, 2026 15:03
1c01026 to
248ebc0
Compare
Build outbound SSL contexts whenever custom trust or client credentials exist. Apply the rule to health checks, connection helpers, handshakes, and tool calls. Decrypt stored handshake keys and preserve candidate-only credential isolation. Cover real TLS registration, handshakes, and MCP tool calls without gateway CA configuration. Reject untrusted servers, missing client identities, and incomplete credential pairs. Closes IBM#6771 Signed-off-by: Michael Holroyd <meekohi@gmail.com> Signed-off-by: Michael Holroyd <michael.holroyd@ga-ccri.com> {"fundingSource": "RD1191", "team": "CTO", "fshGit": "d3463a9a", "fshDocker": "sha256:62e82fe2"}
Meekohi
force-pushed
the
fix/mtls-client-cert-without-custom-ca
branch
from
October 22, 2026 22:02
248ebc0 to
5402f05
Compare
Author
|
Updated this PR to sync with the latest main branch. |
This branch has not been deployed
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.
Summary
MCP gateways omit configured mTLS client credentials when their server certificate uses system CA trust. Present client credentials without requiring a custom CA.
Reproduction Steps
Register an HTTPS MCP gateway that requires a client certificate. Configure
client_certandclient_key, and leaveca_certificateunset. Registration, health checks, or tool calls fail because the upstream receives no client identity.Closes #6771.
Root Cause
Five outbound paths create an SSL context only when a custom CA exists. They therefore ignore configured client credentials with system trust.
Fix Description
Use
build_client_ssl_context()for health checks, SSE and Streamable HTTP connections, handshakes, and tool calls. Decrypt stored handshake keys, reject incomplete credential pairs, and preserve candidate-only credential isolation.Verification
Real TLS coverage verifies registration, handshakes, and repeated MCP calls without per-gateway CA configuration.
It also verifies rejection of untrusted servers and missing client credentials.
Validation: focused regressions, live TLS coverage, existing credential-isolation checks, static checks, secret scanning, package verification, and production image construction pass.
Production MCP/RBAC E2E has 129 passing cases after correcting local fixture connectivity and installing Chromium; 14 feature-specific cases skip.
The full suite has 24,534 passes. Seven upstream setup errors resolve against the correct isolated upstream.
Doctests have 1,242 passes. Changed-line coverage is 100%; overall coverage is 98%.
Validation exceptions: three A2A JWT-fixture failures reproduce on main and remain outside this PR.
Full Bandit reports 12 unchanged findings outside the diff. Changed production modules pass scoped Bandit.
These existing failures require exceptions to the full repository gate.