Skip to content

3.2 Authentication, Authorisation, and the Gaps Between

Authentication answers who is calling. Authorisation answers what may they do. A request passes from the user to the client, the agent, its tools and the downstream systems they reach. Each step is a hop. Effective privilege is what the identity at a hop can reach. A security gap is wherever effective privilege exceeds the legitimate need of the user who makes the request.

This lesson uses one made-up example throughout: a sandwich shop whose staff use an agent for shifts and bread orders. Its rota tool reads staff records, and these records include pay. Its ordering tool calls the supplier. At each hop, ask two questions. Who does the downstream system believe is calling? What can that identity reach?

Stronger authentication (MFA, SSO) changes who can start a session. It does not change what an over-broad scope permits once the session exists. If the rota tool reads every staff record, MFA does not change that. A shared credential, an admin key at a tool boundary and an agent that reads every record are authorisation gaps. Scoping, identity propagation (tool calls carry the authenticated user’s identity) and credential separation fix them.

The classic gap is an agent that serves many users through one over-privileged service account. Any user can then potentially reach anything that the account can reach, such as the manager’s pay. The agent is a confused deputy: it uses its privilege for users who should have less. The MCP security best-practices document names this attack class for proxy servers and requires per-client consent.

The architectural fix is identity propagation. Tool calls carry the authenticated user’s identity, and every read or write is scoped to what that user may legitimately reach. A staff member at the counter then sees only their own shifts. When identity propagation is done properly, the agent can never exceed the rights of the user that it acts for. As a side effect, every call also carries attribution into the audit trail.

Prompts are logged and cached, and the model can repeat them in its output. So treat a credential in context that the model can see as public. Anyone who has the logs can read a supplier key in the agent’s system prompt. Secrets belong in a secrets manager. Inject each secret at the tool boundary, and scope it to the minimum resource and lifetime.

After a leak, the order matters: rotate the key immediately, then move the privileged call behind a backend that the client cannot bypass. Rotation alone leaves the new key exposed to the same leak path.

Remote MCP servers authenticate with OAuth. In their authorisation model, each hop authenticates for itself. Token passthrough means accepting a client’s token and forwarding it downstream. It is a named anti-pattern, and the MCP specification explicitly forbids it. It does four kinds of harm.

  • It breaks audience validation (the check that a token was issued to this server).
  • It destroys attribution, because downstream logs show the wrong identity.
  • It circumvents rate limits and controls tied to the token.
  • It lets a stolen token pass downstream.

Each hop gets its own scoped credential, so the shop’s ordering server never forwards the manager’s token.

Every tool call should appear in the audit trail with user attribution: who asked, which tool, which resource. Without attribution, incident response cannot distinguish one user’s actions from another’s when users share a credential. Nobody can say who ordered the extra bread. One API key shared across users and environments is the worst case. It gives no attribution and the maximum blast radius on a leak. Rotating the key breaks everything at once.

The exam’s favourite pattern presents an authorisation gap as an authentication question and offers MFA. If you distinguish the two, you remove most of the wrong options on this objective. For the three authorisation gaps above, every option that strengthens login fixes the wrong kind of problem, however sensible it is in isolation. The exam offers “Just forward the user’s token” as a simple, practical choice, and it is a wrong answer. An option that secures one hop while the question’s gap is at another hop is a wrong option. Objective 3.4 covers connecting attribution to monitoring. This objective covers designing attribution into the calls.

A customer-service agent answers account questions for any customer who authenticates to the web app. The agent calls an internal accounts API using a single service credential with read access to ALL customer records. A security review asks what is wrong with this design. Which change addresses the actual gap?

  • A. Add MFA to the customer login flow so every session reaching the agent is strongly authenticated
  • B. Propagate the identity of the authenticated customer on the agent tool calls and scope reads to that customer
  • C. Log every agent call to the accounts API and review for cross-customer access
  • D. Instruct the agent in its system prompt never to reveal data belonging to other customers
Answer & explanation

Correct: B

  • A — An authentication fix for an authorisation gap: however strongly customers log in, the agent still reads any record through its over-broad service credential.
  • B — Fixes the confused deputy directly: the agent can never exceed the rights of the customer it acts for, and every call carries attribution for the audit trail.
  • C — A detective control: it records cross-customer reads after they happen rather than making them impossible.
  • D — An instruction, not an access control; the capability to read every record remains wired and reachable through error or injection.