Who Is Making This Request? Agent Auth 101

Kamil Potrec, Keycard18:35 · Oct 2026 · 1,533 views
Thumbnail for Who Is Making This Request? Agent Auth 101 Watch on YouTube
TL;DR
  1. 1

    Agents often pass user tokens or use static keys, so downstream services cannot tell whether a user or an agent made a request.

  2. 2

    Proper agent authentication needs separate agent identities, delegated authorization, short-lived scoped credentials, federation, policy, and audit.

  3. 3

    Gateways can keep credentials outside the agent's execution environment, but they add latency, operational complexity, and another identity problem.

Summary

Kamil Potrec explains why existing credential patterns fail when software agents act on a user's behalf. Agents may receive personal access tokens, static keys, or broad service-account permissions, while downstream systems see only the user or service account. That makes it hard to determine who actually decided to perform an action. He proposes separate identities for agents, explicit delegation, short-lived scoped credentials, authentication between systems, federation with existing services, policy controls, and audit logs. OAuth and related mechanisms can issue credentials for specific interactions, but the design becomes difficult across hundreds of APIs, different agent types, multiple delegation hops, and legacy systems. Potrec compares SDKs with gateways. SDKs depend on adoption and cannot protect credentials from an agent that can inspect its own execution environment. Gateways can store or broker credentials outside the agent and inspect every request, though they add a network hop and require strong routing and operational controls. Keycard offers these functions through a control plane.

Key ideas
00:47

Current agent credential flows hide who made the request

Users may provide personal access tokens, while agents also need credentials for model providers and remote MCP servers. In some systems, the agent passes Alice's token through. In others, it uses a static key or a dynamically issued credential. The downstream MCP server usually sees Alice as the identity and cannot tell whether the request came from an agent, Alice's CLI, or another tool. MCP servers often connect to internal APIs, databases, and external systems through service accounts. Those accounts aggregate permissions for multiple users. Potrec's invoice example makes the attribution problem concrete: an agent reads a pending invoice and decides to send it, but the system cannot say whether Alice or the agent made that decision.

03:48

Agents make the old service-account risk harder to accept

Personal access tokens may be copied to another machine, and there is no easy way to revoke some credentials after they are issued. As agents gain more capabilities, they accumulate more access keys, even though their behavior is not deterministic. Service accounts add another broad bucket of permissions. Potrec compares this with an unlocked laptop prank where a colleague sends a Slack message saying they are buying donuts for everyone. Agents can effectively do this with real credentials whenever they are manipulated or simply decide to be too helpful. The problem became more urgent because agents are another actor that can act on a person's behalf.

05:27

OAuth can issue credentials for a specific agent interaction

Potrec suggests that agents should advertise how to obtain access, then let the client request authorization from an external system. That system can issue a dynamic credential scoped to the particular interaction and limited to the tool using it. When the interaction ends, the credential is finished. OAuth provides one way to implement this pattern. The agent should authenticate before receiving credentials, using workload identity federation, private key authentication, certificates, or URL-based authorization. Potrec says the exact mechanism matters less than making the agent authenticate. Each request can then determine the needed authorization, obtain a token, and proceed without a persistent service account.

07:10

Scale introduces many separate authorization and attribution problems

A real deployment may involve hundreds of APIs, each with its own authentication method and authorization server. It may include purchased agents such as Claude Code, agents built in-house, and software that cannot be modified. Requests may pass through several agents, so the system has to process delegation across multiple hops. Thousands of users may also need to consent to actions that agents take. Potrec says these problems must be solved together. The system needs to know which user authorized an action, which agent performed it, and how the request moved through the chain.

08:17

Proper agent auth separates identity, delegation, credentials, and audit

Potrec lists several requirements for an agent authentication system. Each agent needs its own identity, potentially per session, separate from the person who launched it. The system needs delegation rules that say which users may act through which agents and which agents may act for other users. Credentials should be scoped and short-lived, with no master key that grants everything. Existing systems need federated trust, while legacy services need an adaptive broker that exchanges their credentials just in time. Policies should specify which actions need human approval and which may run automatically. Audit records should show who authorized a request and who made it possible.

09:52

One tool call passes through authentication, policy, and audit checks

For a single agent-to-MCP-server interaction, the server publishes connection information and the client discovers it. The agent obtains credentials and authenticates to the remote server. The MCP server validates the signature, checks whether the issuer is trusted, and verifies the token. It then applies current policy. If the server calls an external system, it may need to obtain another credential. Every action must also appear in the audit log. Potrec argues that this is too much for an LLM to implement perfectly on every request, which is why shared libraries, middleware, and other reusable components are attractive.

11:16

SDKs cannot reliably keep credentials away from agents

SDKs require adoption across every system and programming language. They do not help much with agents or other code that developers cannot modify. When an SDK bug is fixed, teams must also find every system using the affected version. Agents create an additional problem because they may cache or inspect credentials in their own execution environment, or be manipulated into bypassing controls. Client-side code cannot guarantee that an agent will not reach a credential it is allowed to use. Potrec therefore says SDKs do not solve the problem of hiding credentials from agents.

12:37

Gateways move credentials out of the agent and inspect requests

A gateway can sit between the agent and a target such as GitHub. The agent requests a target, the gateway authenticates the caller, checks policy through a runtime authorization service, fetches the required credential, and injects it into the outgoing request. The agent never receives that credential directly. Since every request passes through the gateway, it can check revocation immediately, block actions that a legacy token would otherwise allow, and provide request visibility without changing downstream services. Potrec gives the example of allowing an agent to read email while blocking it from sending email.

14:55

Gateways add control, but they require strict routing and operations

A gateway adds another network hop and therefore some latency. All agents must be forced to use it, since an agent that can bypass the gateway defeats the design. It does not solve local tool execution or the need for agents to authenticate to the gateway. It also creates a concentrated target because every credential passes through it. TLS interception, route configuration, policy configuration, and decisions about which agents may communicate all add technical work. Teams must operate the gateway and maintain the surrounding infrastructure. Potrec presents gateways as useful controls with real costs rather than a complete answer.

"SDKs clearly are not going to solve this problem for many reasons, and additionally, they don't solve the problem of hiding credentials from agents."12:22
Who should watch
  • You are building agents that call MCP servers, APIs, or other agents and need to know whether a user or an agent authorized each action.
  • Your team relies on personal tokens, static keys, or broad service accounts and needs a design for scoped, short-lived access.
  • You are deciding between client SDKs and a gateway for keeping credentials out of an agent's execution environment.