You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adk/README.md
+6-19Lines changed: 6 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ The JSON configuration for `AGENT_TOOLS` should follow this structure:
73
73
"tool_name": {
74
74
"url":"https://mcp-tool-endpoint:8000/mcp",
75
75
"timeout":30, // Optional: connect timeout in seconds (default: 30)
76
-
"propagate_headers": ["X-API-Key", "Authorization"] // Optional: list of headers to propagate
76
+
"propagate_headers": ["X-API-Key", "Authorization"] // Optional: list of headers to propagate (default: [])
77
77
}
78
78
}
79
79
```
@@ -86,7 +86,7 @@ You can configure which HTTP headers are passed from the incoming A2A request to
86
86
-**Per-server configuration**: Each MCP server can receive different headers
87
87
-**Security**: Headers are only sent to servers explicitly configured to receive them
88
88
-**Case-insensitive matching**: Header names are matched case-insensitively
89
-
-**Backward compatibility**: When `propagate_headers` is not specified, the legacy behavior is used (only `X-External-Token` is passed)
89
+
-**Default behavior**: When `propagate_headers` is not specified or is empty, no headers are passed
90
90
91
91
**Example configuration:**
92
92
```json5
@@ -101,7 +101,7 @@ You can configure which HTTP headers are passed from the incoming A2A request to
101
101
},
102
102
"public_tool": {
103
103
"url":"https://public-mcp.example.com/mcp"
104
-
// No propagate_headers - only X-External-Token will be passed (legacy behavior)
104
+
// No propagate_headers - no headers will be passed
105
105
}
106
106
}
107
107
```
@@ -188,24 +188,11 @@ Based on the configuration above:
188
188
-`weather_api` MCP server will receive `X-API-Key` and `X-User-Location` headers
189
189
-`database_tool` MCP server will receive only the `Authorization` header
190
190
191
-
### Backward Compatibility
192
-
193
-
For backward compatibility, if `propagate_headers` is not specified in the configuration, the SDK will use legacy behavior: only the `X-External-Token` header is passed to the MCP server.
194
-
195
-
```json5
196
-
{
197
-
"legacy_tool": {
198
-
"url":"https://legacy-mcp.example.com/mcp"
199
-
// No propagate_headers - only X-External-Token will be passed
200
-
}
201
-
}
202
-
```
203
-
204
191
**Limitations**: Header propagation is only supported for MCP servers. Propagation to sub-agents is not currently supported due to ADK limitations in passing custom HTTP headers in A2A requests.
205
192
206
193
### Security Considerations
207
194
208
-
-Tokens are stored in ADK session state (separate from memory state that the LLM can access)
209
-
-Tokens are not directly accessible to agent code through normal session state queries
210
-
-Tokens persist for the session duration and are managed by ADK's session lifecycle
195
+
-Headers are stored in ADK session state (separate from memory state that the LLM can access)
196
+
-Headers are not directly accessible to agent code through normal session state queries
197
+
-Headers persist for the session duration and are managed by ADK's session lifecycle
211
198
- This is a simple authentication mechanism; for production use, consider implementing more sophisticated authentication and authorization schemes
0 commit comments