Replies: 1 comment
-
|
The pattern I would use is to keep these as three separate concerns: edge authentication, ADK state, and downstream tool/MCP authorization.
So your direction is reasonable, but I would tighten it by keeping raw tokens out of agent state, using middleware only in the production ASGI path, and testing If this resolves the deployment pattern, please mark it as the answer so others can find it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I’m trying to deploy an A2A agent using Google ADK, and I’m struggling to find clear documentation around authentication, token propagation, and session handling.
🎯 What I Need
I would like to:
✅ What I Implemented So Far
1️⃣ Convert Agent to A2A
I converted my root agent to A2A using
to_a2a:2️⃣ Custom JWT Middleware
I implemented a
JWTAuthMiddlewareusingContextVarto propagate the decoded payload across the agent execution:3️⃣ Inject User Info into Agent Context
I added a
before_agent_callbackto push user info into the agent state:With this setup. I'm having some issues:
🤔 Main Questions
Beta Was this translation helpful? Give feedback.
All reactions