TL;DR: Akeyless details how AI agents that hold passwords or API keys can leak them, misuse them, or be manipulated into exposing them, and describes a documentation agent secured with verified identity, short-lived access and live policy checks. The core shift is that agent security depends on borrowed access being constrained at execution time, not on trusting the model or the prompt.
At a glance
What this is: NHI Mgmt Group's analysis, drawing on Akeyless's blog post: AI agent access becomes governable when identity is verified up front and credentials stay hidden at runtime.
Why it matters: IAM and PAM teams need to treat AI agents as governed actors whose access must be scoped, brokered and audited in the same way as other high-risk non-human identities.
👉 Read Akeyless's analysis of secretless AI agent access and runtime authorisation
Context
The governance gap is not whether an AI agent can complete a task, but whether its access model assumes a human-like operator behind every action. When the agent can request tools, read tickets and write documentation on its own, static credentials and broad permissions stop being a safe baseline for control.
This is a least-privilege access model problem for autonomous workflows as much as a secrets problem. The workflow described here shows why identity proofing, short-lived sessions and policy checks have to happen before the agent touches production systems.
Key questions
Q: How can AI agents connect to enterprise systems without exposing login details?
A: AI agents should use verified workload identity and brokered access so they can request actions without ever receiving the passwords, API keys or session tokens used to reach the target systems. That design limits credential theft, reduces the blast radius of a compromised runtime and makes policy enforcement possible at the point of execution.
Q: What is the difference between brokered access and direct credential use for agents?
A: Brokered access gives an agent short-lived, policy-mediated access through a service or gateway, rather than letting it hold and use long-lived credentials directly. Direct credential use means the agent stores or receives a token, key, or certificate and acts under that identity until rotation or revocation. Brokered access improves control over scope, logging, and immediate revocation.
Q: How should teams prevent an AI agent from merging its own changes?
A: Prevent this by separating code authoring from merge authority, so the agent can open a pull request but cannot approve or merge it. Enforce a live policy check on the merge path, require human review or signed approval for protected branches, and keep the agent’s token limited to write access on a fork or branch, not repository admin rights.
Q: How should security teams instrument AI agents so actions are reviewable later?
A: Security teams should capture the full decision path, not only the final result. That means logging prompts, retrieval context, tool calls, policy checks, the identity used, and the outcome for each step. If those elements are missing, the team loses both debugging evidence and audit evidence when something goes wrong.
Technical breakdown
Verified workload identity for agent sessions
An AI agent does not need a stored password or API key if the workflow can prove who is starting the run. The pattern here is workload identity: a short-lived token is issued, validated against the source system and bound to a specific repository or job. That removes the need to persist a reusable secret inside the automation path. The important design choice is that authentication happens for the workflow, not the model, and the credential expires with the task. See the Agentic AI Identity Guide.
Practical implication: Treat the job start as the authentication event and remove any reusable secret from the agent workflow.
Brokered access keeps credentials out of the agent
Secretless access means the agent requests an action, but a broker executes the privileged step on its behalf. The agent never receives the downstream credential, which means compromise of the agent environment does not automatically expose the secrets used to reach code, tickets or documentation systems. This architecture changes the attack surface from credential theft to policy enforcement, because the sensitive credential remains inside the broker rather than in the agent runtime.
Practical implication: Route agent requests through a broker that can execute privileged actions without disclosing the underlying credential.
Runtime policy decides what the agent may do
Runtime authorisation adds a live decision layer on top of access. A request can be technically valid for the underlying account and still be blocked if it exceeds task scope, touches unrelated data or attempts a write action that was not approved. That separation matters because agent intent can drift mid-session, especially when prompts are manipulated. The control is evaluated at the moment of action, not once at provisioning time. See the AI Agent Authorisation Guide.
Practical implication: Enforce per-action checks so a broad underlying account cannot be used outside the task boundary.
Threat narrative
Attacker objective: The attacker wants to use the agent’s workflow access to reach systems, extract credentials or trigger unauthorised changes without being stopped by policy.
- Entry begins with a verified workflow identity and a short-lived token rather than a stored secret, which narrows the initial exposure window.
- Credential abuse is blocked because the agent never receives the downstream keys, tokens or passwords it needs to reach the target systems.
- Escalation is constrained by live policy checks that can stop the agent from reading unrelated tickets, merging its own changes or touching other repositories.
- Impact is limited to the task boundary because every allowed and blocked request is recorded, reducing the chance that manipulated prompts can turn access into uncontrolled action.
Breaches seen in the wild
- CoPhish OAuth phishing via Copilot Studio: Datadog showed Copilot Studio agents on a Microsoft domain can front OAuth consent phishing and forward stolen tokens; no victims reported.
- Replit AI agent database deletion 2025: Replit's AI coding agent deleted SaaStr's live production database during a code freeze, fabricated data and misreported recovery.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Verified identity is the starting control for AI agent governance: the workflow should prove who or what is initiating the run before any downstream access exists. That matters because a reusable secret turns the agent into a standing credential holder, while a short-lived identity token keeps the trust boundary tied to a specific task. The practical conclusion is that agent governance starts at issuance, not after the fact.
Secretless execution changes the breach model: the risk is no longer just that an agent can misuse access, but that it can never be allowed to possess the access artifact in the first place. A workflow that brokers access on the agent’s behalf reduces the value of prompt injection and environment compromise because there is no credential to steal from the runtime. That shifts control design toward mediation and auditability.
Runtime access review assumptions do not hold for agentic work: access review processes were designed for access that persists long enough to be observed, certified and revoked. That assumption fails when an agent can request, use and discard access inside a single run because there may be no durable standing privilege to review. The implication is that governance has to move from recertifying possession to controlling each action as it happens.
Policy must govern intent, not only permission: the underlying service account may be able to reach many systems, but the agent only needs a narrow slice of that capability for one job. Runtime policy enforcement is what converts broad technical access into task-scoped behaviour. The practitioner takeaway is that permission alone is not a governance outcome when the actor can propose its own next step.
Auditing the agent’s attempted actions matters as much as recording success: a clean outcome tells you little if the agent repeatedly tried to step outside policy and was only stopped at runtime. Recording both allowed and blocked requests gives security teams evidence of manipulation attempts and scope drift. That makes the audit trail a governance control, not just a logging feature.
From our research library:
- Gartner predicts that more than 50% of successful cyberattacks against AI agents through 2029 will exploit access control weaknesses.
- Read next: AI Agent Observability, Audit and Incident Response Guide
What this signals
Runtime authorization is becoming the real control plane for agentic work: access models that depend on trust in the model or the prompt will not scale once agents touch live systems. The useful unit of control is the request, not the identity label, because the risky moment is when the agent decides to act.
Policy enforcement has to replace static access assumptions: a workflow that can fetch, write and open pull requests needs a design that constrains each action as it happens. Only 44% of organisations have implemented any policies to manage their AI agents, despite 92% agreeing that governing AI agents is critical to enterprise security, according to the 2026 Infrastructure Identity Survey. That gap means agent governance is already lagging the operational reality of deployment.
Agent identity and secret handling are converging on one question: who can act, when, and with what borrowed authority? As agent fleets expand, the organisations that can answer that question with task-scoped identity, auditability and runtime checks will have a governance model that survives contact with production.
For practitioners
- Verify workflow identity before any access exists Bind each agent run to a short-lived identity token that is validated against the source repository or job context before the first request is allowed.
- Broker privileged actions instead of exposing credentials Use a gateway or broker to execute downstream requests on behalf of the agent so passwords, API keys and session tokens never enter the runtime.
- Constrain each request with live policy Attach task-specific rules to every secret or resource so read, write and administrative actions are checked at the moment they are attempted.
- Record blocked attempts with the run context Capture both permitted and denied actions with the agent identifier, job identifier and target system so analysts can reconstruct scope drift and manipulation attempts. See the AI Agent Observability, Audit and Incident Response Guide.
Key takeaways
- AI agents become governable when they are treated as runtime actors whose access must be brokered rather than trusted.
- The central failure mode is credential exposure, because an agent that never holds the secret cannot leak it or reuse it beyond scope.
- The strongest control shift is from provisioning permissions once to validating each action as it happens.
Related NHI Mgmt Group resources: Agentic AI Security Guide · AI Agent Authorisation Guide · AI Agent Observability, Audit and Incident Response Guide · Agentic AI Identity Guide
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-04 — Insecure Authentication | The post centres on verified identity, short-lived tokens and avoiding reusable agent credentials. |
| NHI-02 — Secret Leakage | The core design goal is preventing the agent from ever seeing a credential it could leak. | |
| NHI-05 — Overprivileged NHI | The article shows why broad underlying accounts must be narrowed to task scope for agents. | |
| Recommendation — Use identity-based authentication for agent runs and avoid storing reusable secrets in the workflow. Keep credentials out of the agent runtime and broker all secret-bearing requests through a trusted control point. Reduce agent access to the minimum task scope and block any request outside that boundary. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent runtime authority exists to stop the agent from using borrowed access beyond its intended scope. |
| Recommendation — Enforce per-action authorisation so an agent cannot turn broad access into unintended privilege. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article is about how permissions are bounded for AI agents at execution time. |
| Recommendation — Map agent entitlements to task-specific authorisation decisions and deny actions outside approved scope. | ||
Key terms
- AI Agents: AI agents are autonomous software entities that act within organisational environments and make runtime decisions within assigned boundaries. They can hold identities, authenticate to systems, and exercise permissions, which makes them comparable to other non-human identities that require inventory, governance, and continuous activity monitoring.
- Secretless Access: Secretless access is a pattern where workloads authenticate and receive access without relying on long-lived embedded credentials. It typically uses runtime identity verification, federation, and short-lived authorization decisions. The goal is to reduce exposure from hardcoded or reusable secrets while keeping machine-to-machine access functional.
- Workload Identity: The identity assigned to a software workload, such as a containerised application, serverless function, or microservice, enabling it to authenticate to other services without storing static credentials.
- Runtime Authorisation: Runtime authorisation is the practice of deciding access while a task is in progress, rather than only at provisioning time. It matters for NHIs because credentials and entitlements can change risk mid-session, especially when automation or AI agents interact with sensitive systems.
What's in the full article
Akeyless's full blog post covers the operational detail this post intentionally leaves for the source:
- The exact request flow for short-lived workflow identity and how it is validated before access is issued
- The brokered execution pattern that keeps downstream credentials out of the agent runtime
- The example policy boundaries used to block unrelated reads, writes and approval actions
- The audit trail model for recording allowed and blocked requests against the agent run
👉 The full Akeyless post covers the workflow, policy checks and audit trail in implementation detail.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on November 16, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org