Agent Credentials Need an Expiry Date and a Named Owner
Permanent shared tokens make automation hard to contain. Scope agent credentials to their task, manage their lifetime and rehearse revocation.

An autonomous workflow can outlive the person who created it. If its credentials have no owner, purpose or expiry, nobody can confidently explain what shutting it down will affect. The security problem is not that machines use credentials; it is that permanent shared secrets hide the identity and limits of each workflow.
Start with a credential inventory
For each agent, record the service it accesses, permitted operations, secret location, rotation process and responsible team. Distinguish the user authorizing a task from the service identity carrying it out. A task delegated by one user must not silently inherit every privilege of a shared integration account.
OWASP's Excessive Agency guidance highlights permissions as one source of harmful application behavior. Applying that principle to credentials means reducing scope and lifetime where the provider supports it. Short-lived credentials reduce an exposure window, but they do not repair excessive privileges during that window.
A safer operational baseline
- Prefer task-scoped or short-lived credentials when supported by the integration.
- Keep secrets in a dedicated secret-management system, not prompts or retrieved documents.
- Separate development credentials from production and avoid shared administrator tokens.
- Log the service identity and operation without logging the secret itself.
- Rehearse revocation, including running jobs, refresh tokens and downstream integrations.
Do not promise instant containment without testing it. A revoked API key may not terminate an already established session, and cached data can remain accessible. Document what revocation stops immediately and which follow-up actions are required.
Sources and scope
Prepared editorial recommendations grounded in least privilege and OWASP's Excessive Agency guidance; no claim about a future credential leak is made.

