Replies: 2 comments 2 replies
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: Use the "User Auth" pattern with an Hi PanchoG17, Thanks for the great question. This is a common and important scenario for building secure agents. Here's a breakdown of the recommended way to handle JWT-based authentication in ADK-Python, addressing your specific points. 1. How to securely extract the
|
Beta Was this translation helpful? Give feedback.
-
Have you found a solution yet? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Example Scenario: Using JWT in ADK-Python for Authenticated User CRUD
Hi community,
I’d like to discuss a basic scenario and get guidance on securely handling JWT tokens within the agent flow.
Scenario
Suppose we have a tool that performs basic CRUD operations on user accounts. Only authenticated users can modify their own data.
We want to use JWT tokens for authentication. The questions are:
user_id
from the JWT within the agent flow.Example Flow
Authorization: Bearer <token>
header.user_id
from the token.user_id
matches the resource owner.I’d love to see an example or discussion about the recommended way to handle this in ADK-Python, especially how to extract the JWT payload safely and integrate it into the flow of the agent.
Thanks for any guidance or examples!
Beta Was this translation helpful? Give feedback.
All reactions