Security · 2026-10-15

Your agent runs server-side with an admin key and answers questions like «show me MY orders».

  1. AIt is fine - the system prompt says to only return the asker’s own orders
  2. BPass the CALLER’s identity through and authorize inside the tool - the model must not be the access-control layer
  3. CHash the user id before it reaches the tool and let the model match the hash against each order, so personal data never appears in the prompt and access stays private
  4. DAdd a disclaimer that answers may include other customers’ data

Answer: B

Pass the CALLER’s identity through and authorize inside the tool - the model must not be the access-control layer

Why

If the only thing standing between a user and someone else’s data is a sentence in the prompt, then a persuasive question is a working exploit. Authorization must be enforced where the data lives - the model is an untrusted caller, however well it usually behaves.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path