-
Notifications
You must be signed in to change notification settings - Fork 391
add list of allowed headers to be passed to tool calls #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add list of allowed headers to be passed to tool calls #1217
Conversation
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for propagating specific HTTP headers from A2A requests to MCP tool calls, allowing selective header forwarding based on a configured allowlist.
Changes:
- Added header propagation functionality to combine STS tokens with allowlisted headers from A2A requests
- Updated CRDs and Go types to support
allowedHeadersconfiguration on Agent MCP tools - Added new dependencies (filelock and urllib3) to support the implementation
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| python/uv.lock | Updated filelock (3.18.0 → 3.20.3) and urllib3 (2.5.0 → 2.6.3), added as new dependencies |
| python/packages/kagent-adk/tests/unittests/test_header_propagation.py | Comprehensive unit tests for header propagation including case-insensitivity, STS combination, and edge cases |
| python/packages/kagent-adk/src/kagent/adk/types.py | Core implementation of create_header_provider function and propagate_headers fields on MCP server configs |
| helm/kagent-crds/templates/kagent.dev_remotemcpservers.yaml | Added allowedHeaders field to RemoteMCPServer CRD schema |
| go/internal/controller/translator/agent/testdata/inputs/agent_with_allowed_headers.yaml | Test data demonstrating agent configuration with allowed headers |
| go/internal/controller/translator/agent/adk_api_translator.go | Updated translator to pass allowedHeaders from Agent spec to ADK config |
| go/internal/adk/types.go | Added PropagateHeaders field to HttpMcpServerConfig and SseMcpServerConfig structs |
| go/config/crd/bases/kagent.dev_agents.yaml | Added allowedHeaders field to McpServerTool in Agent CRD schema |
| go/api/v1alpha2/zz_generated.deepcopy.go | Generated deepcopy implementation for AllowedHeaders field |
| go/api/v1alpha2/agent_types.go | Added AllowedHeaders field to McpServerTool struct |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
go/internal/controller/translator/agent/testdata/inputs/agent_with_allowed_headers.yaml
Show resolved
Hide resolved
python/packages/kagent-adk/tests/unittests/test_header_propagation.py
Outdated
Show resolved
Hide resolved
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
… remove old ref from remote mcp servers Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Add new allowedHeaders option on agent mcp server config. Its an array of string (case insensitive) of headers to be passed along to tool calls.
This is useful for things outside of jwt, like passing in tenant id and user email for cloud provider calls.