Skip to content

2195 query parameter a2a#2196

Merged
crivetimihai merged 4 commits intomainfrom
2195-query-parameter-a2a
Jan 20, 2026
Merged

2195 query parameter a2a#2196
crivetimihai merged 4 commits intomainfrom
2195-query-parameter-a2a

Conversation

@crivetimihai
Copy link
Copy Markdown
Member

Extends query parameter authentication support (introduced for MCP gateways in #1580) to A2A agents, allowing API keys to be passed as URL query parameters when invoking remote agents.

  • Add auth_query_param_key and auth_query_param_value fields to A2A agent schemas
  • Add _mask_query_param_auth validator for secure display of credentials
  • Update A2A service register_agent, update_agent, and invoke_agent with query_param handling
  • Add feature flag (INSECURE_ALLOW_QUERYPARAM_AUTH) and host allowlist enforcement
  • Apply query params to endpoint URL during agent invocation with URL sanitization in logs
  • Handle query_param auth in tool-based A2A invocation (_call_a2a_agent)
  • Support value-only credential rotation (reuse existing key)
  • Add query_param option and fields to Admin UI (add/edit forms)
  • Create separate migration for a2a_agents.auth_query_params column
  • Add 9 new tests for A2A query_param authentication

Security: Includes CWE-598 warning in UI about URL-based credentials.

Closes #2195

Extends query parameter authentication (introduced for MCP gateways in
#1580) to A2A agents, allowing API keys to be passed as URL query
parameters when invoking remote agents.

Changes:
- Add auth_query_param_key/value fields to A2AAgentCreate/Update schemas
- Add _mask_query_param_auth validator to A2AAgentRead for secure display
- Update A2A service register/update/invoke methods with query_param handling
- Add feature flag and host allowlist enforcement in service layer
- Apply query params to endpoint URL during agent invocation
- Sanitize URLs in logs to prevent credential leakage
- Add query_param option and fields to Admin UI (add/edit forms)
- Update admin.js handlers for A2A query_param auth type
- Create separate migration for a2a_agents.auth_query_params column
- Add comprehensive test coverage (9 new tests)

Security: Includes CWE-598 warning in UI about URL-based credentials.
Requires INSECURE_ALLOW_QUERYPARAM_AUTH=true to enable.

Closes #2195

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai self-assigned this Jan 19, 2026
@crivetimihai crivetimihai marked this pull request as ready for review January 19, 2026 23:43
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai merged commit 8948347 into main Jan 20, 2026
50 checks passed
@crivetimihai crivetimihai deleted the 2195-query-parameter-a2a branch January 20, 2026 00:13
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
* feat: Add query parameter authentication support for A2A agents

Extends query parameter authentication (introduced for MCP gateways in
IBM#1580) to A2A agents, allowing API keys to be passed as URL query
parameters when invoking remote agents.

Changes:
- Add auth_query_param_key/value fields to A2AAgentCreate/Update schemas
- Add _mask_query_param_auth validator to A2AAgentRead for secure display
- Update A2A service register/update/invoke methods with query_param handling
- Add feature flag and host allowlist enforcement in service layer
- Apply query params to endpoint URL during agent invocation
- Sanitize URLs in logs to prevent credential leakage
- Add query_param option and fields to Admin UI (add/edit forms)
- Update admin.js handlers for A2A query_param auth type
- Create separate migration for a2a_agents.auth_query_params column
- Add comprehensive test coverage (9 new tests)

Security: Includes CWE-598 warning in UI about URL-based credentials.
Requires INSECURE_ALLOW_QUERYPARAM_AUTH=true to enable.

Closes IBM#2195

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* Lint fixes

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* Lint fixes

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* Lint fixes

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add query parameter authentication support for A2A agents

1 participant