Registry Mirror
Skip to content

Conversation

@shashankram

Copy link
Copy Markdown
Contributor

Backport of #3605 to release/v1.0.x.

Description

MCP and HTTP context wrappers hide the native ADK session ID, causing STS cache lookups to miss and outbound requests to lose delegated identity.

  • Preserve the native ADK session ID through discovery and tool-call context wrapping.
  • Keep delegated-token lookup scoped to the current caller and native session.
  • Cherry-pick 051022c01225929b03587f86581ed77aa7e86f12 without changes.

Change Type

/kind fix

Testing

  • Includes HTTP and SSE regression coverage for discovery, tool calls, wrapped contexts, and caller and session isolation.
  • Includes missing-credential and expired-token coverage.

Changelog

Fixed missing delegated STS tokens on MCP requests after context wrapping.

## Description

MCP and HTTP context wrappers hide the ADK `SessionID()` method, causing
STS
cache lookups to miss and outbound requests to lose delegated identity.

- Preserve the native ADK session ID as a context value during MCP
discovery
  and tool calls so wrapped requests receive the cached delegated token.
- Keep token lookup scoped to the current caller and native session,
which can
  differ from the public A2A context ID.

## Change Type

```
/kind fix
```

## Testing

- Regression coverage exercises discovery, initialization, tool listing,
tool
  calls, and event streams over Streamable HTTP and legacy SSE.
- Coverage checks caller changes, wrapped contexts, missing credentials,
  expired tokens, and session isolation.

## Changelog

```release-note
Fixed missing delegated STS tokens on MCP requests after context wrapping.
```

Signed-off-by: Shashank Ram <shashank.ram@solo.io>
(cherry picked from commit 051022c)
Signed-off-by: Shashank Ram <shashank.ram@solo.io>
@shashankram
shashankram added this pull request to stack #3614 November 9, 2026 21:17
@shashankram
shashankram marked this pull request as ready for review November 9, 2026 21:18
@shashankram
shashankram enabled stacked auto-merge November 9, 2026 21:20
@shashankram
shashankram added this pull request to the merge queue Nov 9, 2026
Merged via the queue into release/v1.0.x with commit 44679ca Nov 9, 2026
31 checks passed
@shashankram
shashankram deleted the shashankram/bk_1.x-3605 branch November 9, 2026 22:05
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.

2 participants