World's Fair 2025
How to Secure Agents using OAuth — Jared Hanson (Keycard, Passport.js)
Overview
This talk addresses the critical need for robust security in AI agents by advocating for the adoption of OAuth 2.0. It highlights the current security risks associated with broadly scoped, long-lived API keys used by agents and proposes OAuth as a solution to transition from static secrets to dynamic, delegated access. The discussion emphasizes that while OAuth is complex, its core principles are straightforward and essential for securing increasingly connected and useful AI agents.
Who should watch
- AI Engineers
- Product Managers
- Builders of AI applications and agents
- Those concerned with agent security and access management
- Developers working with MCP (Meta-Communication Protocol)
Key takeaways
- Connected agents are more useful, but broad access introduces significant security risks, often managed with static API keys.
- OAuth 2.0 provides a standard protocol for delegated authorization, allowing applications (clients) to access resources (APIs) mediated by an authorization server.
- OpenID Connect is an identity layer on top of OAuth, standardizing user information and introducing ID tokens for authentication.
- Early MCP specifications lacked proper authorization, and initial attempts to integrate OAuth were problematic, treating MCP servers as both resource and authorization servers.
- The latest MCP draft separates the OAuth authorization server from the MCP server, simplifying security for MCP server developers by focusing on token verification.
- Future security needs include agent-to-agent communication using flows like client credentials, agent identity management through dynamic client registration or public clients, and agent attestation for secure LLM interactions.
- Transactional authorization, moving beyond coarse-grained scopes to more dynamic, transaction-specific permissions, is crucial for financial and commercial agent use cases.
- Ensuring chain of custody and end-to-end visibility in agent-to-agent communication, along with handling asynchronous interactions and securing voice/video interfaces, are key areas for future development.
Notable quotes
*Agents that are more connected are more useful.*
*We can give agents broad-based access and accept security risks or we can limit their capabilities and sacrifice business value.*
*The main benefit flows to the APIs. They don't have to care about anything to do with authentication anymore.*
Unofficial community note. Prefer the recording for nuance.