Skip to content

docs(mcp): note Istio strict-mTLS incompatibility for Service backendRefs - #2430

Open
Aias00 wants to merge 1 commit into
envoyproxy:mainfrom
Aias00:docs/mcp-istio-compat-2003
Open

docs(mcp): note Istio strict-mTLS incompatibility for Service backendRefs#2430
Aias00 wants to merge 1 commit into
envoyproxy:mainfrom
Aias00:docs/mcp-istio-compat-2003

Conversation

@Aias00

@Aias00 Aias00 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

An MCPRoute backendRef can reference either an Envoy Gateway Backend (FQDN endpoint) or a Kubernetes Service. When it references an in-cluster Service, Envoy resolves it via EndpointSlices — i.e. it connects directly to individual pod IPs, not to the Service cluster IP. A strict-mTLS mesh (e.g. Istio PeerAuthentication STRICT + DestinationRule) enforces TLS at the service level, so the pod-IP connections bypass it and the MCP session fails to establish, with no error surfaced by the AI Gateway.

This is expected Envoy/Gateway-API Service resolution, not an AI Gateway bug, but it was not reflected anywhere in the documentation (the original ask in #2003). This adds a subsection to the MCPRoute docs explaining the behavior and the workarounds:

  1. Prefer a Backend with the Service FQDN (<service>.<namespace>.svc.cluster.local) over a Service backendRef — resolves via STRICT_DNS to the Service cluster IP, so the mesh applies strict mTLS at the service level. (Example YAML included.)
  2. Relax mTLS for the backend port only (Istio portLevelMtls.mode: PERMISSIVE).
  3. Exclude the backend port/workload from the mesh.

This is a docs-only change; the underlying Service→EndpointSlice resolution is Envoy/Gateway-API behavior and an architectural change to it would be a separate, maintainer-level decision.

Related Issues/PRs (if applicable)

Addresses #2003

Special notes for reviewers (if applicable)

  • The Backend docs link uses the same anchor convention as existing links in the repo (e.g. #ratelimitselectcondition, #oidc).
  • No code change; no behavioral change. If a code-level fix (e.g. translating MCP Service backendRefs to a STRICT_DNS / Service-FQDN cluster in the extension server) is desired, that is a larger, separately-verifiable change and out of scope for this docs PR.

…Refs

An MCPRoute backendRef can reference an Envoy Gateway Backend (FQDN) or a
Kubernetes Service. When it references an in-cluster Service, Envoy resolves
it via EndpointSlices — i.e. connects directly to pod IPs, not the Service
cluster IP — which bypasses strict-mTLS meshes (e.g. Istio
PeerAuthentication STRICT + DestinationRule) that enforce TLS at the service
level. The symptom is a failed MCP session with no AI Gateway error.

This is expected Envoy/Gateway-API Service resolution, not an AI Gateway bug,
but it was not documented. Add a subsection to the MCPRoute docs explaining
the behavior and the workarounds (prefer a Backend with the Service FQDN,
relax mTLS for the backend port, or exclude the port/workload from the mesh).

Addresses envoyproxy#2003

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: liuhy <liuhongyu@apache.org>
@Aias00
Aias00 requested a review from a team as a code owner July 27, 2026 13:42
Copilot AI review requested due to automatic review settings July 27, 2026 13:42
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants