feat(a2a): allow plaintext HTTP for agent cards in service meshes - #7169
Open
ArulJerald wants to merge 1 commit into
Open
ArulJerald wants to merge 1 commit into
ArulJerald wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
ArulJerald
force-pushed
the
feat/a2a-allow-insecure-http-7139
branch
from
September 18, 2026 04:46
d417fc3 to
89f7d93
Compare
ArulJerald
force-pushed
the
feat/a2a-allow-insecure-http-7139
branch
from
September 18, 2026 09:40
89f7d93 to
8ba63ae
Compare
Author
|
Thank you @surajksharma07 for the review!
|
ArulJerald
force-pushed
the
feat/a2a-allow-insecure-http-7139
branch
from
September 18, 2026 09:46
8ba63ae to
f6af6cd
Compare
RemoteA2aAgent enforced HTTPS (or loopback hosts) when resolving agent cards and validating RPC targets. In a service mesh or Kubernetes cluster where mTLS is terminated transparently by sidecars (such as Istio or Linkerd), services communicate over plaintext HTTP using internal DNS names, causing RemoteA2aAgent to raise AgentCardResolutionError. Adds an opt-in allow_insecure_http parameter to RemoteA2aAgent.__init__ and A2aRemoteAgentConfig, supported by an ADK_A2A_ALLOW_INSECURE_HTTP=1 environment variable fallback. When enabled, _resolve_agent_card and _validate_card_rpc_targets permit non-loopback http:// URLs while maintaining secure-by-default behavior and enforcing same-origin validation across card sources and RPC targets. Fixes google#7139
ArulJerald
force-pushed
the
feat/a2a-allow-insecure-http-7139
branch
from
September 18, 2026 09:48
f6af6cd to
0e60aa0
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.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
RemoteA2aAgentpreviously enforcedhttps://(or loopback addresses likelocalhost/127.0.0.1) for agent card URLs and RPC target URLs. In service mesh environments (such as Kubernetes with Istio, Linkerd, or Consul) where transport-layer security and identity are offloaded to mTLS sidecars, inter-service calls use internal plaintext HTTP endpoints (e.g.,http://my-agent-service.default.svc.cluster.local:8080/agent.json).RemoteA2aAgentrejected these withAgentCardResolutionError, blocking A2A communication in mesh deployments.Solution:
allow_insecure_http: bool = Falseconfiguration option toRemoteA2aAgent.__init__andA2aRemoteAgentConfig.ADK_A2A_ALLOW_INSECURE_HTTP=1environment variable as a fallback._resolve_agent_card()and_validate_card_rpc_targets()to permit non-loopbackhttp://URLs whenallow_insecure_httpis active.False, refusing non-loopback cleartext HTTP).Testing Plan
Unit Tests:
Summary of
pytestresults:tests/unittests/a2a/agent/test_remote_a2a_agent.py: 266 passed (13 new tests added covering parameter, config, environment variable fallback, card resolution, and RPC validation)tests/unittests/a2a/: 732 passed, 49 skipped, 0 failuresManual End-to-End (E2E) Tests:
Tested with a local HTTP service simulating a service mesh backend:
allow_insecure_http=Truetargetinghttp://internal-mesh-service:8080/agent.json.allow_insecure_http=TrueorADK_A2A_ALLOW_INSECURE_HTTP=1is set.AgentCardResolutionErrorby default.Checklist