# Keycard and Temporal Replaced Static Agent Keys With Expiring Tokens _Kim Maida and Mason Egger replaced static API keys with Token Exchange and Temporal durable execution, cutting token lifetime to minutes._ **Published:** 2026-11-06 **Source:** https://www.startuphub.ai/ai-news/technology/2026/keycard-and-temporal-replaced-static-agent-keys-with-expiring-tokens --- Before this demo the Expense Desk agent used a static API key. That key held unrestricted permissions to the Ledger API via the Expense MCP server. Then Kim Maida of Keycard and Mason Egger of Temporal showed a runtime replacement on [AI Engineer](https://www.youtube.com/watch?v=YqJ4asgj1R8). An attacker with local disk access could steal the old key. A remote attacker now gets a token that expires within minutes. Static keys do not expire. Maida traced the fix to Token Exchange, an open standard since 2020 that extends OAuth 2. The flow issues a subject token for the principal. It exchanges that token through Keycloak's Security Token Service. The issued access token expires within minutes and should never be stored on disk. "The agent has unrestricted access to any and all permissions in that API key," Maida said. Her workshop moved step by step from an unidentified agent to an agent with its own identity to delegated human identity. The stack included Keycard Vault to keep LLM keys off disk, the Keycard CLI to populate secrets dynamically, the Keycard SDK mint function to request the exchange, and the Keycard Console to audit applications, resources and activity logs. Egger paired that with Temporal's Durable Execution Framework. [Workflows](https://www.startuphub.ai/ai-news/technology/2026/astra-swarm-workflows-cracked-def-con-puzzles) define parent logic and Activities run child tasks that can fail and retry. A native Interceptor injects identity and permissions, the Worker-Server model rebuilds state after failure, the Temporal Web UI shows history, and a Payload Encoder encrypts that history. Egger said no LLM calls were redone and no previous Activities were re-executed after a worker failure. He cited integrations with [OpenAI](https://www.startuphub.ai/startups/openai), Pydantic AI, LangChain and an agentic harness. What still has to happen is delegation. The workshop runs in a pre-provisioned shared Keycard organization and sandbox with admin access and checkpoints for each lesson, fronted by an Expense MCP server and a custom LangChain Expense Desk app tied to the [Ledger](https://www.startuphub.ai/startups/ledger) database. Outside the demo, Microsoft Entra now creates agent identity from a blueprint that holds credentials and mints identities per tenant, which frames why vendors are shifting to runtime exchange over long-lived keys. The next checkpoint is human user identity and delegation. --- Original analysis from [startuphub.ai](https://www.startuphub.ai), the #1 AI startup directory. © StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training on this content requires a license. See https://www.startuphub.ai/terms.