api7 / api7/aisix

A2A agent url is not checked for embedded userinfo, unlike the Vertex and Azure api_base

Open Beginner friendly
#956 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
157
Forks
32
Avg merge
1h 25m
Merged PRs (30d)
145

Description

What

A2aAgent.url is accepted and dialed as configured. The Vertex and Azure bridges both reject an api_base that embeds userinfo (https://user:pass@host, #390 / #391) because a URL-embedded credential is not a credential the gateway holds or can rotate, and it leaks into anything that renders the URL. The A2A path has no equivalent check.

Why it matters

  • The credential travels on every dispatch to that agent, outside the auth_type / secret mechanism the resource models for exactly this purpose.
  • A2aUpstream's Debug and the agent-card warning path both render the URL, so it reaches logs.

Neither is a regression — the URL has always been used verbatim — but the two sibling bridges treat this as a config error and A2A does not, which is the kind of asymmetry that survives because nobody is looking at both at once.

Suggested fix

Reject at resource-resolution time (upstream_from_a2a_agent, or wherever the A2A agent resource is validated), with the same shape of error the Vertex and Azure bridges return, so the operator sees an actionable message instead of a silently credential-bearing URL.

Found by the independent pre-merge audit of api7/aisix#955, which noted it as pre-existing and out of that PR's scope.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at resource resolution in upstream_from_a2a_agent and compare its URL handling with the Vertex and Azure api_base validation for issues #390 and #391. The work is done when A2A agent URLs containing embedded userinfo are rejected with an equivalent actionable configuration error before dialing or rendering the URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.