Join our Newsletter — 33% off our NHI Course

Did long-lived API keys still fit delegated identity?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20217
Topic starter  

TL;DR: Agents gain durable authority from long-lived API keys, which Kontext says makes them hard to scope or revoke at scale. Runtime authorization has to keep policy separate from resource access so revocation, audit, and scope changes remain usable.

Editorial analysis by NHI Mgmt Group, based on content published by Kontext: “The API Key is Dead: A Blueprint for Agent Identity in the age of MCP”.

Key questions

Q: Why does OAuth token exchange reduce risk compared with giving an AI agent broad access or shared user credentials?

A: Token exchange reduces risk because the agent never needs a permanent bundle of credentials or blanket permissions.

Q: How should teams govern agent access when autonomy increases?

A: Teams should govern agents as runtime principals, not as static app settings.

Q: Why do long-lived API keys create more risk for AI agents?

A: Long-lived API keys increase risk because they persist across tasks, deployments, and runtime changes.

Practitioner guidance

  • Replace standing API keys with short-lived delegated tokens Move agent access to scoped OAuth flows with token expiry, explicit consent, and revocation paths instead of static secrets in config files.
  • Separate the authorisation server from the MCP resource server Keep policy enforcement and token issuance outside the tool server so the server only validates tokens and serves resources.
  • Model each agent as a distinct software identity Give agents their own client identity, metadata, and audit trail so permissions can be assigned, traced, and retired independently.

Bottom line: Static API keys give agents durable authority that is difficult to scope or revoke, which makes them a poor fit for scaled agent deployments.

Glossary terms: Dynamic Client Registration, Bearer Credential, Delegated Identity, Runtime Authorisation

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 7 days ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20707
 

Static secrets are not an agent governance model: API keys turn every connected agent into a permanent bearer of authority, which is the opposite of how identity should behave in a delegated runtime. The article correctly shows that the problem is not just leakage, but persistence without context. That persistence defeats revocation discipline and makes agent access impossible to reason about at scale. Practitioners should treat long-lived keys as an architectural warning sign, not a convenience.

A few things that frame the scale:

A question worth separating out:

Q: What should security teams monitor after moving agents to delegated identity?

A: Security teams should monitor token issuance, refresh, scope changes, consent grants, revocation events, and unusual tool usage. Those signals show whether delegated identity is still aligned to the intended task, or whether the agent has accumulated access that no longer matches its original authorisation.

👉 Read our full editorial: Static API keys fail as agent identity shifts to runtime decisions


This post was modified 7 days ago by NHI Mgmt Group

   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.