The short version
Most production access still runs on standing privileges: shared database users, SSH keys that never expire, and broad Kubernetes roles that stay active whether anyone is using them or not. AI agents make that riskier, because they act fast, can be steered by text they read, and often run under a human’s or a shared account’s credentials. Just-in-time access fixes the root problem: access is granted per task with short-lived credentials, every session is recorded, and nothing stays open once the work is done.
Ask an infrastructure team how engineers reach production, and you’ll often hear a version of the same story. There’s a read-only Postgres user whose password everyone knows, an admin one “for emergencies” that gets used more than it should, a bastion host with a long list of authorized keys, and a kubeconfig with cluster-admin that ended up on a few laptops during an incident two years ago.
It mostly works. Now add AI agents: coding assistants that run kubectl and psql from a developer’s terminal, automations that query production to answer support tickets, agents that open pull requests and apply infrastructure changes. They inherit whatever access is lying around, and that’s the point where standing privileges stop being a hygiene issue and become the main risk.
What are standing privileges?
Standing privileges are access rights that stay active all the time, whether or not anyone needs them right now, such as a permanent database admin role, an SSH key with no expiry, or a Kubernetes ClusterRoleBinding nobody has looked at in months.
They’re the default because they’re convenient. Nobody has to request anything, nothing breaks at 2 a.m., and onboarding is a matter of sharing a credential. The catch is that every one of those credentials works for anyone (or anything) that gets hold of it, at any time, for everything the role allows.
Why are standing privileges more dangerous with AI agents?
Standing privileges are more dangerous with AI agents because an agent can use broad access much faster than a person, can be manipulated through prompt injection into using it for the wrong purpose, and often leaves logs that don’t show whether a human or the agent acted.
Three properties make the difference:
- Speed. An engineer with an admin role might run a handful of commands in an hour. An agent in a loop can run hundreds, so a bad decision spreads before anyone opens a dashboard.
- Steerability. Agents act on instructions found in the content they read: a ticket, a README, a log line. If the agent holds standing admin access, one injected instruction inherits all of it.
- Attribution. When an agent runs with an engineer’s credentials or a shared service account, the database log says app_admin ran a DELETE. It doesn’t say whether that was the engineer, their assistant, or a scheduled job.
The OWASP Top 10 for Agentic Applications, published in December 2025, gives this pattern its own entry: ASI03, Identity and Privilege Abuse, which covers agents that reuse, escalate, or leak the credentials and access they inherit.
How do you find standing privileges in your infrastructure?
You find standing privileges by listing every credential and role that can reach production, then checking which ones are active right now without an open task that needs them. A few commands give you a quick first pass:
# Kubernetes: which bindings grant cluster-admin, and to whom?
kubectl get clusterrolebindings -o json | jq -r ‘.items[]
| select(.roleRef.name==”cluster-admin”)
| .metadata.name + ” -> ” + ([.subjects[]? | .kind + “:” + .name] | join(“, “))’
# Kubernetes: what can this agent’s service account actually do?
kubectl auth can-i –list –as=system:serviceaccount:agents:ticket-bot
# PostgreSQL: login roles that are superusers or never expire
psql -c “SELECT rolname, rolsuper, rolvaliduntil FROM pg_roles
WHERE rolcanlogin AND (rolsuper OR rolvaliduntil IS NULL);”
# SSH: keys allowed to log in as root on this host
sudo cat /root/.ssh/authorized_keys
For Kubernetes, the project’s RBAC good practices guide is a useful yardstick. It recommends assigning permissions at namespace level with RoleBindings instead of ClusterRoleBindings where possible, avoiding wildcard permissions and keeping cluster-admin for cases where it’s specifically needed. It also points out that a wildcard grants rights not only to the object types that exist today but to any created in the future, which matters once agents work in clusters that keep picking up new CRDs.
Then sort what you found into three buckets: access nobody uses (remove it), access people need now and then (move it to just-in-time), and access a workload genuinely needs all the time (scope it down and give it its own identity).
What does just-in-time access look like for AI agents?
Just-in-time access for AI agents means an agent starts with no access to production, requests what a specific task needs, and receives short-lived, narrowly scoped credentials that expire on their own when the task ends.
Here’s how a single task might flow. An agent acting for a named engineer asks for read access to the orders database to investigate a ticket. Policy decides: read-only requests during working hours are approved automatically, while writes or anything touching customer tables wait for a person. The agent gets a credential that’s valid for an hour. Every query in that session is recorded and tied to both the agent and the engineer. When the hour is up, the credential stops working, whether or not anyone remembered to revoke it.
You can build pieces of this with tools you already run:
# Kubernetes: a service account token that expires after one hour
kubectl create token ticket-bot -n agents –duration=1h
# SSH: a user certificate signed by your CA, valid for one hour
ssh-keygen -s ~/ssh-ca/ca_key -I “ticket-bot for alice” -n deploy -V +1h agent_key.pub
# PostgreSQL: a task-specific login that expires on its own
psql -c “CREATE ROLE task_4821 LOGIN PASSWORD ‘…’
VALID UNTIL ‘2026-11-20 15:00:00+00’ IN ROLE orders_readonly;”
Each of these has limits. A Postgres VALID UNTIL stops new logins but doesn’t end sessions that are already open, SSH certificates only help if every host trusts your CA, and none of the three gives you one record of what happened across all of them.
Cloud IAM and Kubernetes RBAC get you part of the way, but they rarely remove standing access on their own. Dedicated tools take it further: Formal PAM, for instance, gives engineers and AI agents just-in-time access to databases, SSH, and Kubernetes through a reverse proxy in your VPC, with short-lived credentials, session recording, and no standing privileges.
Whichever way you build it, check for four things: credentials that expire without anyone revoking them, approval tied to a specific task instead of a blanket grant, session recording that captures the actual commands and queries, and an identity on every session that names both the agent and the person it acts for.
How do you roll out just-in-time access without slowing engineers down?
You roll out just-in-time access without slowing engineers down by starting with the riskiest access, approving routine low-risk requests automatically, and keeping a documented break-glass path for emergencies.
- Start with agents, not people. New agents have no habits to break. Give every new agent zero standing access from day one, then move human access over once the flow works.
- Auto-approve the boring stuff. If read-only access to staging needs a manager’s click every time, people will find a workaround. Save human approval for writes, production data, and privileged roles.
- Keep break-glass, and make it loud. An emergency admin path should exist, expire on its own, and alert someone every time it’s used.
- Track standing access over time. Count the always-on privileged credentials that remain each month. The number should go down and stay down.
FAQ
What is just-in-time access?
Just-in-time access is a privileged access model in which users and workloads get elevated permissions only when they need them, for a limited time, instead of holding them permanently. Access is usually tied to a request, an approval, and an automatic expiry.
What is the difference between PAM and IAM?
IAM (identity and access management) manages who every user is and what they can access across the organization, while PAM (privileged access management) focuses on the smaller set of high-risk accounts and sessions, such as admin access to databases, servers, and clusters, and adds controls like just-in-time access and session recording.
Should AI agents have their own credentials?
Yes, AI agents should have their own identity and credentials, separate from the engineer who runs them, so every action can be attributed, and access can be scoped and revoked per agent. Those credentials should be short-lived and issued per task.
What is zero standing privilege?
Zero standing privilege (ZSP) is a security model in which no account, human or machine, holds privileged access by default: every elevated permission is granted just in time and removed automatically when the task is done.
Agents will keep moving closer to production, because that’s where the useful work is. The safest starting point isn’t a smarter agent. It’s a production environment where nothing, human or machine, holds access it isn’t using right now.





