Your Agent Is a Lethal Trifecta (And What to Do About It) — Kim Maida, Keycard

Read the talk

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

Kim Maida follows an overprivileged on-call agent from leaked customer data to disruptive infrastructure changes, then repeats the work with delegated identity, task-scoped token exchange and policy-backed approval.

From a talk by Kim Maida

At a glance

Ideas worth remembering

  • Private data, untrusted content and external tools make agents useful while creating opportunities for harmful data movement and actions. Broad standing credentials turn those opportunities into executable authority.

  • Delegated token exchange lets a security token service evaluate the user, agent, requested resource and action before issuing short-lived access, with another exchange when an MCP tool needs downstream credentials.

  • Keycard’s proposed intent-based authorization adds a mission with a goal, allowed actions and limits. The second demo instead uses task-based policy governance.

  • Human approval remains subject to authorization: the restart stays blocked because the user lacks the role, while approved scaling proceeds because the user has authority.

An on-call agent with enough access to cause an incident

A billing anomaly arrives overnight: a batch of customers has been overcharged. In Kim Maida’s staged on-call triage demo, the agent reads the incident through an API key, queries a customer warehouse using a Snowflake key, and escalates the problem to the morning team. Its report includes rows pulled directly from the warehouse, carrying personally identifiable information into the incident workflow. The agent has completed a plausible triage task while moving private data somewhere it need not go.

The same queue includes work that fits the agent well. A failed backup power supply is a physical problem, so the agent escalates it without calling another service. An expiring website TLS certificate is actionable through the cloud hosting API: the agent calls the renewal endpoint with its API key, renews the certificate, and posts a report. Both cases show why an organization might want this system running overnight.

Then payments fail because the billing database is broken. The documented recovery procedure says to drop and restore the database. A connection string containing an administrator password gives the agent the power to take the destructive step. It then asks the morning team to check that snapshot recovery worked. Successful restoration is not established here: the agent cannot verify that part itself, yet it has already exercised the privilege that puts the data at risk.

The remaining tickets turn infrastructure permissions into operational consequences. A frozen main server prompts an API call to restart it, bringing production offline. A site failing for one in three visitors prompts a scale-up from four pods to 40, incurring $420 per hour. The agent “kindly leaves a note” for the morning team after committing the expense. What does that jump in capacity and cost look like in the demo’s record? The useful comparison is between the requested recovery and the authority already available to execute it: no new credential decision intervenes before the change.

0:010:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:01 · section reference included

Three useful capabilities create the exposure

The demo brings together the capabilities that make agents useful. They can read information a user owns, research material outside that private context, and act through tools. Maida uses Simon Willison’s term “lethal trifecta” for the dangerous combination:

  • Private data access. The triage agent can query the customer warehouse and interact with the billing database.
  • Untrusted content. Tickets, reports from other agents and externally documented procedures supply material the agent must interpret.
  • External communication. Third-party APIs and SaaS services let the agent transmit information and make changes outside its own process.

An agent trying to finish a task can use whatever powers its credentials provide. That makes overprivilege consequential even with supervision. Requiring approval for everything transfers decisions to a potentially consent-fatigued user; it also fails to address agents that run autonomously. A human approval button needs an access-control system behind it.

Removing private data, outside information or tools would reduce the agent’s usefulness. Maida’s proposed direction keeps those capabilities and narrows the access available when the agent acts. The opening demo establishes the consequences of broad credentials; it does not demonstrate a particular attacker’s prompt-injection payload. The problem addressed next is the authority available to turn a decision into an action.

4:164:46
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:16 · section reference included

A grant, a route and a process leave different gaps

OAuth grants, MCP gateways and sandboxes each control something useful. The question is whether their controls produce a runtime credential limited to the current task. Maida distinguishes their usual points of enforcement:

  • OAuth binds access to a grant. A user consents to permissions before a particular task exists. A broad grant leaves standing read and write access available even when the current request only calls for reading. A narrow grant can leave the agent unable to perform other legitimate work.
  • An MCP gateway binds enforcement to a route. It can provide observability, rate limits and per-request policy decisions. In the setup described, however, the gateway still holds credentials whose authority outlives the task.
  • A sandbox binds execution to a process. It limits what happens inside that process, but useful work often reaches external services. Process containment does not determine which external operations those services should authorize.

Combining those controls does not, by itself, issue a credential down-scoped to one task. The first demo also lacks identity attribution: an API key authorizes a call without revealing which user delegated it or which agent used it. The desired change therefore has two parts—carry identity through the execution path, and make a fresh authorization decision before granting the access needed for an operation.

6:587:09
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:58 · section reference included

Carry the user’s identity into each tool request

Token exchange supplies a foundation for that change. Maida introduces it as an OAuth 2 extension standardized in 2020. First, an authorization server verifies the user’s identity. The user consents to delegating a subset of their permissions, called scopes, and the server issues tokens identifying that user and their access. This is the first narrowing: the agent receives delegated access rather than the user’s entire set of permissions.

Next, the triage application gains an MCP server that defines production infrastructure tools and brokers access to downstream resources. The runtime runs the agent loop: it sends the user’s prompt to the model, receives proposed tool calls, and dispatches them through an MCP client. The MCP server executes the tools and calls resource APIs. Responses travel back to the runtime, which calls the model again until it can answer the user. The model proposes operations; the surrounding software executes them.

The authenticated user’s token becomes the subject token, identifying whom the agent acts for. An OAuth client capable of running code performs the exchange; that could be the custom application, a gateway between the MCP client and server, or a custom MCP server obtaining access to a downstream resource. This places credential handling in executable infrastructure around the agent loop.

For a proposed tool call, the runtime authenticates to a security token service, or STS, using its application credentials or workload identity. It also supplies the user’s subject token and requests access to the MCP server for that call. The STS can now evaluate the requested action and resource alongside the agent’s identity, the user’s identity and the access the user delegated. A broad credential no longer has to serve as the entire authorization decision.

There is still a distinction between an action that policy permits and an action that the current request calls for. As Maida puts it, “policies are ceilings.” An agent may stay within its overall permissions while doing something the user never intended. That motivates a further restriction around the task itself.

9:169:27
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:16 · section reference included

Constrain the mission, then exchange credentials at each hop

Keycard’s approach to intent-based authorization, or IBA, gives the current request an explicit mission: a goal, allowed actions and limits. Maida identifies this as a proposal rather than a finalized standard. For “triage incident 2294,” the mission might permit reading that ticket, summarizing it or escalating it, while excluding other tickets and services. An administrator’s policy could automatically approve that low-risk assessment.

Remediation changes the mission. After reading a usage-spike ticket, the agent might request permission to scale the service once, without gaining access to other tools or APIs. That mission goes to the user for review. Once approved, the STS assigns a mission ID. Tool calls carry the ID through a gateway, which asks the STS whether each call fits the mission. Only a fitting call proceeds to a token-exchange request for MCP access.

The STS then evaluates policy, the delegation chain and the requested access. If it approves, it issues an MCP access token that preserves the user as subject and records the application performing the exchange. The token should expire within minutes and should not be stored for later reuse. The gateway uses it to call the MCP server, which validates it before authorizing the tool.

An MCP tool may need another service to finish its work. In that case, the MCP server requests a second exchange, using its received token to ask for a downstream resource token. The STS evaluates policy again and, if permitted, issues a token scoped to that tool call while preserving the user subject through the delegation chain. The resource validates the token; the MCP server discards it immediately after the call. The response returns through the agent loop.

Where do the two credential decisions occur? The diagram separates the mission check from the exchanges for MCP and resource access. The second exchange matters because permission to invoke a tool does not eliminate the downstream service’s own authorization step. Both tokens retain the user’s identity, making the chain attributable across services.

Two exchanges preserve identity across two access decisions

Agent through gatewayrequester — Carries the approved mission ID with the proposed tool call.
STS: mission checkauthorization — Checks whether the call fits the mission before token exchange.
STS: MCP token decisionauthorization — Evaluates policy, delegation and access; preserves user subject and records the app.
MCP serverexecution — Validates the MCP token and requests downstream access when the tool needs it.
STS: resource token decisionauthorization — Rechecks policy and issues a tool-scoped resource token with the user subject.
Downstream resourceexecution — Validates its token and authorizes access; the MCP server discards the token after use.
Arrows show authorization requests, issued credentials and authorized calls. Resource responses return through the agent loop separately.
Read the diagram as text
  • Agent through gateway. requester — Carries the approved mission ID with the proposed tool call.
  • STS: mission check. authorization — Checks whether the call fits the mission before token exchange.
  • STS: MCP token decision. authorization — Evaluates policy, delegation and access; preserves user subject and records the app.
  • MCP server. execution — Validates the MCP token and requests downstream access when the tool needs it.
  • STS: resource token decision. authorization — Rechecks policy and issues a tool-scoped resource token with the user subject.
  • Downstream resource. execution — Validates its token and authorizes access; the MCP server discards the token after use.
  • Agent through gateway → STS: mission check: Ask whether this call fits the mission.
  • STS: mission check → STS: MCP token decision: If it fits, gateway requests exchange.
  • STS: MCP token decision → MCP server: If approved, gateway calls MCP with issued token.
  • MCP server → STS: resource token decision: If needed, exchange received token for resource access.
  • STS: resource token decision → Downstream resource: If approved, issued token accompanies proxied resource call.
14:1114:30
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:11 · section reference included

The same tickets, with credentials issued only when policy permits

The second demo implements delegated authorization with task-based policy governance; it does not demonstrate the proposed IBA mission system. The triage app now uses authentication and an MCP server to broker resource access. Maida signs into the app with Google, then signs into the incident platform and consents to queue reading, escalation, notes and summaries. A separate cloud-hosting login and consent step delegates some hosting capabilities.

The queue remains the same, and the agent can propose the same actions. What changes is the path to execution: requests pass through STS policy evaluation before credentials are granted. On the billing anomaly, the agent again tries to query the customer warehouse. This policy forbids issuing a credential because customer PII should not enter the agent’s context or an incident ticket. The agent continues without the data and escalates the incident to the morning team.

Certificate renewal remains useful and permitted. The STS grants the requested access, allowing the agent to call the cloud hosting API and resolve the ticket. Restricting credentials has preserved an appropriate automated repair while blocking the earlier data movement.

How does the audit log distinguish tool access from resource access? The renewal example follows both requests: the on-call agent first obtains permission to invoke the appropriate production infrastructure MCP tool; the MCP server then requests access to the hosting service’s renewal API. Those separate entries make the delegation path visible instead of collapsing the operation into use of a shared API key.

The audit log records two distinct grants: the on-call agent can invoke Prod Infra MCP for certificate renewal, and Prod Infra MCP receives `certs:renew` access to the Cloud Hosting API.Open full source frame
The audit log records two distinct grants: the on-call agent can invoke Prod Infra MCP for certificate renewal, and Prod Infra MCP receives `certs:renew` access to the Cloud Hosting API.
ACTION                                                        ACTOR                  ENTITY           TIME
STS credentials:issue ALLOW                                    On-Call Triage Agent   Prod Infra MCP   22:03:45
{ grant: token-exchange; scope: certificates:renew; }
STS credentials:issue ALLOW                                    Prod Infra MCP         Cloud Hosting    22:03:47
{ grant: token-exchange; scope: certs:renew; resource: https://compuhost.cloud/api/v2; }

The billing-database ticket reaches the same proposed drop-and-restore procedure as before. This time, policy forbids an agent from dropping a production database and reserves that operation for a human to perform manually. The STS refuses the token exchange for database deletion. The agent’s conclusion has not changed; its ability to execute that conclusion has.

17:3517:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

17:35 · section reference included

Approval cannot grant authority the user does not have

The frozen-server ticket tests the difference between consent and authority. The agent proposes a restart, explains that production will briefly go offline, and asks for approval. Maida clicks Approve. Policy still blocks the operation because her user lacks the required role. What happens after that click is the important result: the agent acts on her behalf, so her consent cannot authorize a restart she is not allowed to perform.

Approval is recorded, but policy still blocks the restart; the agent escalates for a human SRE with elevated access.Open full source frame
Approval is recorded, but policy still blocks the restart; the agent escalates for a human SRE with elevated access.

The scaling ticket takes the other branch. With the site failing for one in three users, the agent asks permission to add capacity and explains the commitment. Maida approves, and her role does authorize scaling, so the action proceeds and the ticket is resolved. Approval now participates in an authorization decision backed by policy and user identity.

The resulting system knows both the user and agent throughout the chain, issues task-scoped ephemeral access to MCP and downstream resources, and checks human approval against actual permissions. These are access-control results. They do not establish that every permitted remediation is technically correct or cost-optimal; authorization determines whether an action may run, while the agent still has to choose a good action.

Maida closes by positioning token exchange as an open standard that can work with existing policy engines, standards-compliant identity providers, gateways, sandboxes, OAuth, custom agents, CLIs and MCP servers. The practical direction is to make those components carry delegated identity and enforce access at the task level. A useful agent can keep reading, researching and acting without carrying a standing credential powerful enough to do everything it might think of.

22:3822:49
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

22:38 · section reference included

Read the complete timestamped transcript
  1. 0:01

    Today I'm gonna talk to you about how your agent is a lethal trifecta and what to do about it. Now we're gonna 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.

  2. 0:28

    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. 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

  3. 0:58

    calls the Incidentix 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, right? These are rows directly pulled from the customer data warehouse, and it is sending personally identifiable

  4. 1:28

    information to the team that is going to be on staff in the morning.

  5. 1:37

    So 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.

  6. 1:59

    This one is the TLS certificate is expiring soon for the website. 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. It resolves this by renewing the certificate, and it leaves a report for the morning crew by calling the pager, uh, incident API as well.

  7. 2:32

    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. 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

  8. 3:02

    morning team is going to verify that this did in fact work and the information was restored.

  9. 3:12

    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. Now the next one is orders are stuck and the main server is frozen.

  10. 3:29

    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.

  11. 3:48

    Finally, site is failing for one in three visitors. Agent reads the ticket. It determines that it should call the cloud hosting API and scale the service from four pods to 40. It then incurs a charge of $420 f- per hour for doing this, and then it kindly leaves a note for the morning team informing them that this has happened.

  12. 4:16

    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

  13. 4:46

    servers or APIs, maybe SaaS platforms. And useful agents might do these things with a human in the loop, or they might be doing it autonomously in the background. But the thing that makes... 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

  14. 5:16

    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. Now together, these capabilities throw the doors wide open for attackers.

  15. 5:39

    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. But here's the thing. These 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.

  16. 6:03

    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.

  17. 6:21

    So what should we do about the lethal trifecta? How do we address it without compromising the agent's usefulness?

  18. 6:28

    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? 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

  19. 6:58

    access, among others, are things like using OAuth, maybe using a vendor MCP gateway, or containing execution in sandboxes.

  20. 7:09

    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

  21. 7:38

    enthusiastic agent can both read and write in the same run, even if you only want it to read on this specific task.

  22. 7:48

    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. Now, 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. 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

  23. 8:18

    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.

  24. 8:33

    Now, even if you combined all three of the solutions, the agent still doesn't receive a runtime credential that's down-scoped to only one task.

  25. 8:43

    So let's recap the problems, especially the ones that we saw in the demo. 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.

  26. 9:16

    So to solve these problems, we can start by using something called token exchange. Now, this is an existing standard that was published in twen-2020, and it extends OAuth 2.

  27. 9:27

    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, et cetera, provide authorization servers. So if we want an identity chain in our agent execution path, then the user has got to log in first.

  28. 9:48

    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.

  29. 10:06

    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.

  30. 10:20

    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.

  31. 10:41

    An agent is a control loop that calls an LLM. Often, we have an MCP server that sits between the agent and its resources, providing defined tools that connect to those downstream services.

  32. 10:54

    An MCP client dispatches the agent's proposed tool calls to its MCP server. Now in the demo, the on-call triage agent called resources directly with long-lived static credentials like API keys or database connection strings.

  33. 11:10

    So what we're gonna do is we're going to give the on-call agent an MCP server. This is gonna provide tools and is also going to serve to broker access to resources.

  34. 11:23

    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.

  35. 11:38

    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.

  36. 12:00

    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.

  37. 12:17

    Now, the authenticated user's token becomes what we call a subject token. This identifies who the u- agent is acting on behalf of, who it acts for.

  38. 12:27

    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.

  39. 12:42

    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.

  40. 12:54

    The prompt and the subject token are sent to the runtime. The agent loop runs, and the model proposes a tool call.

  41. 13:04

    The runtime authenticates with a special authorization server called a security token service. It does this using its app client credentials or workload identity. It 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. So now we have three pieces of info that were missing from the demo.

  42. 13:33

    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. 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.

  43. 14:02

    But policies are ceilings. Agents can do things you didn't intend, even when policy overall allows them.

  44. 14:11

    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. They're still accepting proposals, so this is Keycard's approach to implementing intent-based authorization.

  45. 14:30

    Now, IBA can use a gateway as a policy enforcement point. When you send the prompt to the agent, it proposes a mission. Now, 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.

  46. 14:59

    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.

  47. 15:10

    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.

  48. 15:29

    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. If it does, then the gateway requests a token exchange for access to the MCP server for that specific tool call.

  49. 15:54

    The STS evaluates policy,

  50. 15:58

    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. The server then validates the token and authorizes the tool

  51. 16:28

    call.

  52. 16:31

    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. Now, the STS evaluates the request against policy, and 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

  53. 17:01

    activity.

  54. 17:05

    The STS sends the token to the gateway, which proxies the request to the MCP server, which then calls the resource.

  55. 17:14

    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.

  56. 17:24

    The resource response then flows back up, and the agentic loop repeats until the model returns the answer to the user.

  57. 17:35

    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 Agent Con later this month, we'll have IBA demos there.

  58. 17:58

    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. Now I'm going to go ahead and sign into the on-call agent triage app.

  59. 18:22

    I'm gonna log in with Google to do so.

  60. 18:30

    And then you get another login screen. Now, this is where I'm going to sign into the Incident Pager platform.

  61. 18:41

    So I get a prompt to grant the on-call agent access to my Incident account. I'm going to let it escalate incidents on my behalf, post notes and summaries, and read the queue.

  62. 18:57

    Now I'm being prompted to log into the cloud hosting platform, so I am going to do that.

  63. 19:11

    And I get another consent screen now, which allows me to authorize the agent to access some capabilities of CompuHost on my behalf.

  64. 19:24

    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.

  65. 19:49

    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.

  66. 20:14

    Again, the agent tries to read the... So the agent is reading 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. So the agent proceeds without the customer data, and it escalated it to the morning team.

  67. 20:56

    Now we have the website security certificate expiring.

  68. 21:05

    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.

  69. 21:21

    Now you can see all of the calls that it's making and who is making them. 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 prod infra MCP server. So it gets a s- 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

  70. 21:51

    the API.

  71. 21:57

    So if we move on to the billing database,

  72. 22:02

    it's going to read the ticket through the incident API. 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.

  73. 22:22

    And we can see this in the audit log, where the STS refused to grant the token exchange for access to the database delete.

  74. 22:38

    So now we have our orders are stuck. The main server is frozen. The agent's going to go ahead and read the ticket.

  75. 22:49

    It wants to restart the main server. This takes production briefly offline. It informs me about this, and this time it's actually asking for my approval to do this. So I'm gonna 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. Right? So the agent can't do it, but I can't do it either, and the agent is acting on my behalf.

  76. 23:22

    So if we move to the site failing for one in three users.

  77. 23:29

    Again, the agent wants to add more servers, and it's gonna ask for permission. 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, so the scale goes through and this ticket is resolved.

  78. 23:53

    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.

  79. 24:14

    Now, access is controlled at the task level by the security token service and policy, and we retain all key capabilities.

  80. 24:26

    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.

  81. 24:57

    Now, my name is Kim Maida. I'm the founding GTM engineer and head of DevRel at Keycard.

  82. 25:05

    And I really appreciate your time today, so thank you very much.