← All AI Engineer talks

AI Engineer World's Fair 2025

How to Secure Agents using OAuth

Read the talk

How to Secure Agents Using OAuth

Connecting agents through static API keys expands their reach and their risk. OAuth separates access decisions from APIs, but securing agents also requires identity, delegation and control over downstream actions.

From a talk by Jared Hanson

Before you start: Familiarity with HTTP APIs, API keys and the basic purpose of an MCP server is helpful; OAuth concepts are introduced as they appear.

The cost of connecting more systems

What happens when the API key pasted into one MCP server’s configuration becomes the access pattern for hundreds or thousands of agents? Jared Hanson, Keycard co-founder and Passport.js creator, approaches that question after building identity infrastructure at Auth0 and working at Okta. More connected agents can automate more work, but their usefulness creates an access-control problem: grant broad access and accept the exposure, or restrict access and lose capabilities.

The configuration pattern makes the problem concrete. Developers obtain long-lived, broadly scoped API keys, paste them into configuration files or environment variables, and let agents use them. Repeating that setup multiplies the credentials and permissions that need protection. The alternative is dynamic access: use OAuth to obtain authorization through a controlled process instead of treating possession of a static secret as the enduring basis for access.

Slide titled “Let’s connect more systems!” with two access tradeoffs beside an MCP configuration containing a token placeholder.
Connecting more systems creates a choice between broad access and limited agent capabilities.
0:250:41
Suggest correction

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

0:25 · section reference included

Follow a calendar connection

OAuth has many extensions, but its basic division of responsibilities is straightforward. An application, called the client, requests access to an API, called the resource server. An authorization server mediates that request. Connecting Calendly to Google Calendar is a familiar example: Calendly wants permission to access a particular person’s calendar.

The browser-based authorization code flow proceeds through these steps:

  1. Calendly directs the user to Google with a request for calendar access.
  2. Google establishes that the user is logged in and asks for consent.
  3. If the user approves, the browser returns an authorization code to Calendly, which exchanges it for an access token.
  4. Calendly presents that access token to the calendar API.

An optional refresh token lets Calendly obtain replacement access tokens without making the user repeat the entire consent process. This permits short-lived access tokens while maintaining the authorized connection; the actual lifetime is a server policy choice.

1:512:09
Suggest correction

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

1:51 · section reference included

Why sign-in appears in an authorization protocol

Sign in with Google or Facebook can make OAuth’s purpose confusing. If OAuth delegates access, why does it also appear to log people in? Hanson starts with the API being accessed: replace the calendar API with a UserInfo endpoint that returns the user’s identifier, name and email address. Access to that information gives the application a basis for identifying the user. OpenID Connect formalizes the identity layer over OAuth, including authentication, identity claims and the UserInfo response.

OpenID Connect adds terminology: the authorization server acts as an identity provider, and the application is a relying party. It also introduces the ID token, a signed JSON Web Token containing claims about the authentication and the user. The application can validate it without making a separate UserInfo request. That makes it useful beyond simply retrieving profile information: it provides an authentication statement intended for the client and also participates in session-related behavior.

In a real application, authentication and authorization commonly run together. The application learns who signed in and obtains access to the user’s calendar through the same overall interaction. The two results still serve different purposes: the ID token informs the client about authentication, while the access token authorizes requests to an API.

3:193:30
Suggest correction

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

3:19 · section reference included

Separate token issuance from token verification

The architectural benefit comes from separating three software roles. OAuth formally also includes the resource owner, usually the person granting access, but Hanson’s diagram concentrates on the cooperating systems:

Software roleResponsibility
ClientObtain, hold and present tokens
Authorization serverMediate access and issue tokens
Resource serverVerify tokens and enforce access to resources

The authorization server issues a token to the client; the client carries it to the resource server. That indirection is what allows the API to rely on a separate system for the authorization process.

Password checks, step-up authentication and consent screens no longer need to be implemented inside each API. The authorization server handles those interactions, and the token communicates the resulting authorization in a form the API can validate. Centralizing that work also gives a collection of applications and APIs a common place to apply policy. An API can enforce access without becoming a login and token-issuance service.

5:105:19
Suggest correction

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

5:10 · section reference included

How MCP lost—and recovered—the third software role

Applying this architecture to agents should be a small conceptual step. A chatbot or agent such as Claude becomes the application connecting through an MCP client; the MCP server provides the resources or tools; an authorization server mediates access. But MCP’s authorization design did not begin there. Hanson describes a protocol only about seven months old at the time of the talk. Its first version focused on local servers and included no authorization mechanism, even though remote servers were already contemplated.

The March 26, 2025 authorization specification was the first OAuth attempt Hanson critiques. Clients implemented the client side of OAuth, but MCP servers were also expected to handle authentication and token issuance. The resource-server and authorization-server responsibilities had effectively collapsed into one component. His warning against learning OAuth from that section concerns this historical revision.

Christian Posta’s The MCP Authorization Spec Is... a Mess for Enterprise appeared five days after the March specification release. It challenged the treatment of the MCP server as both resource server and authorization server. Aaron Parecki followed with Let’s fix OAuth in MCP, pointing to the diagram that made the MCP server itself responsible for authorization. Hanson describes both posts as widely circulated.

The proposed repair was to model the MCP server as an OAuth resource server. Hanson recalls roughly 400 comments on one correction PR, illustrating how much discussion the separation generated. He also recalls recommending that same resource-server model in a January specification review. The lesson is architectural: preserving OAuth’s separate responsibilities keeps every tool provider from inheriting an identity platform’s job.

“First Attempt Aftermath” slide with a GitHub proposal screenshot, a quotation proposing the role change, and a timeline highlighting “The First Attempt.”
A proposed correction shifts the MCP server from OAuth provider to resource provider.

In the revised draft shown in the talk, the authorization server is separate again. The MCP server validates tokens arriving over HTTP and delegates the authentication and token-issuance machinery to OAuth infrastructure. The subsequent June 18, 2025 specification formalized this separation, including requirements to validate that tokens were issued for the receiving server and to reject token passthrough. Verification still leaves the resource server responsible for enforcing the permissions on each operation. This repairs the client-to-MCP-server connection; it does not yet secure every interaction an agent can initiate.

6:186:34
Suggest correction

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

6:18 · section reference included

Whose authority does an agent use?

User delegation is only one reason an agent needs access. An agent may also call another agent or an MCP server on its own behalf. OAuth distinguishes these cases through different flows:

SituationOAuth flowBasis of access
Agent acts for a userAuthorization codeUser delegation
Agent acts for itselfClient credentialsClient’s own authorization

The client credentials grant is for confidential clients that can authenticate appropriately to the authorization server. Running autonomously does not, by itself, make a desktop or mobile agent a confidential client.

That distinction leads to a second question: how does an agent obtain a client identity? The familiar developer workflow is manual—visit a portal, create an application, obtain a client ID and secret, and configure them in the application. MCP aims to connect tools and agents that may have no prior knowledge of one another, so requiring that setup for every pairing introduces substantial friction.

Dynamic Client Registration moves registration to runtime. A client submits its metadata and receives a client identifier and, where applicable, credentials before continuing its OAuth flow. Hanson describes the specification as about ten years old and judges its adoption to have been limited. His central objection is about trust: if registration accepts an uncredentialed assertion of identity, issuing a new credential does not establish who the agent really is.

Registration and verified identity are different properties. Hanson doubts the viability of anonymous registration as the foundation for trusted agents. That criticism applies to open registration; RFC 7591 also allows protected registration, initial access tokens and software statements. The choice is therefore not simply whether to automate registration, but what evidence the authorization server requires before trusting the resulting client.

10:3910:48
Suggest correction

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

10:39 · section reference included

Public clients and authenticated agents need different identities

For public clients whose identity does not need to be authenticated, Hanson points to Pushed Client Registration. The emerging proposal uses a shared, well-known client identifier and can carry client metadata in the request. It avoids creating and retaining a durable registration record for every client. The April 2025 proposal is an individual Internet-Draft, and its pushed authorization request still involves an exchange and transaction state; the simplification is eliminating persistent per-client registration.

For agents whose identities must be authenticated, Hanson proposes using URLs and public-key infrastructure. His example is an agent identified by agent.com: reuse an identifier people already associate with the application, then connect it to cryptographic keys. The agent signs a JWT assertion or an HTTP message; the recipient verifies the signature with the corresponding public key from a key set. The identity is then backed by proof of possession of a key rather than merely a name supplied during registration.

12:4913:04
Suggest correction

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

12:49 · section reference included

Access to data is also a question about where it goes

An authorized agent can retrieve data and immediately send it to an LLM. Authorizing the retrieval does not answer the question of which model or software environment receives that data. In a controlled deployment, treating the LLM as another API gives the system a place to apply access policy. That approach becomes less complete when agents run on desktops or mobile devices whose software environment the service operator does not control.

Hanson points toward IETF work on remote attestation and software supply-chain security: obtain evidence about the device and the software running on it, evaluate that evidence, and incorporate the result into an OAuth authorization decision. The goal is to make access sensitive to the environment that will process the data, including the intended LLM destination. Attestation supplies evidence for a trust decision; identifying a client alone cannot provide that environmental assurance.

14:0714:17
Suggest correction

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

14:07 · section reference included

Authorize the transaction, not just the category of action

OAuth scopes improve on handing an application a password: a service can distinguish read access from write access. But those permissions can still be too broad, and the authorization can last longer than the task requires. An agent carrying out financial or commercial work may need permission for one transaction, a particular amount or a bounded budget. Permission to perform a kind of action is not necessarily permission to perform this action with these parameters.

Rich Authorization Requests provides structured authorization_details for expressing that finer-grained request. For example, a proposed payment could carry the following details:

json

{
  "authorization_details": [
    {
      "type": "payment_initiation",
      "instructedAmount": {
        "currency": "USD",
        "amount": "25.00"
      },
      "creditorName": "Example Supplies"
    }
  ]
}

Here the agent is requesting a USD 25 payment to Example Supplies; the JSON does not represent an approved or executed payment. The authorization server must interpret the requested details, and the payment service must enforce the approved constraints. Hanson presents the specification as something agent systems can adopt or use as a basis for transaction-specific authorization.

14:5615:16
Suggest correction

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

14:56 · section reference included

Carry authorization beyond the first MCP connection

The MCP connection is only the first leg of many agent workflows. Once an MCP server calls another API, the system crosses another authorization boundary. In the MCP account presented here, the security profile for that downstream leg is unspecified. A secure front door therefore leaves an architectural question: on whose authority does the MCP server make its next request?

Hanson distinguishes two cases:

  • Within one domain: OAuth Token Exchange provides a way to exchange a token for one appropriate to a downstream service. Its subject and actor concepts can represent the distinction between the identity being served and the service acting for it.
  • Across domains: identity chaining and the identity assertion grant address authorization into third-party systems, where the next service belongs to another trust domain.

These mechanisms provide ways to carry identity and authorization through backend calls. They do not automatically produce a complete audit history; each participating system still has to preserve and expose the relevant context.

Deployments also depend on internal infrastructure outside OAuth’s scope. The larger possibility is a graph of agents calling agents on other servers, with authorization moving across many edges. Hanson is uncertain how much of that pattern is already deployed, but its requirement is clear: operators need end-to-end visibility into how authority travels through the graph, not just evidence that the initial MCP request was accepted.

16:0216:11
Suggest correction

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

16:02 · section reference included

Ask for permission after the user leaves

Browser-based authorization assumes a user is present to respond. Background agents disrupt that assumption: the user starts a task, walks away, and the agent later discovers that it needs additional access. Hanson asks how permission requests could reach the user through SMS or push notifications instead of requiring the whole interaction to remain in a browser. The security problem includes both obtaining the additional authorization and presenting a request the user can understand in its new context.

Voice, video and fully background operation extend the same question to other interfaces. Hanson points to real-time communication communities and protocols such as SIP, XMPP and WebRTC as sources of prior art. The next authorization interaction may occur while speaking to an assistant or responding to a notification, rather than while looking at a conventional consent page.

This is the product direction Hanson describes for Keycard: identity and access management connecting copilots, custom agents and third-party agents to applications, services and infrastructure through standards-compliant A2A, MCP and OAuth protocols. He closes by inviting both people interested in building that infrastructure and partners building agents to work with the company. The destination is an agent ecosystem in which useful access can expand without making static, broadly privileged credentials its foundation.

17:1317:26
Suggest correction

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

17:13 · section reference included

Resources

From the talk

Updates since the talk

Read the complete timestamped transcript
  1. 0:00

    [upbeat music] Thanks a lot everyone.

  2. 0:15

    Thanks for coming out. Uh, we're gonna talk about a topic that I consider one of the most, uh, important topics, uh, for what we're doing with AI and agents, which is how to secure agents using OAuth.

  3. 0:25

    Um, I'm Jared Hanson. I'm the co-founder of a new company called Keycard, where we're building identity and access management platform for AI and agents. I'm also the cr- creator of Passport.js for any of the Node, uh, developers in the audience, very popular Auth framework.

  4. 0:41

    And previously I was at Auth0, where I built a lot of their core identity infrastructure, and then, and then at Okta.

  5. 0:48

    Uh, let's get into it. So I think we're all super excited about what's happening with LLMs and AI-powered applications. Uh, you know, we can bring these things into our daily lives, and they automate a lot of the tasks for us.

  6. 1:00

    And, and simply put, agents that are more connected are more useful. Uh, so let's connect these agents to more systems. But, but hold on a second because today we face an impossible choice.

  7. 1:10

    Uh, we can give agents broad-based access and accept security risks, or we can limit their capabilities and sacrifice business value. Uh, and this is exemplified pretty well in how we set up, uh, MCP servers today, which is we go get API keys that are typically long-lived and broadly scoped.

  8. 1:28

    We paste them into some configuration files and environment variables and, and let our agents run with them. Now, if we continue this pattern for hundreds or thousands of agents, we've got a pretty big security problem on our hand.

  9. 1:38

    Uh, luckily, we, we know how to fix this. We know how to transition away from static secrets, uh, to dynamic access using OAuth. Now, show of hands, how many people are familiar with OAuth in the crowd?

  10. 1:51

    Uh, I'd say quite, quite a bit. So I'll, I'll burn through this quickly. Uh, but just, uh, as a quick introduction, um, I'm not gonna lie to anyone, like OAuth is a relatively complicated protocol, especially when you consider all the extensions, but the princip- principles behind it are fairly straightforward and easier-- easy to understand.

  11. 2:09

    Uh, what it is, is a protocol for applications, which we call clients in OAuth, to request access to APIs, which we call resource servers. And, and these requests are mediated by what's known as an authorization server.

  12. 2:23

    If you've ever used anything like Calendly and connected it to your Google Calendar API, you've experienced OAuth in the real world. Uh, what's happening there is Calendly sends a request over to Google saying, "Hey, I'd like access to this person's Google Calendar."

  13. 2:38

    Uh, Google Cal-- Google's authorization server then, you know, ensures that you're logged in, prompts you for consent, uh, that you want this access to occur. And if you agree to it, uh, Google sends what's known as an access token over to Calendly, and then Calendly can take that access token and go about accessing your calendar.

  14. 2:56

    Uh, there's a few other interesting bits going on here, like refresh tokens, which basically allows these access tokens to be short-lived and rotated pretty quickly while still maintaining the, the authorized connection.

  15. 3:07

    Uh, and in OAuth, we call these types of flows that involve user delegation, uh, authorization code flows, and they typically happen via browser-based interfaces that, that you've seen when you've used these types of applications.

  16. 3:19

    Now, one thing that gets kind of confusing for people is that OAuth is oftentimes used to implement things like sign in with Google or sign in with o-- uh, Facebook.

  17. 3:30

    Uh, and this is confusing because we refer to OAuth as an authorization protocol or a delegated authorization protocol specifically. So what's, what's going on here when we use it for sign in?

  18. 3:38

    Well, this is really just a special case where the API gets replaced with a user info API that just returns claims about the user who logged in, so their ID, their name, their email address, et cetera.

  19. 3:49

    And we kinda use authorization to back our way into authentication. Um, and this became like such a common pattern that people used with OAuth that it got formally standardized as OpenID Connect, which is just an identity layer on top of OAuth, uh, that standardizes the response format of that user info API.

  20. 4:07

    Uh, it also does a couple things that are kinda confusing, like introduce more terminology, which identity people are prone to do. Uh, we call the authorization server now an identity pro- identity provider in, in the scope of OpenID Connect, and applications are known as relying parties.

  21. 4:22

    Don't get hung up on the terminology. It's, it's all the same thing.

  22. 4:26

    Uh, one other thing that OpenID Connect does is it introduces an ID token. This is simply a JSON web token, which is a cryptographically signed statement about who the user is.

  23. 4:36

    Uh, this overlaps a lot with the user info API. You can think of it as sort of an optimization that the application can verify itself without making API requests.

  24. 4:45

    It also serves some functions in, like, ongoing session management between applications and authorization servers, but that's kinda beyond the scope of introductory material here. Uh, in the real world, these things get deployed together.

  25. 4:58

    We'll typically run authorization and authentication flows, uh, in line, uh, so that, you know, we know who the user is who logged in as well as get access to things like their Google Calendar.

  26. 5:10

    Uh, one thing to call out that is important here is that there's three roles in OAuth. Uh, the client, uh, and the resource server I think are all relatively straightforward.

  27. 5:19

    We understand that from client-server architectures. The client requests ac-- uh, resources, and the resource server responds with the data. Uh, what gets different is that we introduce this authorization server in the middle that mediates this access, uh, and it mediates it by issuing tokens.

  28. 5:34

    Uh, it issues tokens back to the client, which holds them and then presents them to the resource server, and the resource server's job is to verify those tokens. Now, what's, what's the benefit of this sort of model?

  29. 5:46

    Uh, the main benefit, uh, flows to the APIs. They don't have to care about anything to do with authentication anymore, so verifying user password or doing step-up authentication, running the consent flows.

  30. 5:57

    They hand all that job off to the authorization server, and it gets kind of abstracted away by the token, uh, that the API can verify what has happened. Um, there's also some benefits that we can, like, centralize policy, uh, and then deploy ecosystems of apps and APIs all kind of protected by a central location and, and build

  31. 6:15

    out the, the ecosystems that we all know today.

  32. 6:18

    Uh, how do we apply this to MCP and agents in, in particular? Well, it, it should be pretty simple. Uh, now our applications get replaced by a chatbot or agent like Claude, uh, that we wanna connect to MCP servers.

  33. 6:34

    Uh, w- the MCP c-clients and the MCP servers should get authorized via OAuth by, you know, the controlling authorization server in the middle. This should be pretty simple, right?

  34. 6:44

    Well, nothing with OAuth is ever so simple, so let's take a look at the state of authorization in MCP. Uh, we're gonna look at, at where it started, where it is now, and, and then where it's going in the future.

  35. 6:57

    So the first version of MCP, uh, it's a pretty young protocol. It's, like, seven months old to the day, I think. Uh, the first version I like to call the No Auth version.

  36. 7:05

    It didn't have any authorization in it at all, uh, which they admitted in the spec. It was really a way to get something out there primarily for, uh, local MCP servers.

  37. 7:15

    Uh, there was some notion of remote MCP servers, uh, but again, no authorization, but this kind of spurred discussion. People saw the promise of MCP and, and started discussing how to add authorization to it.

  38. 7:27

    Uh, now we have the latest draft of the specification, uh, which was published in late March. I like to refer to this as OAuth the first attempt, and for anyone who has ever done OAuth implementations, the first attempt is always pretty poor, uh, and that is the case with this version of the specification of MCP.

  39. 7:46

    Uh, I don't actually recommend anyone read the authorization part of the MCP specification as it is today because you'll walk away with a pretty misinformed view of what OAuth is.

  40. 7:56

    But as a quick recap, what it does, it says, "Okay, MCP c-clients gotta implement the client side of, of OAuth." That all makes sense. And then it also says, "MCP servers, you need to implement a-all of OAuth too, including authentication, token issuance, et cetera."

  41. 8:12

    Now, OAuth has three roles. Where's, where's the third role here? What happened to the OAuth server? Well, it got collapsed into the MCP server, which, which is a bit odd.

  42. 8:22

    Uh, and people started noticing this. So five days after the specification was released, uh, a blog post went viral, uh, this one from Christian Posta saying, "The MCP authorization spec is a mess for the enterprise."

  43. 8:35

    Uh, and he states, you know, the problem here is that it treats the MCP server as both a resource server and authorization server. Uh, Aaron Parecki, who does a l- a lot of great OAuth standards work, uh, followed this up with another blog post that went viral titled, "Let's Fix OAuth in MCP," where he noted that, you

  44. 8:53

    know, a bunch of the confusion that was happening bec- was because the diagram showed that the MCP server itself is handling authorization.

  45. 9:01

    Now, then this kinda culminated in a, in a PR to the specification where, uh, people proposed, "Let's, let's fix this problem. Let's just shift, uh, the MCP server to be an OAuth, OAuth resource server and everything will be good."

  46. 9:14

    This was a super interesting PR to read. There's, like, four hundred some comments on it. It's not even the only PR there, uh, but just kind of a example of how people just picked up on this problem and ran with it.

  47. 9:26

    Now, I'm not usually one to say I told you so, but all the way back in January of this year, I commented on, on the, uh, as a review for the specification.

  48. 9:36

    I was like, "Hey, I w- recommend we m- model MCP servers as, as resource servers from an OAuth perspective." I'm not quite sure where, where that got lost. It, it didn't get picked up.

  49. 9:45

    But in any case, uh, we fixed this problem, and one of the reasons I'm here is to tell us all more about OAuth things that we need to pay attention to in order to avoid this problem in the future.

  50. 9:56

    Uh, so okay, the next attempt. In draft, all this feedback has been incorporated and the MCP spec is kind of like fi-fixing its issues. Um, and the draft version of the specification models OO- all of OAuth pretty cleanly and pretty nicely.

  51. 10:10

    Uh, the OAuth authorization server is a totally separate entity, and this is really beneficial for all of you building MCP servers because your job gets a whole lot easier.

  52. 10:19

    All you have to do is verify the tokens that come in over HTTP and hand off all the other responsibility to the OAuth server.

  53. 10:29

    So we're back to a, a pretty good place, uh, with respect to OAuth and MCP and, in particular, how we authorize connections between MCP clients and MCP servers.

  54. 10:39

    So let's talk about the future. If, if this is all we do with OAuth, we're not even scratching the surface of what we need in order to fully secure AI and AI interactions.

  55. 10:48

    So what else are we going to need? Uh, we're gonna burn through this here pretty quick. The first is agent-to-agent, uh, communication. So what we've seen with OAuth so far as it's applied to MCP, like I said, that's referred to as the authorization code flow, and it's particularly relevant for when we wanna do end user delegation.

  56. 11:07

    Uh, but there's a whole bunch of other flows in OAuth, uh, that are relevant, in particular, client credentials, and this applies when we want agents to communicate with other agents or other MCP servers on their own behalf, not on behalf of a user.

  57. 11:21

    So this is one thing to pa- pay attention to.

  58. 11:24

    The next, this kinda begs the question agent identity. Uh, what should we do about this? Well, if anyone's ever done OAuth development, you'll- you're probably familiar with this type of flow, is you wanna build an application, uh, you wanna integrate with an API.

  59. 11:36

    You go to some developer portal, create a new application, get a client ID and secret, and then somehow configure your, uh, application with that, those credentials. Uh, this is a bunch of friction.

  60. 11:47

    This obviously won't apply well to, uh, MCP, which is trying to be a standard prot- protocol, and you wanna bring tools and agents together that, that may not be aware of each other.

  61. 11:56

    Uh, you can't do this if you presuppose some sort of registration process. So what does MCP do? Uh, well, it picks up what is known as dynamic client registration.

  62. 12:07

    Uh, what this does is allows applications and agents to request credentials at runtime rather than, like, ahead of time in manual registration. Uh, so an agent says, "Hey, like, this is who I am.

  63. 12:19

    Give me a client ID and secret." The server does it, and the agent goes about the rest of its OAuth flow. Now- This specification has been around for about ten years, and in practice has seen like no meaningful adoption.

  64. 12:31

    And one of the implications behind this is it like makes all agents anonymous, because the registration request itself is uncredentialed. This makes it hard to build trust in agents.

  65. 12:43

    Probably not super viable in my opinion. So what should we be looking at instead?

  66. 12:49

    Well, there's many cases where we just wanna use public clients that we don't really care about verifying their identity. In this case, there's an emerging specification called Push Client Registration, uh, which introduces this kind of like well-known string to identify a like public client.

  67. 13:04

    Uh, we can just use this well-known string and we skip the whole registration song and dance and then the need to store the resulting state. Uh, this is but a lot more simpler.

  68. 13:13

    It also has the capability to carry, uh, certain client metadata in the request if, if that's necessary. So this is something we should look in for cases where public clients apply.

  69. 13:23

    Uh, but what about clients that we actually wanna authenticate and verify their identity? Well, my proposal here is that we should start looking at, uh, using URLs and PKI for identity.

  70. 13:36

    Um, this lets us reuse the existing identifiers that people already associate with the apps they're using and, and can repurpose them into the agent world. This looks like in practice we'd have a URL such as, uh, you know, agent.com to be used as a client identity in OAuth flows, and then through the magic of, uh, cryp- cryptography

  71. 13:53

    and key sets, we can authenticate these agents by having them sign, uh, JWT assertions or HTM message signatures that we can then verify with, with the corresponding public keys.

  72. 14:07

    All right, this dove- dovetails into agent attestation. Uh, we've connected our agents to the resources that we're using, but then that agent turns around and sends all that information up to an LLM.

  73. 14:17

    This seems like something we should probably have some awareness of and control over. Uh, so in kind of protected environments, we can sort of get by like treating the LLM as just another API, which often it is.

  74. 14:28

    Uh, and this is a technique we could apply. But it has limited, uh, capabilities when we look at like edge deployed agents such as on desktop or mobile devices where we don't really control their software environment.

  75. 14:40

    So there's a bunch of interesting work going on in the IETF now with respect to like remote attestation and supply chain, uh, security, where we can start to ade- attest to the state of the device and the software running on it and know what LLMs our data is gonna wind up in, and then incorporate that into OAuth

  76. 14:56

    authorization flows. Next up, transactional authorization. Uh, what we've done to date in OAuth, uh, is, uh, introduce scopes. This is a whole lot better than passwords, which OAuth kinda replaced back in the day, uh, in the sense that now we can do more fine-grained permissions such as like read versus write access.

  77. 15:16

    Um, but in practice, these end up being a little bit too coarse grains for a lot of use cases, and oftentimes a little bit longer lived than, than we might like.

  78. 15:25

    Uh, in, in agent interactions, we're gonna have to be increasingly transactional. So imagine use cases where you want agents to do financial tra- transactions or commercial transactions. We're gonna want to authorize things on a transaction basis, potentially with, uh, specific amounts or, or financial budgets.

  79. 15:43

    So we're gonna have to look at moving to more dynamic access in this respect. There's a proposal that's actually like a specification at this point called rich authorization requests, which is, which is worth looking into, um, and something that we can take in- inspiration from or either adopt directly for these, these use cases.

  80. 16:02

    Next up, we have chain of custody. This is, uh, particularly interesting to me. Uh, what we talk about with MCP really covers the first leg of this on the, on the left-hand side.

  81. 16:11

    We have authorized connections between agents and MCP servers, but what happens on the right side is completely unspecified in terms of like the security pro- profile. So how do we protect an MCP server that calls another API within the same domain in particular?

  82. 16:27

    There's a technique called OAuth Token Exchange that I recommend everyone look into. Uh, special case of this is MCP servers to third party APIs. In this case, uh, we should look into identity chaining across domains, uh, and its corresponding specification, the identity assertion grant, which lets us do cross-domain authorization in the back end.

  83. 16:49

    Somewhat outside the scope of OAuth is other internal infrastructure that people should be aware of as they look to deploy these agents. And then the culmination of this is really agent-to-agent flows where, uh, I don't know how much of this is happening in practice today, but people see the promise of it.

  84. 17:03

    Imagine big graphs of agents talking to other agents on other servers. We're gonna need end-to-end visibility as the authorization flows along these graphs.

  85. 17:13

    Finally, async interaction. Uh, I think one of the key things to look at here is like OAuth typically assumes a, a user is sitting in front of a browser and relatively static, but as we kick off flows, users might walk away and agents do work in the background.

  86. 17:26

    They're gonna need a way to reach out to the user and say, "Hey, I need a bit more access than I've been permissioned." How do we think about bringing more like real-time interactions via channels like SMS or push notifications rather than just browser-based flows?

  87. 17:39

    And then a hot topic today, uh, there's a bunch of interesting work going on in the voice, voice t- track at, at the conference. Uh, as AI starts to interact with us w- via voice and video or completely in the background, how do we think about security in those respects?

  88. 17:54

    This is really the frontier of, of security and inter- interaction, but there's a lot of prior art in various real-time communities around SIP, XMP, XMPP, WebRTC that, uh, I think is very interesting for us to all look at.

  89. 18:08

    So there's a lot here. Let's, let's go build this stuff. It's all important for us, uh, to, to achieve a, a safe and secure AI future. Uh, this is what we're building at Keycard.

  90. 18:19

    Uh, we're building a identity access management platform that lets you connect your copilots, custom agents, and third-party agents to all your apps, services, and infrastructure, all using standards compliant protocols, A2A, MCP, and OAuth.

  91. 18:33

    If building this stuff is interesting to you, we are hiring, hiring, so get in touch with me. And if you're... If it's not interesting to you but you know you wanna secure your agents, get in touch with us too.

  92. 18:42

    We're looking for partners that are building, uh, so that we can work with you to secure, secure your agents. Uh, the website is keycard.ai and I will be around the rest of the conference.

  93. 18:52

    Thanks. [outro music]