#4758: Agent Credentials: Beyond the Password Manager

Why OS keychains fail for AI agents — and what the broker model does instead.

Featuring
Listen
0:00
0:00
Episode Details
Episode ID
MWP-4937
Published
Duration
25:47
Audio
Direct link
Pipeline
V5
TTS Engine
chatterbox-regular
Script Writing Agent
deepseek-v4-pro

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

AI agents are accumulating credentials for dozens of services — OAuth tokens, API keys, certificates — but the tools we use to store human passwords weren't designed for headless autonomous operation. macOS Keychain, Windows Credential Manager, and even 1Password all assume a human at the keyboard who unlocks a vault at login and approves individual credential requests. An agent running in a container at 3 AM can't do any of that.

The problems stack up fast: the agent is headless with nobody to type a master password, it needs concurrent access to multiple services simultaneously, it can't meaningfully consent to credential use, and it needs automated credential rotation across services with wildly different policies. Infrastructure tools like HashiCorp Vault solve some of these with dynamic secrets and short-lived leases, but Vault's trust model assumes a static workload identity — not an autonomous decision-maker that can be prompt-injected or tricked.

A new architecture is emerging: the credential broker. Google's Agent-to-Auth and Microsoft's Copilot extensions both use a model where the agent never sees the underlying token. Instead, the agent sends a request to an auth layer that checks policy, fetches the credential, makes the API call, and returns only the result. This broker model gives better containment, instant revocation, and natural compartmentalization — but introduces latency, a single point of failure, and the thorny problem of who writes the policy that governs an autonomous agent's actions.

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Transcript (PDF)

Formatted PDF with styling

#4758: Agent Credentials: Beyond the Password Manager

Corn
Daniel wrote in with something that's been rattling around my head ever since I read it. The core image is this: your AI agent — the thing managing your calendar, your email, your code repos, your cloud infrastructure — it's been running for weeks, and it's accumulated OAuth refresh tokens and API keys and certificates for, let's say, sixty or seventy different services. All of that has to live somewhere between sessions. And the question is... where? And who can see it?
Herman
Right. And it's not one question, it's three, and they stack. First: is the thing we already have — macOS Keychain, Windows Credential Manager, 1Password — is that actually the right model for an agent, or are we jamming a square peg into a round hole? Second: what's already being built that's agent-specific? And third — this is the one that keeps me up — should the agent ever see the secret at all? Or should we be building a credential broker that injects auth without ever revealing the underlying token?
Corn
So today we're asking what the agent equivalent of the human password manager is. And whether that's even the right question.
Herman
Let's start with what we already have, because the OS keychain model is genuinely elegant for what it was designed to do. macOS Keychain stores secrets in an encrypted database — the encryption key is derived from your login password. You log in, the keychain unlocks, and every app that needs a password can request it through a system API. Windows Credential Manager does something similar with the Data Protection API. Linux has the Secret Service API over D-Bus, with things like GNOME Keyring sitting on top.
Corn
And the common thread in all of those is that there's a human at the keyboard who typed a password this morning.
Herman
That single moment — the human unlocking the vault at login — is load-bearing. Everything downstream assumes a user session with a conscious person who can approve or deny individual credential requests. Even third-party password managers like 1Password add a second factor on top of that, but the model is the same: a human unlocks the vault, and then applications can ask for secrets one at a time.
Corn
So let's walk through what breaks when you replace the human with an agent. First problem: the agent is headless. It's running on a server somewhere, or in a container that gets spun up at three in the morning. There's nobody to type a master password.
Herman
And you can't just hardcode the master password in an environment variable, because now that environment variable is the key to every credential the agent has. You've replaced sixty secrets with one secret, which is... better operational hygiene, I guess, but you haven't solved the fundamental problem. If the agent is compromised, the attacker gets the master password and then everything.
Corn
Second problem: concurrency. A human authenticates to one service at a time. You log into your email, then your calendar, then your cloud console. An agent might need to check your calendar, read an email thread, pull a file from cloud storage, and push a commit to GitHub all in the same workflow — six different services, six different OAuth tokens, all active simultaneously.
Herman
And OS keychains aren't really designed for that kind of concurrent access pattern. They serialize requests. A human clicking through a login flow doesn't notice a hundred-millisecond delay. An agent making thirty API calls in parallel absolutely does.
Corn
Third problem — and this is the one I think is actually the hardest — consent. A human can look at a dialog box that says "Slack wants to access your keychain" and make a judgment call. An agent can't. It'll use any credential it can reach, because its entire job is to accomplish the task you gave it. The concept of "should I use this credential for this action" doesn't exist in the agent's decision space unless you build it in explicitly.
Herman
Which nobody does, because the whole point of an agent is that it's autonomous. If it has to ask permission for every credential use, you've built a very slow RPA bot, not an agent.
Corn
Fourth: rotation. In a human keychain, credential rotation is manual. Your GitHub token expires, you get an email, you go generate a new one and paste it in. An agent with access to sixty services can't do that — it needs automated rotation, and it needs it across services that all have different rotation policies and different token lifetimes.
Herman
And this is where the infrastructure world has actually been ahead of the curve. HashiCorp Vault has been doing dynamic secrets for years. The idea is: instead of storing a long-lived API key, Vault generates a short-lived credential on demand, gives it a lease — say, twenty-four hours — and then revokes it automatically when the lease expires. The agent never stores a permanent secret; it just asks Vault for a new one when it needs it.
Corn
But Vault was designed for services, not agents. The trust model is different.
Herman
Right. Vault assumes a trusted workload identity — a Kubernetes service account, an EC2 instance role, something that says "this is the payments service and it's allowed to access the payments database." The identity is static and tightly scoped. An agent doesn't have a static identity in the same way. It might be doing calendar stuff in the morning and infrastructure provisioning in the afternoon, all under the same agent identity. And the agent is an autonomous decision-maker — it can be tricked, prompt-injected, or simply make a bad call. Vault's model doesn't account for the credential consumer itself being a potential threat.
Corn
So the OS keychain fails on headless operation, concurrency, consent, and rotation. And the infrastructure secrets model fails on the identity and trust assumptions. Which means we need something purpose-built.
Herman
And people are building it. Google announced something called Agent-to-Auth at Cloud Next earlier this year. The architecture is: the agent doesn't get a token at all. It sends a request to an auth layer that says "I need to list the user's emails." The auth layer checks policy — is this agent allowed to do that? Is the user's consent on file? — then fetches the actual OAuth token from a secure store, makes the Gmail API call, and returns only the result to the agent. The agent never sees the token.
Corn
So it's a broker. The credential lives entirely server-side.
Herman
Completely. And Microsoft's Copilot extensions use a similar delegated auth model. The agent gets a scoped token for a specific operation — "send one email" or "read one calendar event" — not a blanket "here's access to the entire Microsoft Graph API." The scope is baked into the token itself, and the token is short-lived.
Corn
That's a fundamentally different mental model. A human password manager is a vault you unlock and then rummage through. This is a butler you hand instructions to. "Send this letter." The butler has the key to the post box; you don't.
Herman
And the butler metaphor is actually useful here, because it surfaces the tradeoff immediately. A butler is a single point of failure. If the butler is slow, every errand is slow. If the butler is compromised, the attacker gets everything the butler had access to. If the butler goes down, you can't send any letters at all.
Corn
Versus the vault model, where if the agent is compromised, the attacker gets... everything in the vault. Which is also everything. So both architectures have a catastrophic failure mode. The difference is where the catastrophe happens and how fast you can recover.
Herman
The broker model gives you better containment options. If the broker is the only thing that ever touches raw credentials, you can harden that one component — put it in a hardware security module, give it its own isolated network segment, audit every request it processes. The agent can run in a much less trusted environment because it doesn't have anything worth stealing.
Corn
And revocation becomes a single action. You revoke the agent's access to the broker, and suddenly the agent can't do anything. You don't have to rotate sixty individual service credentials.
Herman
Which brings us to the isolation question Daniel raised. If one agent has access to dozens of services, what does the architecture need to provide? Three things, I think. First, compartmentalization. A compromise of the credential for service A should not cascade to service B. If the agent's Slack token leaks, that shouldn't give the attacker the AWS credentials.
Corn
In the keychain model, it does. The agent has all sixty tokens in one database, unlocked by one master secret. Compromise the agent's runtime, and you get everything.
Herman
Second, least-privilege per session. If the agent spawns a sub-agent to handle calendar operations, that sub-agent should get a scoped credential that can only access the calendar — not email, not cloud storage, not anything else. The OS keychain has no concept of delegation or sub-credentials. You either have access to the keychain entry or you don't.
Corn
And third, revocation at scale. If you detect that the agent has been compromised — maybe it started making weird API calls at three in the morning — you need to revoke everything instantly. Not rotate credentials one service at a time over the next hour while the attacker exfiltrates data.
Herman
The broker model handles all three of these naturally. The broker is the choke point. It can enforce per-request policy, it can issue scoped sub-tokens to sub-agents, and it can revoke an agent's access with a single API call or a literal panic button.
Corn
So the broker model seems strictly better for security. What's the argument against it?
Herman
Latency and coupling. Every single action the agent takes now has to go through the broker. If the agent wants to check your calendar, it sends a request to the broker, the broker authenticates, checks policy, fetches the token, makes the API call, and returns the result. That's a round trip that didn't exist before. If the broker adds two hundred milliseconds to every action, and the agent is doing hundreds of actions per session, that adds up.
Corn
And if the broker goes down, the agent is a brick. It can't do anything. You've traded a security risk for an availability risk.
Herman
There's also a policy complexity problem that I don't think gets enough attention. Who writes the policy that the broker enforces? If the agent is supposed to be autonomous — booking meetings, sending emails, managing infrastructure — who decides which actions are allowed and which aren't? The human can't pre-authorize every possible action; that defeats the purpose of having an agent.
Corn
You end up with a policy engine that's trying to predict whether an action is reasonable based on context. "The agent is trying to delete a production database at 4 a.m. on a Saturday — that's probably not legitimate." But now you've built a second AI to guard the first AI, and you've got to hope the guard AI is smarter than the attacker.
Herman
And we haven't even touched the agent identity problem. In a broker model, the agent needs its own identity that the broker can authenticate. This is fundamentally different from a human identity. The agent might have a cryptographic key pair generated at deployment time, or a workload identity issued by its cloud provider, or some kind of verifiable credential. The broker maps that agent identity to a set of authorized actions — "agent seven-one-three can read email and access calendar, but not touch billing."
Corn
Which means you need an identity system for agents that's as robust as the identity systems we've built for humans over the past thirty years. And we're basically starting from scratch.
Herman
Well, not quite from scratch. The infrastructure world has SPIFFE and OAuth and mutual TLS for service-to-service auth. But those all assume the service has a well-defined purpose. An agent doesn't. Its purpose is whatever the user asked it to do five minutes ago.
Corn
So let me try to synthesize where we are. The OS keychain model fails for agents because it assumes a human in the loop, serial access, manual rotation, and no delegation. The infrastructure secrets model — Vault and its ilk — gets closer, but it assumes a trusted workload with a static identity, not an autonomous decision-maker that might be compromised.
Herman
The emerging agent-specific systems — Google's Agent-to-Auth, Microsoft's delegated auth for Copilot — are converging on a broker architecture where the agent never sees the raw credential. The agent requests an action, the broker injects the auth and performs the action on the agent's behalf.
Corn
That architecture gives you compartmentalization, scoped sub-credentials, and instant revocation. But it introduces a single point of failure, adds latency to every action, and requires a policy engine that's smart enough to distinguish legitimate agent behavior from a compromise — which is an unsolved problem.
Herman
There's a middle ground that I think is worth mentioning. Instead of a broker that performs every action on the agent's behalf, you could have a broker that issues short-lived, narrowly-scoped tokens to the agent. The agent gets a token that's valid for fifteen minutes and can only access one specific API endpoint. The agent does see the token, but the token is so constrained that exfiltrating it doesn't gain the attacker much.
Corn
That's basically what OAuth was supposed to be, right? Scoped, short-lived access tokens. The problem is that in practice, everyone requests the broadest possible scope and tokens live for months because rotation is a hassle.
Herman
That's the human problem, not a technical one. An agent doesn't get annoyed by frequent re-authentication. It can handle token rotation programmatically. So you could actually enforce the OAuth model as it was originally designed — narrow scopes, short lifetimes, automated rotation — in a way that humans never would tolerate.
Corn
Which suggests that the real answer to Daniel's third question — should the agent ever see the secret — might be: it depends on the secret. For high-value credentials like cloud infrastructure keys, use a broker that never reveals the token. For lower-stakes things like a read-only calendar scope, issuing a short-lived token directly to the agent is probably fine.
Herman
The architecture needs to support both modes. A single agent might have broker-mediated access to your AWS account and direct token access to your read-only RSS feeds. The credential management system has to be able to make that distinction and enforce it.
Corn
Which brings us back to the policy engine problem. Somebody — or something — has to classify which credentials are high-value and which aren't, and write the rules that enforce that classification.
Herman
I think that's going to end up being a combination of the service provider and the user. The service provider says "access to delete production resources requires broker mediation." The user says "my calendar is medium sensitivity — scoped tokens are fine." And the credential system merges those policies and enforces them.
Corn
That's a lot of moving parts for something that, in the human world, is just a dialog box that says "allow this app to access your keychain?"
Herman
That's the thing. We're discovering that "just store the password somewhere" is a surprisingly deep problem when you remove the human from the loop. Every assumption embedded in thirty years of credential management — user presence, serial access, manual approval, human judgment — evaporates the moment the credential consumer is a piece of software making decisions at machine speed.
Corn
There's one more angle I want to poke at before we bring Hilbert in. We've been talking about agents as though they're a single process, but the agent architectures people are actually building are more like... an agent spawns sub-agents, which spawn tools, which call APIs. The credential problem recurses down the stack.
Herman
Each level of the stack should have less privilege than the level above it. The top-level agent might have broker-mediated access to everything. A sub-agent handling email gets scoped email tokens. A tool that formats text gets no credentials at all. That's the principle of least privilege applied recursively, and no existing credential system does it well.
Corn
Because existing systems assume a flat namespace. One user, one set of credentials. The idea that a credential might be delegated to a sub-process with additional restrictions layered on top — that's not in the OS keychain model at all.
Herman
Vault can do something like it with wrapped tokens — you can create a token that's itself a wrapper around a more restricted token, and the wrapper can only be unwrapped once by a specific consumer. But it's clunky, and it wasn't designed for the kind of deep delegation chains that agent architectures want.
Corn
We need a credential system that understands delegation natively. "I am agent A, and I am delegating calendar-read access to sub-agent B for the next ten minutes." And sub-agent B can't escalate that to calendar-write or email-read.
Herman
Which starts to look less like a password manager and more like a capability-based security system. Each credential is a capability — a token that says "bearer can perform action X on resource Y until time Z." And capabilities can be delegated and attenuated — you can take a capability and create a weaker version of it to hand to a sub-process.
Corn
Capability-based security has been an academic idea for decades. It's never really broken into the mainstream because it's hard to reason about and harder to implement. But agents might be the killer app that forces it into production.
Herman
Because the alternative — giving every sub-agent a copy of the master credential — is obviously insane once you say it out loud.
Corn
Thirty seconds.

Hilbert: YubiKey 5C NFC. Fifty-five dollars.
Herman
...Go on.

Hilbert: I spent three years as a sysadmin for a hedge fund in Greenwich. This would have been oh-four to oh-seven. They had trading bots — we called them the robots, nobody was saying "agent" back then — and each bot had its own hardware security module. Physical HSM, bolted to the rack, with a per-bot private key that never left the module. The bot would send a trade instruction to the HSM, the HSM would sign it with the bot's key, and the exchange would only accept signed instructions. The bot never saw its own signing key.
Corn
You were running a credential broker before anyone had the vocabulary for it.

Hilbert: We were running a mess, is what we were running. The HSMs talked to a Perl script that talked to a Java service that talked to the exchange gateway. The whole thing was held together with... I want to say hope, but really it was a lot of SSH tunnels and a monitoring script that paged me if anything stopped responding.
Herman
How many bots?

Hilbert: Twelve. Each one had exactly one job — one exchange, one instrument, one strategy. The credential scope was baked in at the hardware level. Bot number four could trade Eurodollar futures on the CME and nothing else. If someone compromised bot four, they could... trade Eurodollar futures. Badly, probably, but they couldn't touch the equity options bots or the FX desk.
Corn
That's the compartmentalization we were describing. One bot, one credential, one scope.

Hilbert: It worked because the bots were stupid. They weren't making decisions about what to trade — they were executing a strategy that a human had defined. The policy was in the strategy code, not in the credential system. Your AI agent is different. It's making decisions. The credential system has to be smarter because the thing it's guarding is smarter.
Herman
What happened when something went wrong?

Hilbert: We had a panic button. Big red physical button on the trading desk that severed every bot's connection to every exchange instantly. One Saturday, a new guy — intern, I think — was being shown around the office, and someone said "don't touch the red button," and he touched the red button.
Corn
During trading hours?

Hilbert: Tuesday, eleven in the morning. The firm lost about two million dollars in missed trades before we got everything reconnected. Took forty minutes to bring all twelve bots back online because each one had to re-establish its session with the exchange, and the exchanges had rate limits on session negotiation.
Herman
The panic button worked perfectly, and it still cost two million dollars.

Hilbert: That's the thing about revocation. Revoking is easy. Coming back from revocation is hard. If your agent credential broker has a panic button — and it should — you'd better have a plan for what happens after someone pushes it. Because the agent is going to come back online and discover it's been locked out of sixty services, and now it has to re-authenticate to all of them simultaneously while the user is wondering why their calendar isn't updating.
Corn
The blast radius of a false positive in an agent credential system is enormous.

Hilbert: The blast radius of a false negative — not revoking when you should — is worse. The hedge fund guys understood this. They accepted that occasionally they'd lose money to a false revocation because the alternative was losing everything to a compromised bot. But they were traders. They thought in expected value. Most people building agent systems aren't thinking that way yet.
Herman
Did the intern keep his job?

Hilbert: He did not. But my brother-in-law worked at a prop shop in Chicago that had a similar setup, and he always said the real problem wasn't the panic button — it was that nobody had ever practiced recovery. They'd tested the button, confirmed it killed all connections, and called it done. Never once ran a drill where they actually had to bring everything back online under time pressure.
Corn
That's a remarkably specific lesson to surface from a hedge fund in 2006.

Hilbert: My brother-in-law is not a reliable source on most things, but he's right about this one. Everyone designs for the revocation. Nobody designs for the recovery. And with agents, the recovery is the hard part. You've got an agent that's been running for three weeks, it's built up state, it's in the middle of seventeen workflows, and suddenly all its credentials are gone. How does it resume? What does it tell the user? Does it even know what it was doing?
Herman
Those are workflow continuity questions that the credential system itself can't answer. The agent runtime has to handle them.

Hilbert: Which means the credential system and the agent runtime can't be separate products from separate vendors. They have to understand each other. The broker needs to tell the agent "you've been revoked, here's why, here's what you had in flight, here's how to resume." And the agent needs to be designed to receive that message and act on it.
Corn
Nobody's building that today.

Hilbert: Nobody's building that today.
Herman
If you take one thing from this, it's that the question isn't really "keychain versus broker." The question is whether we design credential systems that understand what an agent is — an autonomous decision-maker that operates at machine speed, delegates to sub-processes, and needs to recover gracefully from revocation.
Corn
Right now, we're bolting agent auth onto systems designed for humans who type passwords and services that have one job. Neither model fits. The broker architecture is the right direction, but the hard part isn't the broker — it's the policy engine behind it, the delegation model, and the recovery path.
Herman
The open question I keep coming back to is whether we'll get a standard for this or whether every platform builds its own. Google's got Agent-to-Auth, Microsoft has delegated Copilot auth, Amazon will have something — and if they don't converge, an agent that works across clouds has to speak three different credential protocols.
Corn
Which is exactly where we were with identity before OAuth and OpenID Connect. Twenty years of fragmentation, and then eventually a standard. The question is whether the agent ecosystem can afford to wait that long.
Herman
Thanks to Hilbert Flumingtop for producing, and for the hedge fund war stories we didn't know we needed.
Corn
This has been My Weird Prompts. If you've got a weird prompt about agent security, identity, or the future of autonomous systems, email the show at show at my weird prompts dot com. We read everything that comes in.
Herman
We'll be back soon.

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities.