Authorization and identity for tool calls
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
make every tool call run as the end user.
Planned topics
- The tool call carries the customer's token (from the session), never a shared service account.
- The downstream service checks ownership exactly as it does for the customer's own request.
- Never put the user id in a model-controlled argument; take it from the authenticated context.
- Whether an action is allowed is decided by code and policy, never by the model's judgment ("the user seems entitled").
Draft outline details
Demonstration
diagram: customer token → assistant backend → orders API (ownership check) → 403 for someone else's order; the model sees only {error:"NOT_ALLOWED"}.
Check your understanding
Where does the user id for a tool call come from?
Show answer
The authenticated session, not the model.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.