F·AI 金融 AI 实践笔记← 返回本场摘要
中文译文 · NYC 2026 NO. 11 / 53

你的智能体构成致命三要素(以及应对之道)

Your Agent Is a Lethal Trifecta (and What to Do About It)

原文由官网提供,中文由 GPT-6 Luna 翻译。相邻片段合并排版,正文与时间点保持对应。

已插入 31 张经核对的幻灯片或演示截图;点击图片可放大。图注链接为当前视频时间,左侧正文时间保留原转录版本,二者可能不同。

共 47 个阅读段落

03:36:04 ↗0001–0007

今天我要和大家谈谈,为什么你的智能体构成了致命三要素,以及该如何应对。我们一开始就直接看一个演示。先介绍一下这个演示的背景:我们会看一个值班分诊智能体,它可以读取和写入事件告警系统,并解决或升级工单。这个智能体可以完全访问云托管 API、客户数据仓库以及计费数据库。这里是我们的值班分诊智能体,它会读取一个事件工单队列。如果它能够解决工单,就会调用自己有权访问的可用服务,并执行相应操作。

Today I'm going to talk to you about how your agent is a lethal trifecta and what to do about it. Now we're going to start out right off the bat with a demo. Some context on this demo, we're going to look at an on-call triage agent that reads and writes to an incident pager and resolves or escalates tickets. This agent has full access to a cloud hosting API, a customer data warehouse, as well as a billing database. So here we have our on-call triage agent, and it has an incident queue of tickets that it's going to read. and then if it can resolve them, it's going to call the available services that it has access to and it's going to do so.

03:36:46 ↗0008–0015

它无法解决的事项会升级给早班团队。我们先看第一张工单,这是一个计费异常。工单说,昨晚有一批客户被多收费了。智能体首先会直接调用 Incitex API 来读取工单。你可以看到,它使用 API 密钥授权访问这个 API。接着,它使用 Snowflake 密钥查询客户数据仓库,并决定把工单升级给早班团队审核。它还为早班团队撰写了一份报告。你可以看到,报告中分享了客户数据。

Things that it can't resolve, it's going to escalate for the morning team. So if we take a look at this first ticket, this is a billing anomaly. It says a batch of customers were overcharged last night. So the first thing the agent does is it directly calls the Incitex API in order to read the ticket. And if you look here, you can see that it authorized access to this API using an API key. It then uses a Snowflake key to query the customer data warehouse, and it's going to decide to escalate the ticket for morning review. And it writes a report for the morning team. And as you can see, it's sharing customer data.

03:37:24 ↗0016–0021
On-call triage agent: customer data
视频截图 · 演示 · 过宽凭证可能读取并转发客户明细03:10:57 ↗

这些行数据直接来自客户数据仓库,它把个人身份信息发送给早班值守团队。下一张工单说服务器机房的备用电源故障了。智能体会读取这张工单。它同样使用 API 密钥调用工单 API。它判断这是一个实体设备问题,因此将其升级给早班团队审核,不再调用其他服务。这一张说网站的 TLS 证书很快就要过期。

These are rows directly pulled from the customer data warehouse, and it is sending personally identifiable information to the team that is going to be on staff in the morning. This next ticket is a backup power supply failed in the server room. The agent is going to read the ticket. Again, it's using an API key to call the ticket API. It determines that this is a physical problem, so it escalates for morning review without calling any additional services. This one is the TLS certificate is expiring soon for the website.

03:38:07 ↗0022–0023

它读取工单,并判断警报信息很明确。它有权访问云托管 API,于是使用 API 密钥调用证书续期端点。

It reads the ticket. It determines that the alert is clear. It has access to the cloud hosting API, and it calls that API at the certificate renew endpoint using, again, an API key.

03:38:22 ↗0024–0026
On-call triage agent: certificate renewal
视频截图 · 演示 · 自动续期证书及留下处理记录03:11:57 ↗

它通过续期证书解决了问题,还调用事件告警 API,给早班团队留下一份报告。下一张工单说计费数据库出故障,付款无法处理。文档记载的恢复方法是删除并恢复数据库。

It resolves this by renewing the certificate, and it leaves a report for the morning crew by calling the pager incident API as well. This next one is the billing database is broken and payments are failing. So the documented recovery for this is to drop and restore the database.

03:38:45 ↗0027–0032
On-call triage agent: billing database
视频截图 · 演示 · 不受限的数据删除与恢复操作03:12:17 ↗

智能体使用一条包含管理员密码的数据库连接字符串来执行这个操作。随后它建议早班团队确认快照恢复是否成功。它本身无法直接检查这件事。所以它基本上是在假设早班团队会确认操作确实成功,并且信息已经恢复。权限过大的智能体删除生产数据库,这简直是噩梦,而且确实有几家公司经历过这种事。所以我们必须对此格外谨慎。

The agent does this using the database connection string that includes the admin password. And then it advises the morning team to make sure that the snapshot recovery worked. Now, this is not something that it has access to directly. So it is essentially assuming that the morning team is going to verify that this did in fact work and the information was restored. Now, an overprivileged agent dropping a production database is basically a nightmare that several companies have actually lived. So this is something that we need to be very careful of.

03:39:26 ↗0033–0041

下一张工单说订单卡住了。主服务器冻结无响应。智能体又会去读取工单。读完工单后,智能体再次使用自己的静态API 密钥调用云托管 API。它调用重启服务器的端点,导致生产环境下线。最后一张工单说,三分之一的访客无法访问网站。智能体读取工单。它判断

Now, the next one is orders are stuck. Main server is frozen. So the agent is again is going to read the ticket. After reading the ticket, the agent calls the cloud hosting API using again its static API key. It calls the endpoint to restart the server, which brings production offline. Finally, site is failing for one in three visitors. Agent reads the ticket. it determines that

03:40:00 ↗0042–0042
On-call triage agent: service scaling
视频截图 · 演示 · 自动扩容可能带来未批准的成本03:13:37 ↗

应该调用云托管 API,把服务的 Pod 数量从 4 扩展到 40。这样每小时会产生 420 美元费用。然后它还贴心地给早班团队留了条备注,告知发生了这件事。

it should call the cloud hosting API and scale the service from four pods to 40. It then incurs a charge of $420 per hour for doing this. And then it kindly leaves a note for the morning team informing them that this has happened.

03:40:19 ↗0043–0050
What makes an agent useful
视频截图 · PPT · 数据、研究和外部工具能力03:14:17 ↗

那么,是什么让智能体有用?通常,我们希望智能体具备一组基本能力,其中往往包括读取你拥有或有权访问的数据。比如电子邮件、文档,也可能是客户 CRM。我们希望智能体能自己开展研究,因此可能需要搜索网页、阅读文档,或从 GitHub 获取问题。我们通常也希望它能使用外部工具,例如 MCP 服务器或 API,也可能是 SaaS 平台。有用的智能体可以在人参与审核的情况下完成这些工作,也可以在后台自主运行。

Now, what makes an agent useful? Well, typically, we want agents to have a minimum set of capabilities, and often this includes things like the ability to read data that you own or have access to. This might be like your email, your documents, maybe a customer CRM. We want the agent to be able to do its own research, so this might include searching the web, maybe reading documentation, or pulling issues from GitHub. And we usually want it to be able to use external tools, for example, MCP servers or APIs, maybe SAS platforms. useful agents might do these things with a human in the loop, or they might be doing it autonomously in the background.

03:41:00 ↗0051–0056
What makes an agent a lethal trifecta
视频截图 · PPT · 私有数据、不可信内容与外部通信03:14:57 ↗

但让智能体变得有用的能力,也会让它变得危险。事实上,Simon Willison 提出的“致命三要素”,正是由这三种能力组合而成。其中包括访问私有数据,例如值班智能体能够查询客户数据仓库并操作计费数据库;接触不可信内容,例如读取用户提交的工单、其他智能体生成的报告或外部记录的流程;以及对外通信的能力,例如通过第三方 API 或 SaaS 服务读取和写入数据。这些能力组合在一起,就为攻击者敞开了大门。

But the things that make agents useful also make them dangerous. In fact, together, these three capabilities make what Simon Willison coined as a lethal trifecta. This is a combination of access to private data, like the on-call agent's ability to query the customer data warehouse and interact with the billing database, exposure to untrusted content, like reading user-submitted tickets or reports from other agents or externally documented processes, and the ability to communicate externally, like reading and writing with third-party APIs or SaaS services. Together, these capabilities throw the doors wide open for attackers.

03:41:42 ↗0057–0061

智能体的设计目标是完成任务,它们会动用所有可用的能力来完成任务,有时会造成非常严重的后果。问题在于:事故之所以发生,是因为人类给智能体的访问权限远超其所需。权限过大的智能体可以自由执行自己做出的决定,即使它们受到监督也是如此。

Now, agents are designed to get the job done, and they'll use all the powers that they have to do it, sometimes with very serious consequences. here's the thing. incidents happen because humans give agents way more access than they need. Overprivileged agents can act freely on decisions that they make, even if they do have supervision.

03:42:06 ↗0062–0066
Humans give agents too much access
视频截图 · PPT · 仅靠人工确认仍会产生授权疲劳03:15:37 ↗

强制要求人在回路审批,只不过是把访问控制责任转交给已经因频繁确认而疲劳的用户。几十年来,我们一直在为人类解决访问管理问题;把责任转给用户,只是把安全问题往责任链上游推。那么,面对致命三要素,我们该怎么办?如何在不损害智能体实用性的前提下解决它?如果直接移除其中一种或多种能力,智能体就会变得明显没那么有用。那么,怎样才能保留这三种能力,同时确保安全?

Now, forcing a human-in-the-loop approval just kind of passes the access control on to a consent-fatigued user. Now, we've spent decades solving access management for humans, so shifting responsibility to the user just sort of moves the security problem up the chain. So what should we do about the lethal trifecta? How do we address it without compromising the agent's usefulness? Well, just removing one or more of these capabilities is going to cause the agent to be significantly less useful. So how can we keep all three, but still be safe about it?

03:42:42 ↗0067–0069
Control agent access
视频截图 · PPT · 控制访问范围并保留有用能力03:16:17 ↗

与其通过移除能力来打破这个三要素,我们真正需要做的是控制智能体的访问权限,从而缩小攻击面、限制影响范围,同时保留智能体的能力和自主性。那我们该怎么做?控制访问权限的一些方法包括使用 OAuth、供应商提供的 MCP 网关,或在沙箱中隔离执行。

Well, instead of breaking the trifecta by removing capabilities, we really need to control the agent's access so the attack surface is minimized and the blast radius is contained, but the agent still has capability and autonomy. So how do we do that? Well, some options for controlling access, among others, are things like using OAuth, maybe using a vendor MCP gateway, or containing execution in sandboxes.

03:43:12 ↗0070–0075
OAuth binds delegated access to a grant
视频截图 · PPT · OAuth 授权与单次任务的边界03:16:57 ↗

OAuth 会把访问权限绑定到授权许可上。授权时,用户会同意智能体可能使用的全部权限。但授权发生在任何任务开始之前;如果授予宽泛权限,最终就会形成长期有效的访问权限。对于任何一个具体任务,你的智能体都拥有过多权限。如果你缩小授权范围,不给它多少权限,那智能体就会变得能力不足。无论哪种情况,单靠 OAuth 都无法实现任务范围内的访问控制。一个积极主动的智能体可以在同一次运行中既读又写,即使

Now, OAuth binds access to a grant. At grant time, the user consents to all of the permissions that the agent could possibly use. Now, consent is granted before any task exists, so if you give a broad grant, then you end up with standing access. your agent is over permissioned for any single specific task. If you narrow the grant and you don't give it very many permissions, then the agent just becomes less capable. Either way, OAuth alone doesn't provide task scoped access control. An enthusiastic agent can both read and write in the same run, even if

03:43:46 ↗0076–0080
Gateways bind enforcement to a route
视频截图 · PPT · 网关按路由执行控制的能力与限制03:17:17 ↗

你在这项具体任务中只希望它读取。MCP 网关则会把执行约束绑定到路由上。你能获得可观测性、速率限制等功能,还可以在 MCP 层设置统一的策略决策点。每个请求都会执行策略,访问权限按用户授予,但智能体获得的访问权限会超出单个任务的生命周期,因为网关仍然持有长期有效的凭证。

you only want it to read on this specific task. Now an MCP gateway binds enforcement to a route. You get things like observability and rate limits and you also get one policy decision point at the MCP layer. A policy runs per request, and access is granted per user, but the agent's granted access outlives any single task because the gateway still holds standing credentials.

03:44:12 ↗0081–0087
Sandboxes bind execution to a process
视频截图 · PPT · 沙箱之外的资源仍需要授权03:17:57 ↗

沙箱则会把执行约束绑定到进程上。它可以限制影响范围,但要完成有用的工作,就必须访问沙箱之外的资源,而一旦这样做,又会形成长期有效的访问权限。我们也见过很多智能体突破沙箱隔离的案例。沙箱限制进程能做什么,但并不控制哪些行为获准在沙箱之外执行。即使把这三种解决方案全部结合起来,智能体仍然不会获得仅针对单个任务缩小权限范围的运行时凭证。

Now a sandbox binds execution to a process. This controls the blast radius, but useful work has to reach outside the sandbox, and when it does so, you end up with standing access again. Now we've also seen plenty of stories about agents breaking sandbox containment. Sandboxes bound what the processes can do, but they don't control what is authorized to act outside the sandbox itself. Now, even if you combined all three of the solutions, the agent still doesn't receive a runtime credential that's downscoped to only one task.

03:44:47 ↗0088–0097
Agent access problems
视频截图 · PPT · 身份归属、过宽权限与人工确认问题03:18:37 ↗

我们来回顾一下这些问题,尤其是演示中看到的问题。还记得审计日志吧?我们无法判断是谁在使用那些 API 密钥。所以第一个问题是,凭证没有关联到用户身份或智能体身份。智能体可以不受限制地使用 API 密钥所授予的所有权限。最后,我们也不能到处都强制要求人在回路,因为人也会犯错,同样如此。而且许多智能体是自主运行的,根本没有人在回路中。要解决这些问题,我们可以先采用一种叫作令牌交换的机制。这是一项现有标准,于 2020 年发布,是对 OAuth 2 的扩展。

let's recap the problems, especially the ones that we saw in the demo. Now, if you remember the audit log, we couldn't tell who was using the API keys. So the first problem is that credentials weren't attributed to a user or an agent's identity. The agent had unrestricted access to any and all permissions that were granted by the API keys. And finally, we can't just slap human in the loop everywhere because humans make mistakes too. Plus many agents run autonomously and they don't even have a human in the loop. So to solve these problems, we can start by using something called token exchange. Now, this is an existing standard that was published in 2020, and it extends OAuth 2.

03:45:30 ↗0098–0105

首先,我们需要知道用户是谁。授权服务器负责验证身份并签发令牌。Google、Okta、Auth0 等身份提供商会提供授权服务器。因此,如果我们希望在智能体执行路径中建立身份链,用户就必须先登录。授权服务器会提示用户同意将资源访问权限委托给智能体,并只授予其权限中的一部分。这些权限称为作用域(scope)。这就是第一层权限收窄。我们只把用户全部作用域中的一部分委托给智能体。

Now, first, we need to know who the user is. Now, an authorization server verifies identities and issues tokens. Identity providers like Google, Okta, Auth0, etc. provide authorization servers. So if we want an identity chain in our agent execution path, then the user has got to log in first. The authorization server is going to prompt the user for consent to delegate access to resources with some subset of their permissions. Now, these permissions are called scopes. This is the first narrowing of access. We're only delegating some of the user's total scopes to the agent.

03:46:09 ↗0106–0111
Authorization server issues user token
视频截图 · PPT · 从用户身份和已有权限开始03:19:37 ↗

授权服务器会签发令牌,其中标明用户身份及其访问级别。到这一步,我们已经比演示中的做法更安全,因为我们确实知道用户是谁,也知道他们能访问什么。接下来就进入智能体执行路径。现在用户已经通过身份验证,因此我们知道这个人是谁,也知道他想使用 LLM 与某项资源交互。在演示中,这些资源包括事件告警系统、生产数据库、Snowflake 和云托管服务。智能体是一个调用 LLM 的控制循环。

The authorization server issues tokens identifying the user and their level of access. And at this point, we're already doing better than the demo because we actually know who the user is and we actually know what they can access. So this brings us into the agentic execution path. Now we have our authenticated user, so we have a known identity of a person who wants to use an LLM to interact with a resource. Now, in the demo, the resources are the incident pager, the production database, Snowflake, and the cloud hosting service. An agent is a control loop that calls an LLM.

03:46:47 ↗0112–0113
MCP server provides tools and resources
视频截图 · PPT · MCP 服务器连接下游工具资源03:20:17 ↗

通常,智能体和资源之间会有一个 MCP 服务器,它提供定义好的工具来连接下游服务。MCP 客户端会把智能体提出的工具调用发送给 MCP 服务器。

Often, we have an MCP server that sits between the agent and its resources, providing defined tools that connect to those downstream services. An MCP client dispatches the agent's proposed tool calls to its MCP server.

03:47:03 ↗0114–0119
Demo agent directly called resources with API keys
视频截图 · PPT · 对照长期静态凭证的直接访问03:20:37 ↗

在演示中,值班分诊智能体使用长期有效的静态凭证(例如 API 密钥或数据库连接字符串)直接调用资源。所以我们要为值班智能体配置一个 MCP 服务器。它会提供工具,同时充当资源访问的中介。智能体运行时是一个运行智能体循环并执行调用的进程。运行时可以是命令行工具,例如 Claude Code,也可以是智能体 SDK;比如值班智能体这样的自定义应用就可以采用 SDK 实现。

Now, in the demo, the on-call triage agent called resources directly with long-lived static credentials like API keys or database connection strings. So what we're going to do is we're going to give the on-call agent an MCP server. This is going to provide tools and is also going to serve to broker access to resources. Now, an agent runtime is a process that runs the agent loop and executes calls. The runtime might be a CLI, like Claude Code, or an agent SDK, which might be implemented in a custom application like the on-call agent.

03:47:42 ↗0120–0127
The agentic execution path
视频截图 · PPT · 模型、运行时、工具与资源的调用循环03:21:37 ↗

我们沿着这条执行路径,跟踪一个提示的处理过程。用户将提示提交给运行时;运行时调用模型,并把提示发送给 LLM。然后模型提出工具调用,由 MCP 客户端将其发送给 MCP 服务器,服务器执行工具,再调用资源 API。API 将响应返回给 MCP 服务器。MCP 客户端把响应交给运行时,运行时再调用一次模型。这个循环会一直重复,直到模型满意并向用户返回响应。现在,经过身份验证的用户令牌会成为我们所说的主体令牌。

So let's follow a prompt through this execution path. The user submits the prompt to the runtime, which calls the model and sends the prompt to the LLM. The model then proposes tool calls, which are dispatched by the MCP client to its MCP server, which executes tools and then calls the resource API. The API returns the response to the MCP server. The MCP client delivers the response to the runtime, which calls the model again. And this loop repeats until the model is satisfied and returns a response to the user. Now, the authenticated user's token becomes what we call a subject token.

03:48:24 ↗0128–0131

它标明智能体代表谁行事,也就是它是为谁执行操作。令牌交换需要一个能够执行代码的 OAuth 客户端。它可以是位于 MCP 客户端与第三方 MCP 服务器之间的网关,也可以是你的自定义应用。

This identifies who the agent is acting on behalf of, who it acts for. Now, token exchange needs an OAuth client that can execute code. So this might be a gateway that sits between the MCP client and the third-party MCP server. Or it might be your custom app.

03:48:45 ↗0132–0139
Custom MCP server requests token exchanges
视频截图 · PPT · 自建 MCP 服务器也可交换下游凭证03:22:17 ↗

自定义 MCP 服务器也可以为下游资源交换令牌。值班智能体的 MCP 服务器应该提供一组定义明确的生产基础设施工具。提示和主体令牌会发送到运行时。智能体循环开始运行,模型提出工具调用。运行时会向一个特殊的授权服务器进行身份验证,这种服务器称为安全令牌服务(STS)。它使用应用客户端凭证或工作负载身份来完成身份验证,并且还会发送包含用户身份和访问权限的主体令牌。随后它创建令牌交换请求,申请访问 MCP 服务器的权限,而且只针对这一次工具调用。

Now, a custom MCP server can also exchange tokens for downstream resources. The on-call agent's MCP server should provide a defined set of production infrastructure tools. The prompt and the subject token are sent to the runtime. The agent loop runs, and the model proposes a tool call. runtime authenticates with a special authorization server called a security token service. It does this using its app client credentials or workload identity. also sends the subject token that contains the user's identity and access. It creates a token exchange request asking for permission to access the MCP server for that tool call and only that tool call.

03:49:30 ↗0140–0143

这样,我们就补上了演示中缺少的三项信息。我们知道请求访问的智能体身份,知道它所代表的用户身份,也知道用户授予智能体的访问级别。

So now we have three pieces of info that we're missing from the demo. We know the identity of the agent that's requesting access. We know the identity of the user it's acting on behalf of. And we know the level of access that the user granted to the agent.

03:49:48 ↗0144–0151
STS evaluates request against policy
视频截图 · PPT · 安全令牌服务按策略评估访问请求03:23:17 ↗

接下来需要决定是否签发所请求的令牌。我们可以依据治理策略进行判断,评估请求的访问权限对应什么资源,以及智能体和用户的身份。但策略只是权限上限。即使整体策略允许,智能体也可能做出你原本无意让它做的事。这就引出了意图型授权(Intent-Based Authorization,IBA)。IBA 会在智能体执行操作之前检查你的真实意图。目前它还不是最终定稿的标准。

Now we need to decide if the requested token should be issued, and we can do this with governance policy, which is evaluated against what access is requested from what resource, the identity of the agent, and the identity of the user. But policies are ceilings. Agents can do things you didn't intend, even when policy overall allows them. This brings us to something called intent-based authorization, or IBA. Now, IBA checks what you mean before the agent acts. Now, it's not a finalized standard.

03:50:25 ↗0152–0153

相关方仍在征集提案。下面介绍 Keycard 实施意图型授权的方法。

They're still accepting proposals. So this is Keycard's approach to implementing intent-based authorization.

03:50:33 ↗0154–0154
Gateway – Policy Enforcement Point (PEP)
视频截图 · PPT · 网关作为意图授权的策略执行点03:23:57 ↗

IBA 可以使用网关作为策略执行点。

Now, IBA can use a gateway as a policy enforcement point.

03:50:39 ↗0155–0158
Agent proposes a mission declaring intent
视频截图 · PPT · 把目标、允许行为和限制表达为任务使命03:24:17 ↗

你向智能体发送提示时,它会提出一个任务计划。这个任务计划包括目标、可能获准的操作,以及智能体可以执行操作的限制。例如,目标是分诊事件 2294,意味着读取该工单、总结或升级。但不能读取其他工单,也不能使用其他服务。

When you send the prompt to the agent, it proposes a mission. this mission includes a goal, maybe allowed actions, as well as limits to what the agent is allowed to do. So a goal of triage incident 2294 means read that ticket, summarize, or escalate. But don't read other tickets and don't use other services.

03:51:02 ↗0159–0164
Mission must be approved, denied, or revised
视频截图 · PPT · 对使命进行批准、拒绝或修改03:24:37 ↗

安全令牌服务会收到这个任务计划。在这个例子中,如果只是评估工单这类低风险活动,管理员策略可能会自动批准。另一方面,如果我们已经读取工单,随后要求处理用量激增,那么任务计划会新增一次扩展服务的权限,但不允许使用其他工具或 API。在这种情况下,系统会把任务计划交给用户审核和批准。批准后,安全令牌服务会为任务计划分配一个 ID,并将其发送给智能体。工具调用中会包含这个任务计划 ID,并由网关代理;网关利用该 ID 向安全令牌服务确认这次工具调用是否符合任务计划。

So the security token service receives this mission. In this case, a low-risk activity like just assessing a ticket might be auto-approved under admin policy. On the other hand, if we've already read the ticket and then we ask to remediate a usage spike, then the mission adds permission to scale the service once, but not use other tools or APIs. Now, in this case, the mission is presented for the user to review and approve. Once approved, the security token service gives the mission an ID, which is sent to the agent. The tool calls include this mission ID and are proxied by the gateway, which uses the ID to ask the security token service if this tool call fits the mission.

03:51:48 ↗0165–0170
STS issues task-scoped access token for MCP server
视频截图 · PPT · 为具体调用签发短期且限范围的凭证03:25:37 ↗

如果符合,网关就会请求交换令牌,以便针对这次特定的工具调用访问 MCP 服务器。STS 会评估策略,检查委托链,并查看请求的访问权限。如果一切符合要求,STS 就会签发用于访问 MCP 服务器的令牌,并保留用户主体信息,同时加入执行令牌交换的应用身份;在本例中,该应用就是值班智能体。这个令牌应该在几分钟内过期,而且绝不能存储;它是临时令牌。STS 会把令牌发送给网关,由网关调用 MCP 服务器。

If it does, then the gateway requests a token exchange for access to the MCP server for that specific tool call. The STS evaluates policy. It evaluates the delegation chain, and it looks at the requested access. Now, if everything looks good, it issues an access token for the MCP server, and it keeps the user subject, as well as adds the app that performed the exchange, which is, in this case, our on-call agent. Now, this token should expire within minutes, and we should never store it. It's ephemeral. The STS sends it to the gateway, which calls the MCP server.

03:52:28 ↗0171–0173

服务器随后验证令牌,并授权这次工具调用。有些工具还需要访问外部资源。这时,MCP 服务器会请求安全令牌服务,把它刚收到的令牌交换成用于下游资源的令牌。

The server then validates the token and authorizes the tool call. Now, some tools need external resources. So the MCP server then asks the security token service to exchange the token that it just received for a token for the downstream resource.

03:52:47 ↗0174–0179
STS issues token for downstream resource
视频截图 · PPT · 下游资源继续保留委托身份与范围03:26:17 ↗

STS 会根据策略评估这个请求。如果通过,就会签发资源令牌,并再次将权限范围限定到这次工具调用。令牌会保留用户主体信息,从而延长委托链,并让我们能够跟踪所有活动。STS 将令牌发送给网关,网关代理请求到 MCP 服务器,然后服务器调用资源。资源会验证令牌并授权访问。MCP 服务器绝不能存储令牌。调用完成后应立即丢弃。

Now, the STS evaluates the request against policy. if it passes, then it mints a resource token that's scoped again to that tool call. It keeps the user subject, which extends the delegation chain and allows us to be able to track all of the activity. The STS sends the token to the gateway, which proxies the request to the MCP server, which then calls the resource. The resource validates the token and authorizes access. Now, the MCP server should never store the token. It should discard it immediately after the call.

03:53:27 ↗0180–0185
Response flows back up and loop repeats
视频截图 · PPT · 返回结果后继续受控执行循环03:26:57 ↗

资源的响应会沿原路返回,智能体循环继续运行,直到模型向用户返回答案。现在我们来看同一个演示,不过这次会使用安全令牌服务,通过委托授权来管理智能体的访问控制。这个演示采用基于任务的策略治理,而非意图型授权。不过,如果你这个月晚些时候参加 AgentCon,我们会在那里展示 IBA 演示。现在我们还有一个 MCP 服务器,它会建立工具,并为访问资源提供中介。现在回到值班分诊智能体,这次它具备身份验证功能。

The resource response then flows back up and the agentic loop repeats until the model returns the answer to the user. So now we're going to look at the same demo, except we are going to use a security token service to manage agent access control with delegated authorization. The demo uses task-based policy governance, not intent-based authorization. But if you're going to AgentCon later this month, we'll have IBA demos there. Now we also now have an MCP server that establishes tools and it provides brokering access to the resources. So now we're back to our on-call triage agent again, only this time we have authentication.

03:54:16 ↗0186–0192

我现在登录值班分诊智能体应用。我会使用 Google 登录。然后会出现另一个登录界面。现在我要登录 Incidex Pager 平台。系统会提示我授予值班智能体访问我的 Incidex 账户的权限。我会允许它代表我升级事件、发布备注和摘要,以及读取队列。现在系统提示我登录云托管平台。

Now I'm going to go ahead and sign into the On-Call Agent Triage app. I'm going to log in with Google to do so. And then you get another login screen. Now this is where I'm going to sign into the Incidex Pager platform. So I get a prompt to grant the on-call agent access to my Incidex account. I'm going to let it escalate incidents on my behalf, post notes and summaries, and read the queue. Now I'm being prompted to log into the cloud hosting platform.

03:55:05 ↗0193–0200

我会照做。现在又出现一个授权界面,我可以在这里授权智能体代表我访问CompuHost 的部分功能。最后,我回到了值班仪表板。工单队列还是原来那个,但现在审计日志不一样了。智能体可能还会尝试像之前那样操作,但现在每个请求都会先经过 STS 和策略评估,然后才会签发令牌并授权智能体执行操作。

So I am going to do that. And I get another consent screen now, which allows me to authorize the agent to access some capabilities of CompuHost on my behalf. Now, finally, I am back on the on-call dashboard. Now we have the same queue of tickets, only now the audit log looks different. The agent is probably going to try to behave the same way it did before, only now every request is going to go through the STS and policy evaluation before a token is granted and the agent will be authorized to act.

03:55:52 ↗0201–0208

所以工单队列还是原来那个,但现在审计日志不一样了。智能体可能仍会尝试像之前那样操作,但现在每个请求都会先经过 STS 和策略评估,然后才会签发令牌并授权智能体执行操作。第一张工单仍然是计费异常。智能体再次尝试读取工单,我们能看到它尝试做和之前相同的事。它尝试查询客户数据仓库,但策略不允许为此签发凭证,因为客户 PII 不应出现在智能体的上下文或事件工单中。

So we have the same queue of tickets, only now the audit log looks different. And the agent is probably going to behave the same way that it did before, only now every request is going to go through the STS and policy evaluation before a token will be granted and the agent can be authorized to act. So the first ticket is that billing anomaly. Again, the agent tries to read the ticket, and we can see that it is trying to do the same thing that it did before. It tries to query the customer warehouse, but policy doesn't allow a credential to be issued for this. because customer PII doesn't belong in an agent's context or in an incident ticket.

03:56:40 ↗0209–0213
On-call triage agent: customer records blocked
视频截图 · 演示 · 策略阻止客户明细读取后仍能继续工作03:30:17 ↗

因此智能体在没有客户数据的情况下继续处理,并将工单升级给早班团队。现在来看网站安全证书即将过期的工单。这是智能体获准执行的操作。所以它向 STS 请求凭证时,访问获批,它就可以调用云托管 API 来解决这张工单。

So the agent proceeds without the customer data and it escalated it to the morning team. Now we have the website security certificate expiring. Now, this is something that the agent has permission to do. So when it requests credentials to do this from the STS, access is granted, and it can call the Cloud Hosting API and resolve this ticket.

03:57:24 ↗0214–0214

现在你可以看到它发起的所有调用,以及是谁发起的。

Now, you can see all of the calls that it's making and who is making them.

03:57:28 ↗0215–0220
On-call triage agent: certificate renewal allowed
视频截图 · 演示 · 允许范围内的续期操作取得临时授权03:30:57 ↗

这里是值班分诊智能体,它请求续期证书。它申请权限,调用 Infra MCP 服务器中的相应工具。于是它获得了相应令牌。之后,MCP 服务器会请求访问云托管服务,以便通过 API 续期证书。接着看计费数据库,智能体会通过事件API 读取工单。

So we have the on-call triage agent that is requesting to renew the certificate. It's asking for permission to call the appropriate tool from the Infra MCP server. So it gets a token for that. After that, the MCP server is going to request access to that cloud hosting service in order to renew the certificate using the API. So if we move on to the billing database, it's going to read the ticket through the incident API.

03:58:10 ↗0221–0224

它会得出和之前相同的结论。智能体知道需要删除并恢复数据库,但这次策略禁止智能体删除生产数据库。必须由人手动完成。

It's going to come to the same conclusion that it did before. The agent knows that this is a drop and restore procedure, but this time policy forbids an agent to drop a production database. A human's got to do this manually.

03:58:25 ↗0225–0228
On-call triage agent: database deletion denied
视频截图 · 演示 · 审计日志记录数据库删除被策略拒绝03:31:57 ↗

我们可以在审计日志中看到,STS 拒绝了用于访问数据库删除操作的令牌交换请求。接下来是订单卡住的工单。主服务器冻结无响应。智能体会读取工单。

And we can see this in the audit log where the STS refused to grant the token exchange for access to the database delete. So now we have our orders are stuck. The main server is frozen. The agent is going to go ahead and read the ticket.

03:58:51 ↗0229–0235
On-call triage agent: restart approval
视频截图 · 演示 · 人工批准仍需满足实际角色策略03:32:17 ↗

它想要重启主服务器,这会导致生产环境短暂下线。它把情况告知我,这次确实会征求我的批准。我会点击批准。不过,这项操作仍然被策略拦截了,原因是我的用户角色没有执行这项操作所需的权限。所以智能体做不到,我也做不到,而智能体是代表我行事的。再来看三分之一用户无法访问网站的情况。智能体再次希望增加服务器,并会请求许可。

it. It wants to restart the main server. This takes production brief fuel offline. It informs me about this, and this time it's actually asking for my approval to do this. So I'm going to click approve. However, this was also blocked by policy, and the reason for this is because my user does not have the role necessary to take this action. So the agent can't do it, but I can't do it either, and the agent is acting on my behalf. If we move to the site failing for one in three users. Again, the agent wants to add more servers, and it's going to ask for permission.

03:59:37 ↗0236–0238

它会说明执行此操作意味着什么。我会批准这项操作。我的角色确实有权执行这项操作。

It's going to say what we're committing to when we do this. I'm going to go ahead and approve this. And this is something that my role does have the authority to do.

03:59:50 ↗0239–0239
On-call triage agent: scaling approved
视频截图 · 演示 · 获得批准的扩容才被执行03:33:17 ↗

因此扩容成功,工单也得到解决。

So the scale goes through and this ticket is resolved.

03:59:56 ↗0240–0243
Control agent access
视频截图 · PPT · 身份链、任务级凭证与策略支持的人工确认03:33:37 ↗

由此可见,智能体的访问权限问题得到了解决。我们可以沿整条链路追踪用户和智能体的身份。智能体对 MCP 服务器及下游资源拥有按任务限定、短暂有效的访问权限。我们也保留了人在回路中的审核,并且访问控制确实由策略提供保障。现在,安全令牌服务和策略会在任务级别控制访问,同时保留所有关键能力。

So we can see that the agent access problems are solved. We know the user and the agent identity all the way down the chain. The agent has task-scoped ephemeral access to the MCP server and downstream resources. And we have human in the loop with access control that's actually backed by policy. Now, access is controlled at the task level by the security token service and policy, and we retain all key capabilities.

04:00:29 ↗0244–0247
Token exchange is versatile & future-friendly
视频截图 · PPT · 开放标准与现有身份、网关和运行时协作03:34:17 ↗

令牌交换是一项开放标准,经过充分研究且公开,任何人都可以实现。它可与现有策略引擎、符合标准的身份提供商,以及网关、沙箱、OAuth、现成和自定义智能体、命令行工具、MCP 服务器、软件工厂、智能体间通信、跨应用访问等互操作,也能适应下周出现的新事物。希望你们考虑采用它,让智能体既有用又安全,并能适应未来的发展。我叫 Kim Maida,是 Keycard 的创始 GTM 工程师和开发者关系负责人。非常感谢大家今天抽出时间,谢谢。

Now, token exchange is an open standard. It's well-researched and it's public, so anyone can implement it, and it interoperates with existing policy engines and standards-compliant identity providers, as well as things like gateways, sandboxes, OAuth, off-the-shelf and custom agents, CLIs, MCP servers, software factories, agent-to-agent, cross-app access, plus whatever comes out next week. so I hope you'll consider it to make your agents useful, safe, and future-friendly. My name is Kim Maida. I'm the founding GTM engineer and head of DevRel at Keycard. And I really appreciate your time today, so thank you very much.