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.
How to connect AI agents without handing over passwords or API keys
Use a brokered access pattern where the agent proves its own workload identity, asks for a scoped action, and never receives reusable login material. The enterprise system should trust the broker or policy layer, not the agent runtime itself. That keeps credentials out of prompts, memory, logs and tool context while still allowing approved actions.
One practical model is to treat the agent as a requestor of intent, not as a holder of standing access. The broker can translate that intent into a short-lived token, delegated session or just-in-time grant that is valid for one task, one system or one bounded workflow. That separation is what makes the control scalable across many systems.
For implementation detail on the identity and access side, see AI Agent Authorisation Guide for task-scoped, per-action policy decisions, and Agentic AI Identity Guide for how agents get, use and retire identities in a delegated model.
Why brokered access changes the blast radius
If an agent is compromised, the attacker should inherit only the narrowest possible authority, not a reusable password or long-lived token that can be replayed elsewhere. Brokered access also lets the organisation make an allow or deny decision at execution time, based on the request, the target system and the context of the action. That is much safer than embedding secrets in code, configs or agent memory.
The key benefit is control over misuse after authentication. A compromised agent runtime may still be able to ask for actions, but it should not be able to self-escalate, reuse a harvested secret, or pivot into unrelated systems. That is especially important when the agent interacts with tools, connectors or enterprise APIs that can trigger real business impact.
What the enterprise side must enforce
Enterprise systems should accept only authenticated requests from the brokered path, then apply policy before execution. That usually means verifying the agent or workload identity, the requested action, the target resource and the current approval state, then issuing a limited credential or performing the action on the agent's behalf. The system should also record what was requested, what was approved and what was actually executed.
In practice, you want a boundary between the agent and the resource that behaves more like privileged automation control than direct login. Zero Trust for AI Agents is the clearest guide for that pattern: verify the principal and request every time, remove standing privilege, and enforce policy per action. MCP Security Guide is also relevant where tools are exposed through the Model Context Protocol, because the security model must prevent token passthrough and confused-deputy behaviour.
Risk and Threat Considerations
The main risk is not just credential theft, but credential reuse at scale. If an agent ever sees a password, API key or session token, that material can be copied into prompts, memory, logs or downstream tooling, then replayed against other systems long after the original task ended.
Failure mechanism: Direct login material is exposed to the agent runtime or to a tool chain that the agent can influence, which creates replayable access and expands the attack path beyond the original target.
Impact: A compromise can turn one agent instance into broad lateral movement, data access or destructive action across enterprise systems, especially when the same secret or session can reach multiple services.
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 SP 800-53 Rev 5, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Agents must not receive reusable credentials or tokens. |
| NHI-05 — Overprivileged NHI | Brokered access should prevent broad standing authority for agents. | |
| NHI-07 — Long-Lived Secrets | The question is about avoiding reusable login details in agent workflows. | |
| Recommendation — Keep passwords, API keys and session tokens out of agent context and broker access instead. Grant agents only task-scoped, just-in-time access with the smallest workable privilege. Replace long-lived secrets with short-lived, audience-bound delegated access. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent authority must be constrained so compromise cannot expand access. |
| ASI02 — Tool Misuse | Brokered access prevents tools from becoming an unsafe credential path. | |
| Recommendation — Enforce per-action authorization and remove standing privilege from agents. Authorize tool use at execution time and block direct secret exposure to the agent. | ||
| NIST SP 800-53 Rev 5 | IA-9 — Service Identification and Authentication | Workload identity is the mechanism replacing shared login details. |
| IA-5 — Authenticator Management | The subject is specifically about keeping passwords, keys and tokens out of agent reach. | |
| AC-6 — Least Privilege | Brokered access should limit what the agent can do at execution time. | |
| Recommendation — Use service-to-service authentication instead of shared user credentials. Manage issuance, rotation and revocation so secrets are never exposed to the agent. Restrict each agent to the minimum permissions needed for the approved action. | ||
| NIST Zero Trust (SP 800-207) | Zero Trust Architecture | The answer depends on verifying each request rather than trusting the agent runtime. |
| Recommendation — Verify the principal, context and request before issuing or honoring access. | ||
| NIST SP 800-63 | Digital Identity Guidelines | The pattern relies on strong authentication and bound identity assertions for delegated access. |
| Recommendation — Use phishing-resistant, well-bound digital identity assertions for brokered access. | ||
Practitioner Guidance
What to prioritise: Put the broker, policy decision point and audit trail in place before broad rollout. If the agent can authenticate to a tool or API directly, the architecture is still too permissive, even if the secret is technically stored in a vault.
What to verify: Confirm that no reusable credential appears in prompts, logs, memory dumps, connector configs or CI/CD variables. Also verify that any delegated access expires quickly, is audience-bound to the target system and cannot be replayed outside the approved workflow.
Practitioner takeaway: The safest pattern is not to make the agent a user, but to make it an authenticated requester whose authority is created only at execution time and only for the minimum action required.
Related resources from NHI Mgmt Group
- Guide: Enterprise AI Copilot Security Guide
- AI Agents
- How should security teams govern AI agents that can access enterprise systems?
- What are the main reasons AI agents struggle to achieve enterprise-scale deployment?
- How should security teams limit the risk from AI agents that have access to production systems?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on November 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org