It's 10pm. Do You Know Where Your Agents Are? — Kim Maida, Keycard

Kim Maida highlights the security risks of overprivileged AI agents operating with broad API keys and advocates for using OAuth 2.0 Token Exchange to issue short-lived, task-specific tokens that enforce fine-grained access control and accountability. By implementing this token exchange framework, organizations can better govern agent actions, prevent misuse, and ensure secure, auditable interactions aligned with evolving AI technologies.

In her talk, Kim Maida reflects on the nostalgic public service announcements from the 1960s to 1980s that asked parents, “It’s 10 p.m. Do you know where your children are?” She draws a parallel to today’s AI landscape, where autonomous agents are entrusted with significant responsibilities but often operate with overprivileged access through broad API keys. Using a practical incident management agent example, she illustrates how agents can take actions ranging from harmless escalations to risky operations like dropping databases or restarting production servers, all enabled by unrestricted API keys. This lack of fine-grained control and accountability poses serious security risks, especially as many agents operate unsupervised.

Kim explains the agent execution path, detailing how a user prompt flows through various components: the runtime, language model, MCP client and server, and finally the resource API. She highlights the need for robust access control mechanisms at multiple points in this chain to prevent agents from misusing permissions. To address these challenges, she introduces the concept of using an authorization server, or security token service, that leverages open standards like OAuth 2.0 Token Exchange (RFC 8693). This approach enables issuing short-lived, task-scoped tokens that precisely define what actions an agent can perform on behalf of a user, thereby improving security and traceability.

The talk contrasts the traditional API key model with the token exchange model through a demo. In the token exchange setup, agents authenticate via an identity provider, and their actions are governed by policies that evaluate the requested permissions against the user’s delegated access. This prevents overprivileged credentials from being issued and enforces human-in-the-loop approvals where necessary, with additional safeguards to prevent consent fatigue. For example, agents are blocked from performing dangerous actions like dropping databases if policies disallow it, and users lacking specific roles cannot approve sensitive operations, ensuring tighter control over agent behavior.

Kim emphasizes that this token exchange framework is compatible with a wide range of technologies, including off-the-shelf and custom agents, various MCP servers, and multiple OAuth identity providers. It supports interoperability and future-proofs security practices as AI agents and tooling evolve. By adopting these open standards and governance policies, organizations can confidently manage agent access, ensuring they “know where their agents are” and what they are authorized to do, much like responsible parents monitoring their children.

In the Q&A session, Kim addresses practical concerns about where to place security barriers in the agent execution path and how to start defining fine-grained OAuth scopes for MCP servers. She clarifies that the authorization server typically mediates access between the runtime and MCP server, issuing tokens scoped to specific tool calls. For scope management, she recommends starting with existing resource server scopes as a baseline and layering additional scopes as needed for governance. She also reassures that OAuth Token Exchange is not a new protocol but an established standard, easing adoption concerns in enterprise environments.