Zum Inhalt springen

Across the Hops

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Module 4 of 6 in the chapter Agents and Identity, chapter 17 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: One agent calls another, and that one calls a tool. Does the person’s identity travel?

Every flow in this course had a short chain. Priya, an app, Salesforce. One hop, maybe two. The token said who she was, and the system at the end checked it.

Agents make the chain long. Priya asks her company’s assistant to get her open orders, check the weather on the delivery route, and book a pickup with a carrier. The assistant hands the orders to an orders agent, which calls an orders tool. It hands the weather to a weather agent. It hands the pickup to a carrier agent, which has to talk to the carrier’s own system. One question from Priya, five or six hops.

Salesforce’s architects describe exactly this: “a single request fans out across various agents, services, and Model Context Protocol (MCP) servers,” each one “potentially crossing service boundaries, trust domains, and even organizational borders” (S2). And they name what usually happens today: agents call each other with “client credentials, API keys, or shared secrets,” so “User identity is lost by default” (S2). By the second hop, nobody downstream knows it was Priya.

There are two easy answers, and both are wrong.

Forward Priya’s token. The assistant has her token, so pass it along to everyone. But that token was issued for the assistant, with everything the assistant was allowed. Every agent and tool in the chain now holds a key to all of it. Salesforce’s architects: forwarding it “would violate the principle of least privilege” (S2).

Use a service account. Each agent signs in as itself. Now nothing downstream knows which user asked, so it can’t check her access, and the audit trail blames the service account for everything. In their words, “a total loss of user identity” (S2).

What you want is in between: at each hop, a new token, for that hop only, that still says who the person is. Sometimes. Because not every hop needs the person at all.

Salesforce’s architects describe three patterns, and they’re “not mutually exclusive”: one assistant can use all three in one conversation (S2). Here they are with Priya’s three requests.

On-behalf-of: the data is hers. Her open orders are her data, so the orders agent and the orders tool must know it’s Priya, and check her access. At each hop, her token is exchanged for a new one, scoped to the next service, that still names her (S2). That’s the token exchange standard, RFC 8693, the same idea you met in chapter 11, module 4, where Salesforce exchanged an outside identity provider’s token for its own. “Every hop is attributable to the original end user” (S2).

Server-to-server: the data is nobody’s. The weather on the route is the same for everyone. The weather agent doesn’t need Priya, and giving her token to it would only widen what could leak. So that hop uses the assistant’s own identity, client credentials, from chapter 8. Salesforce’s architects: “No user identity is present in the chain by design because none is needed” (S2).

In-task authorization: the data is somewhere else. The carrier has its own identity provider, and it has never heard of Priya’s company. No token exchange can fix that, because the carrier doesn’t trust the company’s identity provider. So the carrier’s system sends back a challenge, and the app asks Priya to sign in to the carrier, right there in the conversation, with PKCE (S2). Then the carrier’s own token rides that hop. Priya gives her consent to a system she has her own relationship with, and the agent never sees her carrier password.

Three patterns across a hop Three patterns across a hop, for one question from Priya. Her open orders, her own data, so the next system needs her: on-behalf-of, her token exchanged at each hop, chapter 11; at the next hop, the tool checks Priya's access, and the audit names her. The weather on the route, nobody's data, so it doesn't need her: server-to-server, the assistant's own identity, chapter 8; no person in the chain, because none is needed. A pickup with a carrier that has its own identity provider, so it needs her there: in-task authorization, she signs in to the carrier in the conversation, with PKCE; the carrier's own token, with her consent. Marked amber, the easy way for any of them: forward her token, or use a shared service account; that gives too much, or loses the person. Footnote: after Salesforce Architects, End-User Identity Propagation in Agents, checked 2026-11-20. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-AGI-05", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} PRIYA ASKS FOR THE PATTERN AT THE NEXT HOP Her open orders her own data On-behalf-of her token exchanged at each hop · ch 11 The tool checks Priya and the audit names her The weather on the route nobody's data Server-to-server the assistant's own identity · ch 8 No person in the chain none is needed A pickup with a carrier another company's own identity provider In-task authorization she signs in to the carrier, with PKCE The carrier's own token with her consent Any of them the easy way Forward her token or a shared service account Too much, or nobody least privilege or the person, lost needs her so no need so her consent so tempts gives After Salesforce Architects, End-User Identity Propagation in Agents, checked 2026-11-20. HOW TO READ IT the person kept, or left out on purpose the two wrong answers © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

So the question at every hop is simple: does the next system need the person? Her data, yes: on-behalf-of. Nobody’s data, no: server-to-server. Another company’s data, yes, and it has to come from her: in-task.

If every agent has to do this itself, every agent’s code has to get it right. Salesforce’s architects suggest doing it once, at the gateway the traffic passes through, so “the agents and MCP servers contain zero authentication logic” (S2). Their example uses MuleSoft Flex Gateway, whose outbound policies do the token exchange, the client credentials or the in-task challenge on each route (S2). That’s one way to build it. The principle holds whatever you use: decide the pattern per route, in one place, where it can be reviewed.

There’s a classic name for the failure on the other side: the confused deputy. A program with more access is tricked into using it for someone with less. Agents make it easy, because an orchestrating agent can ask a specialist agent to do something the orchestrator itself isn’t allowed to do.

Salesforce’s architects say it in one sentence: “If an orchestrator shouldn’t write to an object, it shouldn’t be able to accomplish that write indirectly through a specialist that can” (S1). Their advice: map the effective permissions of the whole chain before you deploy, not each agent alone (S1). And at each hop, check the request, not just the caller: “Trust in the caller’s identity doesn’t mean trust in the caller’s content” (S1).

The same thing happens without agents. When a flow calls another flow, which calls an outside API, “the external system sees the identity of the named credential the callout uses, not the original end user” (S1). Every hop is a place to lose the person, or gain power you didn’t mean to give.

When the next agent belongs to another company, you can’t map its permissions ahead of time. That’s where agent metadata comes in, called Agent Cards in the Agent2Agent protocol: what the agent can do, its authority, and the “organizational principal the agent represents” (S1). The integration side of agent-to-agent is the Integration course’s chapter on it. For identity, the point is short: an agent’s identity is anchored in the organization that runs it.

Module 5: MCP, the door for tools. The last hop is usually a tool, and Salesforce has its own MCP servers.

  • At every hop: does the next system need the person? On-behalf-of, server-to-server or in-task.
  • Never forward the original token, and never collapse a person’s request into a shared account.
  • Where the pattern is decided: in each agent, or once, at a gateway.
  • The effective permissions of the whole chain, mapped before go-live.