AI Security
When you give AI agents your credentials, they inherit your entire access footprint—audit logs and all
A security audit reveals that giving coding agents human credentials creates dangerous blind spots: permissions vary wildly across environments, audit trails disappear where agents can do the most damage, and no log entry can distinguish human actions from automated ones.
1/2
The New Stack
The problem: agents without identity#
When developers provision AI agents to work with production databases, they typically bypass formal credential provisioning by handing the agent their own login credentials. This sidesteps the need to design a machine identity and gets the tool working immediately—but it creates a security blind spot that standard auditing and permission checks cannot detect.
To measure the actual risk, one engineer tested what a coding agent could access after being given their personal Azure credentials. The findings were stark: the agent inherited not just a narrow set of permissions, but an entire identity profile—complete with group memberships, MFA attestations, refresh tokens, and audit log attribution. The database had no way to know whether queries came from the human or the tool.
Authentication: the token says "impersonate me"#
When an engineer signs in once to Azure CLI and the cached token gets reused by an agent, the underlying access token carries revealing claims:
- Scope:
user_impersonation— a technical term meaning the agent holds all rights of the human while remaining indistinguishable from them - Authentication method: mfa — an attestation that a second factor was satisfied, even if that MFA challenge happened hours earlier for an unrelated task
- Lifetime: 84 minutes nominally, but automatic refresh extends it indefinitely until either the refresh token expires or the human account is deactivated
The result: every action the agent takes arrives in audit logs bearing a false claim that a human verified it with multi-factor authentication. The MFA proof is real, but it proves the human logged in—not that the human approved the agent's actions.
Authorization: permissions hidden from visibility checks#
A security review of the test credential turned up a single Reader role in a non-production subscription—a deceptively narrow picture. However, the actual access came from 34 active group memberships (37 in the cached token, due to nesting), including roles like <environment> - SQL Database Manager and <environment> - Resource Contributor.
