# Who Is Making This Request? Agent Auth 101 - Kamil Potrec, Keycard

Kamil Potrec, Keycard

[Talk page](https://ai.engineer/talks/58ulJViGFgU-who-is-making-this-request-agent-auth) · [Video](https://www.youtube.com/watch?v=58ulJViGFgU)

## Who Is Making This Request? Agent Auth 101

Kamil Potrec of Keycard follows credentials through an agent’s tool calls, explains why a user token obscures who acted, and compares SDKs with gateways for enforcing delegated access without exposing downstream secrets.

![Diagram of Alice, an agent, an MCP server and an invoices API. The MCP connection is labeled token says Alice.](https://ai.engineer/api/talk-essay-media/52fc08174aa572b9eb52df19a7a6ee9d872fbd040883a5462859e501f43a5fd1)

At 1:41, the agent calls the MCP server with a token naming Alice; the model is a separate participant choosing the tool call.

### Follow the credentials, then watch the invoice

[0:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=12s)

A familiar agent architecture connects a user, a model and tools. The less familiar part is the trail of credentials that makes those connections possible. Kamil Potrec, a member of Keycard’s product team, begins there: before asking what an agent can accomplish, ask which identity each service sees when it receives a request.

The credentials serve different purposes:

- **User-to-agent access:** A personal access token, or PAT, identifies the user accessing the agent. A locally running agent may skip this authentication step.
- **Model access:** The agent needs its own API key to call the model provider and run its reasoning loop.
- **Tool access:** A remote Model Context Protocol (MCP) server may receive the user’s forwarded PAT, an agent’s static key or a dynamically obtained OAuth credential.

These are separate connections. Authenticating one of them does not establish who is acting across the rest of the chain.

If the MCP server receives Alice’s token, it usually sees Alice. It cannot distinguish an agent from Alice’s command-line client or another tool using that credential. The server may then wrap an internal API, a database or an external system. To serve multiple users, these wrappers often use service accounts that collect the backend permissions they need. The result is a chain with user identity at one connection and a broad service identity at another, without a distinct identity for the agent making decisions.

What changes when the model reads a tool result? In Potrec’s hypothetical invoicing example, Alice asks the agent to inspect a recent invoice. The service returns an invoice marked pending, with text saying it should be sent to the user. That result goes back into the reasoning loop. A malicious or simply over-helpful agent decides to send the invoice. An inspection has become an action, yet the receiving service still sees the credential used on the request. The example exposes the missing distinction: Alice asked to look; the agent decided to send. A user token alone does not preserve that difference.

![Invoice-request diagram showing get_invoice and send_invoice choices, with Alice named on the MCP token and a service account named on the API token.](https://ai.engineer/api/talk-essay-media/dcbc94a276bc786a48d1341efc3ccce54e802b7f407d84ca0be7e0e1b5016e89)

The model selects send_invoice after the invoice returns, while the two connections still identify Alice and the MCP service account (3:39). The frame does not establish that sending completed.

### Standing credentials turn access into accumulated privilege

[3:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=222s)

The attribution problem comes with an exposure problem. Alice can copy a reusable access token onto a personal machine, moving it outside the corporate environment that previously protected it. In the arrangements Potrec describes, revoking these scattered credentials is difficult. As an agent gains more capabilities, it receives more keys; as an MCP server serves more backends and users, its service account accumulates more permissions. Neither collection necessarily reflects the narrow task currently underway.

![Three risks highlighted beneath the credential-flow diagram: a long-lived secret, a shared or passed-through secret, and an overprivileged service account.](https://ai.engineer/api/talk-essay-media/4cecb35583a041d5d7579ddc4b4772f0d22ba6390f0e290e24d6cdd9bcfa2c1d)

Reusable user secrets, credential passthrough and broad service-account permissions are three distinct risks in the illustrated request chain (4:36).

Traditional service-to-service software already had these weaknesses. Teams accepted some of the risk because developers controlled the application’s released behavior. An agent adds another actor that can choose its next action after reading new data. Giving that actor access to a credential lets it use the credential’s authority, even when its interpretation of the task has drifted.

Potrec’s analogy is the unlocked work laptop: a colleague opens Slack and posts, “I’m buying donuts for everybody today.” The session makes the message look like yours, although somebody else chose to send it. The usual response is to lock the laptop. Handing an agent your reusable credentials recreates the same mismatch between the account named on an action and the actor that chose it.

### Authenticate the agent before issuing task-specific access

[5:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=312s)

The proposed replacement starts by removing the manual token hunt. An agent service advertises how clients can obtain authorization. A client discovers those requirements and requests access from an external authorization system, rather than asking Alice to find a token and paste it into configuration. OAuth supplies a way to obtain dynamic credentials scoped to the interaction and the tool using them, with a limited lifetime.

![Runtime authorization diagram showing a short-lived user token and an agent proving its identity before receiving an MCP-bound token.](https://ai.engineer/api/talk-essay-media/5e569dadf402fb36629931fb40ff53b524903fb1f36faaebb11047bb77d6b131)

The proposed flow uses short-lived user access and token exchange, with the agent proving its own identity instead of passing a user token through (6:49).

The agent must also authenticate before receiving credentials. Potrec names workload identity federation, private-key authentication and certificates as possible mechanisms. The choice depends on the system; the essential requirement is that software prove its identity instead of acquiring authority merely because somebody placed a secret in its environment. This separates identifying the agent from deciding what access to issue it.

The same pattern can repeat at the next service connection: determine the required authorization, obtain an appropriate token and then make the request. That replaces a service account’s growing collection of persistent permissions with access obtained when it is needed. The model’s reasoning loop changes which requests the agent chooses; it does not require inventing a different authentication foundation for every connection. Outside that loop, the agent and the legacy application are both software clients.

### Scale requires identity, delegation and legacy bridges

[7:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=432s)

One client and one authorization server make this sound straightforward. An enterprise may have hundreds of APIs with different authentication systems, agents it builds and agents it buys, and software it cannot modify. Requests can also pass through multiple agents or hubs. Delegation must survive those hops, while thousands of users need a meaningful way to authorize what agents do for them. Solving token acquisition for one service leaves most of that coordination untouched.

![Agent-auth checklist with identity, delegation, scoped short-lived credentials, federation, brokering, policy and approval, and audit.](https://ai.engineer/api/talk-essay-media/b357e309cf7ad988b851fcdf62a4a036742edea7fc1f54548050a492dad6b10e)

Seven requirements extend agent authentication beyond obtaining a token: identity, delegation, scoped credentials, federation, brokering, policy and audit (9:48).

The first requirements describe the actor and its authority:

- **Separate agent identities:** Issue an identity per agent, potentially per session, distinct from the person who launched it.
- **Explicit delegation:** Keep a verifiable record of which user authorized which agent to perform which task. Preserve that record when agents call other agents.
- **Scoped, short-lived credentials:** Issue access for the work being done rather than handing the agent a master key that unlocks everything.

Together, these let a system distinguish the agent making a request from the user whose authority it is exercising.

Existing systems require two complementary bridges. **Identity federation** establishes trust across systems so they can accept identities rather than each maintaining an isolated account universe. **Legacy credential brokering** handles services that will not support OAuth. A broker can hold a backend API key and grant scoped access to the service when a task requires it. Federation does not magically modernize every backend, and a broker does not eliminate the need to identify the caller.

Policy determines which actions may run automatically and which need human approval. Audit records who authorized a request and which actors made it possible. These controls address the invoice problem at different points: policy can constrain an action before execution, while audit preserves the authorization trail afterward. That trail establishes actors and grants; it should not be confused with proof that the user intended every decision the model made.

### What one authenticated MCP request actually requires

[9:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=582s)

Even one agent-to-MCP interaction contains several security operations. The server first publishes its access requirements; the client discovers them. The agent then obtains credentials and authenticates to the remote server. Discovery answers how to request access. Possessing a credential is only the next step, not the end of the server’s responsibility.

What does the server have to check before allowing the request? It must verify the credential’s signature, establish that the issuer is trusted and validate the token. It then applies current policy. If fulfilling the tool call requires another external system, the MCP server may need to obtain another credential for that connection. Every one of these actions must enter the audit log; audit spans the process rather than existing only as a final success message.

This sequence makes the implementation burden visible: client discovery and credential acquisition differ from server verification and enforcement, and a downstream connection can introduce another credential exchange. Potrec asks whether an LLM can perform all of this perfectly every time. His answer is to put the machinery into reusable, reviewed libraries, middleware and SDKs rather than relying on the reasoning loop to reconstruct security procedures for each request.

![Client and server checklists beneath an agent-to-MCP diagram, covering discovery, registration, identity, token handling, policy enforcement and audit.](https://ai.engineer/api/talk-essay-media/d6c8809dc1f7c9792f1e7ed72643cfa07b39ebfda3f410e417602cdafc416bea)

One authenticated request divides work between the client and server. The slide also calls out auditing, caching, refresh and step-up handling (10:47).

### An SDK can reuse the code without hiding the secret

[10:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=654s)

Shared code solves part of the problem, but distributing it creates familiar operational work:

- **Adoption coverage:** Every relevant application must use the library; gaps leave inconsistent controls.
- **Language coverage:** The organization needs implementations for its different languages, including older systems.
- **Unmodifiable agents:** A purchased agent may not allow the changes an SDK integration requires.
- **Patch distribution:** Fixing a library bug is insufficient until teams identify its consumers and update them.

Writing the SDK is easier than ensuring every request uses the corrected version.

![Five SDK challenges: adoption by every team, language ports, unmodifiable agents, patch distribution, and credentials remaining in the agent process.](https://ai.engineer/api/talk-essay-media/2c8adc2a9deef0a22198215f4638f21038e726dd16aee84677a1d296bd5c191d)

SDK reuse still leaves adoption, language, integration and patching work—and may leave credentials inside the agent’s process (12:36).

Agents add a more fundamental limitation. An SDK may cache and manage credentials correctly, yet the secrets still live inside the agent’s execution environment. An over-eager or manipulated agent that discovers a usable credential may try to use it outside the intended client-side path. Improving the library does not, by itself, move that credential out of reach.

This is the distinction behind Potrec’s rejection of SDKs as a complete solution. They remain useful for discovery, token handling and service authentication. They do not provide credential isolation merely by being SDKs. If keeping downstream secrets away from the agent is a requirement, enforcement needs to move outside its execution environment.

### A gateway uses the credential without giving it to the agent

[12:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=744s)

The gateway design moves downstream credentials into a separate runtime authorization and vaulting service. The agent requests access to a target such as GitHub through the gateway. The gateway authenticates the caller, consults the authorization system, checks policy and retrieves the appropriate credential. It injects that credential into the outgoing request and forwards the request to GitHub.

![Agent inside an execution-environment boundary connects through an external gateway to APIs; runtime authorization and its credential vault sit outside the agent.](https://ai.engineer/api/talk-essay-media/c4b8a45b568e3b8de0d3e2ea030945d1ed58b66c5c651992e136c6c5d3fa2e81)

The gateway sits outside the agent’s execution environment and injects downstream credentials into outgoing requests, rather than handing those keys to the agent (13:45).

Where does the secret travel? The topology below separates the agent’s request path from the credential exchange. The downstream credential moves from the authorization service to the gateway and then accompanies the forwarded request; it is not handed to the agent. That protection assumes the gateway and authorization service remain uncompromised. The gateway still has to authenticate the agent, so this design hides the downstream credential rather than making all authentication credentials disappear.

Being on the request path adds controls beyond secret storage:

- **Revocation at the next check:** A short-lived token remains usable until it expires unless something stops it sooner. If all relevant communication passes through a gateway that checks every request, the gateway can deny subsequent requests immediately after access is revoked.
- **Narrower actions than the backend token permits:** A legacy service may offer only coarse permissions such as admin, read or write. The gateway can inspect the requested operation and allow reading email while blocking sending, even when the underlying credential is broader.
- **Request visibility:** The gateway can observe the traffic passing through it without requiring changes to the downstream service.

These benefits come from mediating requests, not merely keeping a token in a vault.

The downstream credential bypasses the agent
The agent submits a target request. The gateway checks authorization and obtains the credential separately, then adds it only to the forwarded GitHub request.
- Agent — Requests GitHub access and authenticates to the gateway; does not receive the GitHub credential.
- Gateway — Authenticates the caller, checks authorization and injects the credential into an allowed outgoing request.
- Runtime authorization and vault — Stores or brokers downstream credentials and supports policy checks.
- GitHub — Receives the forwarded request with the credential added by the gateway.
- Agent → Gateway (Target request with caller authentication)
- Gateway → Runtime authorization and vault (Policy check and credential request)
- Runtime authorization and vault → Gateway (Credential retrieved for the request)
- Gateway → GitHub (Allowed request with injected credential)

### Gateway enforcement depends on the traffic it actually controls

[14:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=894s)

The extra hop adds latency. More importantly, the control works only if agents must use it. Without strong network controls, an agent may bypass the gateway; local tool execution may never cross it at all. Request-level restrictions therefore depend on the paths the gateway can actually mediate. Installing a proxy does not automatically contain everything an agent can do.

![Gateway tradeoffs include latency, traffic coverage, caller identity, concentrated credentials, TLS proxying, configuration management and operations.](https://ai.engineer/api/talk-essay-media/b0f939ebc6786cebc6664d0eed21c5efc607e16df8e8d0d127689591a84f0039)

Gateway enforcement adds an operating responsibility: traffic coverage, caller identity, credential protection, TLS, configuration and availability all still matter (16:23).

A gateway also leaves the identity problem to be solved. Agents still need credentials that identify them to it. Meanwhile, concentrating downstream credentials at one component makes that component an attractive attack target. Intercepting traffic brings technical complexity, including TLS handling and compatibility with the systems being connected.

Someone must configure routes, policies and connectors, decide whether agent A may talk to agent B, and operate the infrastructure. The tradeoff is concrete: a gateway moves credential use and enforcement outside the agent, but introduces a network service whose security, availability and configuration become part of the system’s responsibilities.

### Combine the controls you need—and keep them interoperable

[16:25](https://www.youtube.com/watch?v=58ulJViGFgU&t=985s)

Keycard’s proposed answer is a shared control plane for agent identities, token issuance, identity federation, policy and audit. Potrec describes client SDKs for discovery and credential injection, service SDKs for authentication, and an optional gateway for teams that need external request controls. The pieces can be selected for a chat application or a larger orchestration platform rather than requiring every application to adopt one architecture.

![Keycard platform diagram with Client SDK, Server SDK and Gateway columns under shared identity, credentials, federation, brokering, policy and audit.](https://ai.engineer/api/talk-essay-media/8bf541ebb46606073309a0a78ed9915eee0a832f22890447b3f0e3fb5462e53d)

Keycard’s proposed platform combines client and server SDKs with a gateway under a shared identity, authorization and audit layer (17:15).

That combination also clarifies why the earlier SDK criticism matters: SDK integration and gateway enforcement solve different parts of the problem. Reusable code can handle protocol mechanics; a gateway can keep downstream credentials outside the agent’s environment. Neither removes the need for separate agent identity, explicit delegation or policy. Choosing an integration point is a decision about where controls run, not a substitute for deciding what authority the agent should have.

The closing advice is deliberately blunt: agent authentication is no longer optional, use open standards so systems can work together, and “don’t YOLO it.” Generated security code still needs security review. The point of taking these operations out of the reasoning loop is lost if their implementation is accepted without checking whether it actually enforces the intended controls.

Potrec closes by pointing to [Agent Baseline](https://agentbaseline.org). He says his team recently released a software-factory reference implementation of the capabilities he described.

## Key takeaways

- A user token identifies the account whose access is being used, but may not distinguish the agent that chose the action. The invoice example makes the gap concrete: a request to inspect becomes a decision to send.
- Agent access needs a separate agent identity, explicit delegation, scoped short-lived credentials, federation, legacy credential brokering, policy and audit—not just a successful OAuth exchange.
- SDKs can make authentication procedures reusable, but do not inherently hide credentials from an agent sharing their execution environment. A gateway can obtain and inject downstream credentials outside that environment.
- Per-request gateway checks can stop subsequent access and restrict operations more narrowly than a legacy token allows, provided relevant traffic cannot bypass the gateway. They add latency, operational work and a concentrated attack target.

## Resources

- [Agent Baseline](https://agentbaseline.org/) — Potrec recommends Agent Baseline in his closing remarks. Its homepage title describes “six security outcomes for enterprise AI agents.”
- [The Secure Software Factory: A Reference Architecture](https://agentbaseline.org/reference-architecture) — Agent Baseline’s reference architecture for a secure software factory.
- [Agent Baseline controls](https://agentbaseline.org/controls) — Agent Baseline’s controls catalog.

## Related talks

- [The Lethal Trifecta Is Already on Your Laptops — Michael Patterson, Coder](https://ai.engineer/talks/abw_m-DRi1k-lethal-trifecta-is-already-on-your-laptops) — Potrec compares agents using your credentials to a colleague posting from your unlocked laptop. Patterson also focuses on the security risks on laptops.
- [Building the platform for agent coordination](https://ai.engineer/talks/UG9IAdmi2Dg-building-platform-agent-coordination) — Pairs Potrec’s discussion of delegation between agents with a talk on building a platform for agent coordination.

## Slides

### Who is making this request?

[3:14](https://www.youtube.com/watch?v=58ulJViGFgU&t=194s) [Alice’s invoice request moves through an agent and MCP server to an invoices API.](https://assets.ai.engineer/sites/aiecode2025/sha256/19831bd78faf479ee516b3c58c6db891123652288ec4c9335d7d94a983a5582e.webp)

Who is making this request? Alice · Agent · MCP server · Invoices API

### Three problems with the token chain

[4:37](https://www.youtube.com/watch?v=58ulJViGFgU&t=277s) [Red outlines flag a long-lived secret, a shared secret and an overprivileged service account.](https://assets.ai.engineer/sites/aiecode2025/sha256/23141470f83f1f89aae00cc67da5b79fb63ed26e79e005ba94ba4abfffbfee0f.webp)

What’s wrong with this picture

### Every hop knows the user and the agent

[6:48](https://www.youtube.com/watch?v=58ulJViGFgU&t=408s) [Green token labels and an authorization service show the identity passed between each component.](https://assets.ai.engineer/sites/aiecode2025/sha256/e4ceced7d70fd38cee441c47c613b8e4898a11e391f9941d96d02ec642bbc964.webp)

Every hop knows the user and the agent

### Every harness meets every resource

[8:07](https://www.youtube.com/watch?v=58ulJViGFgU&t=487s) [Four boxes show users, agents, MCP and A2A hops, and downstream resources under multiple authorization servers.](https://assets.ai.engineer/sites/aiecode2025/sha256/8d209e3284d54486aca669346f4c7255426ecfbcd799b6ffe6041e33e61db454.webp)

Every harness meets every resource

### What agent authentication needs to deliver

[9:43](https://www.youtube.com/watch?v=58ulJViGFgU&t=583s) [A checklist covers identity, delegation, scoped credentials, federation, policy and audit.](https://assets.ai.engineer/sites/aiecode2025/sha256/4f7795442993494cf837106dd460a65b2474c12e173abee2c618925d96c1ecf1.webp)

Agent identity · Delegation · Scoped, short-lived credentials · Federation · Policy and approval · Audit

### Authorization work on every call

[11:06](https://www.youtube.com/watch?v=58ulJViGFgU&t=666s) [Checklists below the client, agent, server and API show the work at each hop.](https://assets.ai.engineer/sites/aiecode2025/sha256/9a31a533f1ac501438c06b37e76941685b63b084fba63059da3cdcb06e677ce3.webp)

So many steps to get right, on every call

### Challenges with SDKs

[11:56](https://www.youtube.com/watch?v=58ulJViGFgU&t=716s) [A grid describes rollout problems when teams and languages each have to adopt an SDK.](https://assets.ai.engineer/sites/aiecode2025/sha256/5752faef741fc30a8c79ad77aa9b91798089a7b6b3e087dec55a35a706055904.webp)

Challenges with SDKs

### Move the keys outside the agent’s reach

[14:51](https://www.youtube.com/watch?v=58ulJViGFgU&t=891s) [A gateway sits between the agent and external APIs, separating tool access from keys.](https://assets.ai.engineer/sites/aiecode2025/sha256/9cae8ddfffe5dcd9a12ff2189e4892354dbccac48a1e189e9411ad2e3394a669.webp)

Move the keys outside the agent’s reach

### Challenges with gateways

[16:22](https://www.youtube.com/watch?v=58ulJViGFgU&t=982s) [A grid lists the costs and tradeoffs of putting a gateway between an agent and its tools.](https://assets.ai.engineer/sites/aiecode2025/sha256/ec6ff0a863ffdb5b98614f8c81e41a59d52eeacf6a6e038dfa40a234c0c27e81.webp)

Challenges with gateways

### One platform for each step

[16:59](https://www.youtube.com/watch?v=58ulJViGFgU&t=1019s) [A Keycard bar spans three columns for Client SDK, Server SDK and Gateway.](https://assets.ai.engineer/sites/aiecode2025/sha256/9912fe0cbbdc21639342eca5612a0a03169c386c7f0c67d91093c4f1e979e3da.webp)

Every step, handled by one platform

### Three things to remember

[17:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=1044s) [Closing slide lists agent auth, standards, and avoiding a homegrown implementation.](https://assets.ai.engineer/sites/aiecode2025/sha256/a70eb5d646664f59e98e96cdc7fb6343b481ff5ddb6a2c2928caaafcf369d0a4.webp)

Agent auth isn’t optional anymore · Reality is messy. Build on standards.

## Full transcript

[0:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=12s) Uh, hi, everybody. My name is Kamil. Uh, I work at Keycard in a product team. Uh, I'll be talking to you today about agent authentication and authorization requirements. Uh, we have around 18 minutes-ish. Uh, that's nowhere close to be able to cover this topic. So my goal today is to give you kind of high-level overview of what's required to do this, um, how to kind of solve these problems, and give you context to come and ask us questions at the booth. Uh, we downstairs, so, um, just whatever questions you have, feel free to grab me at the end or go find Peter. He has all the answers.

[0:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=42s) Um, we're gonna start with this, uh, fairly simple diagram. Uh, you're probably familiar with this in any other talks you have about agents and, uh, how they communicate with MCP servers and other agents around. But what usually people don't talk about is how are these, uh, uh, agents and users communicate with each other, how do they authorize and make requests. So, um, what we come across and what we see often is that users, uh, obtain some sort of, uh, access credential. They, they might be called, uh, personal access tokens or just, uh, tokens.

[1:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=72s) Uh, and they kind of represent opaque credential, uh, identifying these users and letting the agent decide if they're gonna perform this action or not. If your agent is running locally, sometimes this step is skipped and nothing else happens. Um, when request comes to the agents, uh, they need the credentials of their own to even perform their actions, right? Like, the common thing that they need is an API key to talk to the model provider, uh, that allows them to kind of do the reasoning. So whenever the, um, kind of LLM model decides to do, uh, some actions, uh, they often call tools. Um, when we need to do those tool calls,

[1:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=102s) often we use, uh, remote MCP servers to, to perform them. Um, and in order to communicate with them, hopefully, uh, th- we need another credentials to do that. And we have couple of options that, uh, we've seen in, in the industry. Sometimes, um, the agents will just use Alice's or, like, user's PAT tokens and pass them through. Sometimes they will have their own static keys. And luckily enough, uh, we see more and more use of OAuth kind of dynamic credentialing that happens there. Uh, but whenever MCP server receives that token, they usually just kind of see, uh, the, the user as the identity that acts with it. So

[2:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=132s) MCP server doesn't really know if it's, like, an agent running it, is it, like, Alice's CLI, or is it, like, any other tool that does it? Um, MCP servers are often used to kind of, um, enclose existing infrastructure. So if you have, like, internal APIs, databases, or even external systems that are not kind of agent-friendly, we can use MCP servers to represent that communication and, uh, optimize that interaction. Uh, but in order to do that, these MCP servers often need to have access to these backend services, uh, and ac- kind of act, uh,

[2:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=162s) for multiple users. So they cannot just use one user's PAT token because that will be, uh, limited to that scope. They us- they often use, uh, service accounts, and those service accounts kind of become aggregator of permissions so that these servers can communicate. Um, and this is nothing new. Uh, we've seen this pattern in the past in kind of service-to-service communication in your traditional, uh, SaaS software. However, um, what, what's different about agents, um, they're not deterministic software, right? So whenever the request comes back to the agent and it sees some, some data, uh,

[3:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=192s) it will send it back to the model, and it will decide to, to do what it wants to do, to do with it next. Um, in this case, we're using an abstract example of a invoicing service. So imagine the, uh, agent receives a request to go and look at the recent invoice. It gets it back, and invoice says, "I'm pending. It should be sent to the user." An agent, either maliciously or is just too helpful, decides to go and send this, um, invoice to a user. Now, the question becomes, who is making this request? Was this Alice, or was this the agent? We don't know. There's nothing to

[3:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=222s) determine that in reality. Um, so what else is wrong with this picture? Um, there's a lot of issues with having all of these, uh, credentials l- laying around. So, uh, whenever users use these, uh, access tokens, um, they're not really attributed to anything. So, uh, Alice can quite easily take this a- access token and put it on, on her own personal machine. Uh, and then you kind of lose all of that, uh, corporate infrastructure that might protect it from abuse. Um, there is no easy way to revoke these credentials, so they kind of lay there

[4:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=252s) and can be abused. Um, agents, as, uh, they want to do more things, we give them more credentials, and they start aggregating them. And again, because they're kind of non-deterministic, we don't really know what they're gonna do with those access keys. And finally, we arrive at the old problem of service accounts. Again, they just overprivileged bucket of permissions. Um, and, uh, re- reality is, like, we've been okay with the status quo, uh, in the industry before agents. Because we kind of relied on the software building released in a secure way, we thought about it as something that developers take care of, so we kind of

[4:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=282s) accepted the risk. Agents changed all of that because now we live in a world where there's this other actor that can behave on behalf of you. I always use this analogy. Like, in almost every company I worked at, uh, we have this thing when we would walk around and see if one of your colleagues left their, uh, laptop unlocked, and we would go to the Slack and be like, "I'm buying donuts for everybody today." And back then, we knew that that is not a good thing. So that we, we play this game, we will lock the machine down, uh, and then we would never do it again. But agents are basically doing this all the time. We just let them, uh, rampant with our credentials and do this all the

[5:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=312s) time. So, um, we need a better solution to do this. And, uh, funnily enough, technology to solve some of these problems existed for f- many, many years. We just didn't have incentive to kind of, um, spend time how to implement this properly. Um, so instead of Alice, uh, going trying to figure out where to get access tokens, uh, which is also terrible u- user experience. You can kind of think like, "Why, why do I need to go and fetch these credentials?" Um, why wouldn't we have agents, um, that basically can advertise how to get access to them and then embedding to the

[5:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=342s) client's ability to go and request that authorization from some external system? And then we can issue this kind of dynamic, uh, credentials that are scoped to that specific interactions, that are limited to the tool that was using it. Uh, and whenever it's done, it's finished. And OAuth as a technology allows us to do this. Um, and when you think about this, um- We kind of solved authentication for users, um, long time ago. But then for software, we decided that that's not really a requirement. Um, but we need to change this, uh, and we need to also use technologies that we have available to us to make agents

[6:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=372s) authenticate before we issue them any credentials. So we can use things like workload identity federation. There's other mechanism. We can use private key authentication, you can use certificates, you can, you can use URL-based, uh, authorization. Uh, the mechanism doesn't really matter as long as you use it and make agents authenticate to the systems. And funnily enough, once you do that, then you can just kind of repeat the same pattern. Instead of giving these agents, uh, kind of service accounts and adding, like, persistent permissions to those service accounts, why don't they just every single time they want to talk to some remote s-

[6:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=402s) uh, server, kind of determine what authorization is required, go to this remote service, obtain the token, and go forth? And, um, the only difference between agents and traditional software that we have that I mentioned is that reasoning loop. If you take that out of equation, both the legacy software and agent is just software. So again, you can just reuse the same pattern for the application that you're writing now, um, and nothing changes, and you can kind of go and, um, re-implement the entire stack this way. So that sounds easy,

[7:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=432s) so why we didn't do this before? Well, all of this kind of becomes way, way, way trickier to do when we think about this problem at scale. Um, there isn't, like, one API that we have. There is, like, hundreds of APIs that we have, and they use different ways to authenticate users. Behind those APIs, there is always some sort of authorization server that needs to authenticate the user. So in a previous picture that we had, we had, like, one block that we would have to authorize against. Now we have clients who need to do this across, like, hundreds of these services. Um, and there isn't, like, one agent type.

[7:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=462s) Um, we're gonna have, like, uh, agents that you buy, uh, so your cloud codes; agent that you build. Uh, sometimes you won't be able to, like, change that software, so we need to find a way how we're gonna do this. And, and there isn't, like, one hub. So now we need to persist this kind of delegation flow and verify how are these agents gonna talk to other agents, and how many hubs there can be in that loop. And finally, like, the biggest problem that we have is the attribution of, like, who decided to make this action. So we now have, like, thousands of users who need to consent to these

[8:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=492s) arbitrary actions that agents are doing. So at scale, now we have to solve all of these problems altogether in order to make something useful, uh, for us. So in summary, um, if we want to have a proper agent authentication system, what do we need to deliver? So first of all, we need agent identities. We need a system that's gonna issue these identities per agent. Uh, then that might even be per session, um, but that must be separate from whoever launched it. Then we need to be able to express this delegation, uh, semantics. So we need to be able to say

[8:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=522s) which users are authorized to perform actions with these agents, which agents can act on behalf of other users. We need to have a system that can, uh, issue scoped and short-lived credentials for everything that we do, um, and there cannot be, like, any master key that allows us to do this. Um, second, as I mentioned, there is, like, hundred different systems that they already have. We cannot magically hope we can rewrite them all. LLMs are fast, but not that fast. Uh, so we need to be able to build a federated trust of identities across them and allow to trust

[9:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=552s) each other when they exchange these systems. And again, we're gonna have legacy software forever. Um, you won't be able to kind of go and hope that they will be supporting OAuth anytime soon. So we need to be able to kind of have an adaptive layer, a broker, that allows us to securely exchange those legacy credentials just in time. Um, and finally, you need to be able to express this with policies. Um, someone needs to be able to write which, uh, actions need human approval, which agents can run automatically. Um, and things will go wrong, so,

[9:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=582s) um, in order for us to learn, uh, how to improve things, we need audit. Um, we need to be able to say who authorized this request and who made this possible. Um, so, um, there is a lot of steps to actually get this right. So, um, what I want to show you here is just, like, if you take one interaction between agent and MCP server, just to get this working, um, you will have a client and a server. Um, server needs to be able to publish this information. Cl- clients need to be able to discover it. Then the agents

[10:12](https://www.youtube.com/watch?v=58ulJViGFgU&t=612s) need to be able to obtain these credentials. They need to be able to authenticate themselves to this remote server. Um, then when that happens, uh, the MCP server has to be able to validate if those credentials been, been correctly signed. They need to check if the issuer is trusted. They need to verify those tokens. Um, then there is some policy that needs to come into action. They need to enforce if the latest rules, uh, are in play. Um, once that happens and they communicate to external system, uh, they might need to obtain additional credentials to talk to it. Uh,

[10:42](https://www.youtube.com/watch?v=58ulJViGFgU&t=642s) and finally, we need to make sure that every single one of these actions is captured in a audit log. Um, raise of hands, who thinks LLMs can do this, uh, every single time perfectly?

[10:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=654s) All right, uh, I think we're all in agreement. Um, so this is not simple, but we have solved similar problems before, right? Like, we've written shared libraries, we've written middleware, we've written SDKs in order to kind of write these things once, verify with larger group of people if those performing, um, uh, properly, and kind of reuse them all the time, um, which sounds like a solution to what we want to do here. Um, but what are the problems with SDKs? So, um, it's easy to write them these days, but you need to get them adopted by everybody, right?

[11:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=684s) Like, if you have gaps in your, uh, adoption, then, well, what's good are your SDKs? Um, then you need to write them for every single language that you have, and LLMs are probably good at writing some of these languages, but probably not the older ones that you have in your system. Uh, and then what do you do about your cloud codes, your codecs that you cannot go and modify, right? Like, SDKs won't help you there too much. Um, then if you're gonna have bugs, because, A, LLMs make bugs, we write bugs, um, in order to fix that, you not only have to fix the SDK, but then you need to track where is this

[11:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=714s) SDK used and which one of the systems consumed it. Um- And then finally, so all of these previous four problems existed before, so that's nothing new, but agents have additi- additional problem. As I said, they kind of act, um, and trying to be too optimistic, or they can be kind of manipulated to do things, and they proved to be very persistent in trying to bypass our controls. So, um, do we really trust with using just kind of client-side code to be able to manage these credentials securely? Of course, they can cache them, they can store them properly, but if they figured out

[12:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=744s) that there is credential that they can use, as long as it's within their own kind of execution environment, we have a problem. Um, so SDKs clearly are not gonna solve this problem for many reasons, and additionally, they don't solve the problem of hiding credentials from agents. So i- if we take this picture, um, the challenge that we want to do is to get all of these tokens out of the reach of the agent. Um, so, um, what can we do? Well, let's try to move all of these credentials out of this execution environment and put them in some sort of, um,

[12:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=774s) secure enclave. So, uh, we can have our kind of runtime authorization system, uh, vaulting service that can store and kind of broker all these credentials. Um, and then the other problem is now how are we gonna make use of them? Um, so gateways are something we've used in the past, and they can solve this problem for us. So agents, uh, can communicate through the gateway, uh, can request, um, specific target to talk to GitHub, for example. Uh, and a gateway can authenticate who's calling it, talk to our runtime authorization server, validate that

[13:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=804s) policies are in play, and fetch the specific credential. Uh, and then they can simply inject them into the request path and send it forward to GitHub. And what that gives us is now we have like a physical control layer where there's simply no way for this agent to obtain this credential unless it's gonna be very deterministic and go try to hack our gateway or even worse, our authorization service. Um, but what most importantly, we get couple more properties out of this. Even if we use short-lived credentials, um, they will

[13:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=834s) have some sort of expiry time, right? And we still haven't figured out how to do, uh, revocation probably across distributed systems. But if you use gateways and you force all of your communication through that point, you can, uh, have instantaneous revocation because gateway can check every single request on the fly. Um, additionally, agents will do too much. Uh, a lot of these legacy services won't be able to, um, scope access properly. Uh, they will have tokens that allow you either admin, read, or write permissions, but that isn't good enough, right? Like, we want to be able to say, "Hey, you can

[14:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=864s) read my email, but you cannot send my email." Um, with the gateways, because we can intercept and more, i-importantly introspect all of the requests, um, we can attenuate that request. Um, we can say, "For this specific request, yes, y- there is a secure credential we're gonna use, but if you're trying to send request, we'll just gonna block it." Um, we also get more observability, um, because the gateway is on a network path, we can see exactly what happens, uh, uh, for all the requests. Um, and we don't need to change anything

[14:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=894s) in our downstream services. But there's nothing f- uh, for free in life, um, so gateways also come with some challenges. Um, well, you're adding another hop to your call. Um, so if you, uh, really careful about your latencies, that's gonna add some, uh, to it. Um, well, you need to force all of your agents to talk to your gateway. Um, if they can go bypass it, and if you don't have strong network controls, then that's not gonna help you. Additionally, some agents wants to, um, have kind of local tool execution, so you're not really guarding against that. Um, there is nothing gateway

[15:24](https://www.youtube.com/watch?v=58ulJViGFgU&t=924s) does about your identity problem. Um, yes, agents still need to get some sort of, uh, authentication credentials and present it to the gateway in order to have a correct authenticated requests. Um, you're also putting a big target on this one thing that you're creating, uh, because now w- what are we saying is, like, every single credential will go through it. So, well, some people will go try, try to hack it for you. Um, there is a lot of technical complexities with building gateways, uh, some people call them proxies as well. Uh, TLS is one of those things. Uh,

[15:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=954s) if you try to intercept that and try to work with all of these systems, um, you might run into some problems. Um, and finally, um, if you're running distributed system, you have all of these developers building, um, agents, they need to figure out how they're gonna configure the, the routes, the policies, the connectors in all, all of those gateways, right? That still someone has to say, uh, if, uh, agent A can talk to agent B via the gateway. Um, and two, someone has to run it. Um, so these are all the problems we have with gateways. Um, so

[16:25](https://www.youtube.com/watch?v=58ulJViGFgU&t=985s) what do we do at Keycard? We think about all of these problems all the time. Um, so we don't think, um, it's, it's sensible for everybody to replicate all of these functionalities, so we've b- built a single control plane, um, that allows you to both give your agents identities. We issue tokens, uh, in, and federate with everything that you have going on. Um, we provide you policies and audit, um, to all of your requests. Um, you can get from us all of the client SDKs that allow you to do, uh,

[16:54](https://www.youtube.com/watch?v=58ulJViGFgU&t=1014s) injection and discovery. We provide you with service SDKs that you don't have to worry about how they're being authenticated. Um, we also give you gateway, uh, if you really want to have those controls. But fundamentally, um, you can bring all of these components to us, um, and kind of pick and choose which one of these capabilities you need to build your system because you might be building a chat application, you might be building a complete, uh, orchestration platform. Um, we are fairly unopinionated on the problem you're trying to solve with agents. We're just trying to help you solve these in a secure fashion.

[17:25](https://www.youtube.com/watch?v=58ulJViGFgU&t=1045s) Um, so if you take anything out of this talk, uh, and want to come talk to us, um, agent auth isn't option- optional anymore. Uh, yes, we kind of managed to survive without this for decades, but, uh, agents proved themselves recently that, uh, they cannot be trusted. Uh, reality is messy, so even if you go on a mission of trying to build some of these components, uh, make sure that you use open standards, uh, and to be interoperable with other systems because, um, we're not gonna win this game, uh, by playing, uh, alone. Uh, and then really, really don't YOLO it,

[17:55](https://www.youtube.com/watch?v=58ulJViGFgU&t=1075s) uh, because LLMs won't be able to implement this for you. Um, and make sure that whatever you do, check if the code written to implement these, uh, capabilities is secure. Um, thank you. Um, if you want to find out about us, come to the booth. We're Keycard AI. Uh, also check out agentbaseline.org. We have recently, uh, kind of released, uh, a software, uh, factory reference implementation of all of the capabilities that you've seen here, so you can kind of learn and come and work with us on how to solve these, uh,

[18:25](https://www.youtube.com/watch?v=58ulJViGFgU&t=1105s) problems. That's

[18:34](https://www.youtube.com/watch?v=58ulJViGFgU&t=1114s) it.
