Join our Newsletter — 33% off our NHI Course

Are session-scoped controls enough for AI agent credentials?

 

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

TL;DR: Persistent secrets and shared accounts leave AI agent access too broad, according to WorkOS. Session-scoped authorisation narrows revocation, attribution, and blast radius when agents act at runtime.

Editorial analysis by NHI Mgmt Group, based on content published by WorkOS: “How to manage API keys, tokens, and secrets for AI agents”.

By the numbers:

  • Nearly 29 million new hardcoded secrets were found in public GitHub commits in 2025, and commits made with AI coding assistance leaked at roughly double the base rate.

Key questions

Q: Why do shared service accounts create risk for AI agents?

A: Shared service accounts hide which agent made a request, so they collapse accountability and make incident response slower.

Q: How can security teams know if agent skill controls are actually working?

A: Look for evidence that skills are inventoried, risk rated, scanned before execution, and tied to a policy manifest or approval record.

Q: What breaks when AI agents keep standing credentials?

A: The access model breaks because the agent can continue acting after the human has moved on, the workflow has shifted, or the original approval is no longer relevant.

Practitioner guidance

  • Audit agent-held credentials by task scope Inventory every API key, OAuth token, service account, and certificate currently reachable by an agent.
  • Replace raw token storage with managed connections Keep downstream service credentials server-side and let agents request scoped access tokens at runtime instead of storing reusable secrets inside the agent.
  • Enforce session expiry as the default revocation point Grant access only for the duration of an approved task session, with access checks on each tool invocation.

Bottom line: AI agent credential management fails when teams reuse persistent secrets that were built for predictable software, not runtime decision-making.

Glossary terms: Object-Scoped Authorisation, Identity Blast Radius, Delegated authority provenance, Downstream credential shielding

Explore further

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


This topic was modified 3 weeks ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21330
 

Session scope is the missing control boundary for AI agents: credential lifecycle logic built for stable software does not survive runtime decision-making. An agent can query one system, act in another, and chain those actions inside a single task. The implication is that authorisation has to be tied to task execution, not just identity issuance.

A few things that frame the scale:

  • DeepSeek alone generated 113,000 new exposed API keys in 2025, illustrating how new AI providers create credential exposure before security guardrails catch up, according to the State of Secrets Sprawl 2026.

A question worth separating out:

Q: What is the difference between storing secrets securely and governing them well?

A: Secure storage protects where the secret sits. Governance adds ownership, exposure history, lifecycle state, and dependency awareness so teams can decide when a secret should be rotated, revoked, or retired. In practice, the second problem is harder and more important, because it determines whether the secret is still usable by an attacker.

👉 Read our full editorial: How AI agent credential management fails without session scope



   
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.