AI agent identity management is the lifecycle of each agent as its own principal: created with a human owner, granted a role that can only do the tools it is allowed, changed when those tools change, and disabled when the agent is retired. The principal lives in the identity provider, or as an IAM role when the agent only calls AWS. It is not a shared login, and it is not a copy of a person's access.
Rutagon builds that lifecycle for teams putting agents next to production APIs. AI agent identity is the decision to give the agent its own principal. Least privilege for agents is the shape of the standing policy. Just-in-time access for AI agents is the short session minted at call time. This article is create, change, and disable. Security automation is where those records are filed. AWS describes the workload pattern in the IAM best practices: roles for applications, and only the permissions the workload needs. We apply that to the agent, and we keep a person on the hook for it.
How AI agent identity management is recorded
Every agent that can call a tool has one row. A shared bot user with everyone's prompts behind it does not get a row, because it cannot be disabled without disabling all of them.
agent_id: stable name of this agent
principal: IdP subject or IAM role ARN
owner: workforce id of a person
trust: runtime role, or IdP subject, and nothing else
boundary: permission boundary on the role
tools: action and resource pairs the policy allows
policy_version: the version now attached
prior_policy_version: the version it replaced
access_keys: must be zero
created_at: when the principal was created
disabled_at: empty while the agent may run Create is a joiner for a non-human. The owner is named before the role exists. The trust policy allows the runtime that hosts this agent, or the IdP subject for this agent, to assume the role. It does not allow every principal in the account. The permission boundary is attached at creation. The boundary is the ceiling: even if something later attaches a broader policy, the effective grant cannot exceed the boundary. The attached policy starts at the tool list, which is narrower than the boundary. An agent whose first version is AdministratorAccess, with a promise to tighten it later, is the row we do not create.
Least privilege sits in tools. Each entry is an action and a resource, taken from the tool definition, not from the model's last request. A tool that reads one bucket prefix becomes s3:GetObject on that prefix's ARN. A tool that sends one queue becomes sqs:SendMessage on that queue. The policy is generated from the allowlist the runtime already enforces. A tool that is not on the allowlist is not in the policy. The tool allowlist is that gate. Identity management is what remains after the gate: a principal whose role matches the gate, and a boundary that keeps a later edit from outgrowing it.
Access keys are a defect. access_keys is a count we expect to be zero. IAM users created "just for the agent" tend to grow a key, and a key does not expire when the conversation ends. The best-practice path is the role. If a key exists, the collector flags the row and the disable path deletes the key. We do not rotate it and call the lifecycle done. Non-human identity inventory is where stray keys across the account show up. This register is the agents you meant to run.
Change and disable are the rest of the lifecycle
A mover is a tool-list change. The agent gains a tool or loses one. We write a new policy version and keep the prior version id on the row. The runtime's allowlist and the policy change together. Adding the action in the policy and forgetting the allowlist means the model can ask and the role will allow it. Adding the allowlist and forgetting the policy means the call fails, which is the safer order: allowlist first only if the role is already narrow enough, otherwise policy and allowlist in one change, with the prior version retained. We do not edit the live policy document in place with no version. The prior version is how a reviewer sees what the agent could do last period.
The owner can change without a tool change. A person leaving the company does not leave their agents ownerless. The row's owner is updated to another workforce id before the person's account is removed. An agent with an owner who no longer resolves is a gap, the same way an entitlement with no reviewer is a gap. The agent does not inherit the new owner's personal access. The owner is accountable. The role is still the tool list.
Disable is the leaver. disabled_at is set, the IdP principal is deactivated, the role is detached from the runtime, and any access key is deleted. Sessions already issued die when they expire. The just-in-time article covers how short those sessions are. Disable does not depend on a quarterly human access review to notice the agent. The event is "this agent is retired," and the row records who retired it. A disabled principal that can still be assumed has not been disabled. The trust policy after disable allows nobody, or the role is deleted once the prior version has been retained for the window your evidence practice wants. We prefer detach and a trust that matches nothing, with the role left in place until the retention window passes, so the policy version can still be read. Deleting the role on the same day as the incident removes the proof of what it could do.
Human access reviews stay about people. The owner's review of an agent is the tool list, the boundary, and the disable event. Quarterly access review automation keeps the employee population. The agent register keeps its own.
The collector exports the row: principal, owner, boundary, attached policy version, access key count, disabled_at. A re-pull reads the role and the IdP state and compares them to the row. Drift is a gap: a policy version in AWS that the row does not name, a key count above zero, a trust that gained a principal, an owner who does not resolve. The export is the sample. The prompt logs are not the identity record.
How the principal stays separate
The person is the owner. The agent's calls show up as the agent's principal, in CloudTrail, with the agent id as a session tag when the runtime assumes the role. The trust policy is the line. The runtime may assume the tool role. The owner's user may not, except through a break-glass path that is itself reviewed as a person's access.
Each agent gets its own role. Two agents on one role share the union of their tools, and disabling one means editing that union while the other is mid-call. A shared permission boundary can be one managed policy that every role references. The attached identity policy stays per agent.
We will not leave the agent able to widen itself. If the runtime role can iam:AttachRolePolicy on its own role, the tool list is a suggestion. The boundary blocks the effective grant, and the identity policy on the runtime role does not include policy-management actions. A deployment pipeline, under a different principal, is what publishes a new policy version. The agent can call the tools. It cannot author the next version of its tools. That split is the least-privilege half of identity management. The lifecycle half is that the pipeline's change updates policy_version and keeps prior_policy_version.
Rutagon's deliverable is the row, the create path with owner and boundary, the versioned tool policy, and the disable that removes the trust and the keys. The model can still be wrong about what to ask. The role is what the cloud will allow. The owner is who answers for the tool list.
Frequently Asked Questions
Can several agents share one IAM user?
Give each agent a principal and a role. A shared user, especially one with an access key, cannot be disabled for a single agent, and the key outlives the conversation. The row's access key count stays at zero. The trust names the runtime or the IdP subject for that agent.
Who is allowed to change the tool list?
A deployment principal outside the agent publishes the new policy version. The agent runtime is not granted permission to attach or put its own role policy. The permission boundary caps the effective grant even if an attach happens. The register keeps the previous version id so the change is visible after the fact.
Should agents appear in the employee access review?
Employee campaigns review people. Agent rows are reviewed when the tool list changes, when the owner changes, and when the agent is disabled. Putting the agent in the human campaign either hides it among service accounts or ties a product shutdown to a staffing review.
What does disable actually remove?
The IdP principal is deactivated, the role trust no longer allows the runtime, and any access key is deleted. disabled_at is set by a person. Existing sessions end when they expire. The role object can remain until the retention window passes so the last policy version is still readable. A principal that can still be assumed is not disabled.
Discuss securing your AI agent build, starting with a principal per agent and a tool list that matches the role. Contact Rutagon at rutagon.com/contact, 907-841-8407, or contact@rutagon.com.