By NHI Mgmt Group Editorial TeamPublished 2026-05-20Domain: Workload IdentitySource: Teleport

TL;DR: Shared database passwords break attribution, auditability, and least-privilege enforcement because they tie access to a secret rather than a person or workload, according to Teleport. As AI agents begin reaching production data, unified cryptographic identity and session-level control become the baseline, not an enhancement.


At a glance

What this is: This is a Teleport analysis of why shared database passwords fail, and it argues that short-lived cryptographic identity and per-session controls are now required for accountable database access.

Why it matters: It matters because IAM teams now have to govern the same database path for humans, workloads, and AI agents without relying on shared secrets, standing privilege, or ambiguous audit trails.

👉 Read Teleport's analysis of eliminating shared database passwords


Context

Shared database passwords are a governance problem, not just an access convenience issue. When the same credential is used by multiple people, the organisation loses a clean link between identity, privilege, and action, which weakens audit evidence and makes incident review harder. For database access, the primary keyword here is shared database passwords, and the control failure is accountability.

That failure becomes more serious as AI agents enter the database path. The article frames the issue around short-lived privileges, cryptographic identity, and per-session enforcement because database access now has to cover humans, workloads, and agentic systems without collapsing into shared secrets or standing access. In practice, this is an NHI governance problem that also touches human IAM and emerging autonomous use cases.

Teleport's approach uses identity-bound certificates and policy mapping to remove the need for shared passwords and VPN-based reachability. The important analytical point is not the product flow itself, but the governance shift: database access should expire with the task, and every query should remain attributable to one executor. That is the baseline most legacy IAM patterns still fail to provide.


Key questions

Q: What breaks when teams use shared database passwords?

A: Shared database passwords break attribution, weaken audit evidence, and make incident response slower because multiple people or systems can act under the same credential. The result is that logs show activity without reliably showing responsibility. That is a governance failure as much as a technical one.

Q: Why do shared passwords create more risk for production databases?

A: Production databases are high-value targets, so a shared credential gives broad reach to anyone who learns it and often persists long after the original task is over. That expands blast radius and makes revocation difficult. The safer pattern is identity-bound, short-lived access with clear role scoping.

Q: How do security teams know if database access attribution is working?

A: Attribution is working when every query can be tied to a unique executor, not just a shared login or generic account. Teams should be able to answer who ran the query, from where, under which role, and during which session. If any of those links are missing, accountability is incomplete.

Q: How should organisations govern AI agents that need database access?

A: Organisations should give AI agents narrow read access by default, separate write privileges from query privileges, and require human approval for any session that can modify data. That keeps agent activity inside a clearly bounded role while preserving auditability and reducing the chance of unsupervised state change.


Technical breakdown

Short-lived database certificates replace shared passwords

A shared database password grants access to whoever knows the secret, while a short-lived certificate binds access to a verified identity and a limited session. In practical terms, the certificate carries identity claims from the IdP, and the database path checks the certificate rather than trusting a reusable password. That changes database security from secret sharing to identity-bound authorization, which is a better fit for teams that need separate human, workload, and agent access. It also reduces the value of stolen credentials because the access token expires quickly and is narrower in scope.

Practical implication: replace shared database credentials with short-lived, identity-bound access for every privileged database path.

Role mapping and session MFA enforce database least privilege

Database roles should reflect current organisational attributes, not historic access grants. The article describes role mapping from SSO to database permissions, which means a user's team, group, or manager relationship can determine read-only or read-write access. For sensitive write operations, per-session MFA adds a second control layer so that higher-risk actions require physical approval before the session opens. This pattern is especially relevant when AI agents can initiate queries but should not be able to self-authorize destructive or exfiltrating actions.

Practical implication: separate read and write roles, then require per-session MFA for every role that can modify data.

Audit attribution must follow the cryptographic identity, not the database username

Traditional database logs often capture the account name used to connect, which is not enough when multiple people or systems share that account. Cryptographic identity solves that by binding each session and query to the real executor, even if the underlying database username is generic or dynamically created. That distinction matters because investigations, compliance evidence, and internal accountability all depend on knowing who actually issued the query. Without that layer, database audit data records activity but not responsibility.

Practical implication: ensure audit logs record the cryptographic identity behind each query, not only the database login used.


Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Shared database passwords are a responsibility failure, not just a secrets problem. The article shows that a shared username breaks the link between action and accountable identity, which is exactly what database audit, compliance review, and incident triage depend on. Once the same credential can represent multiple actors, the control surface becomes ambiguous and the evidence chain weakens. Practitioners should treat shared passwords as a governance failure that obscures ownership.

Static database credentials are a poor fit for modern NHI governance because they outlive the task they were meant to enable. The article's move to short-lived certificates reflects the broader NHI principle that access should be task-scoped and identity-bound rather than secret-scoped and reusable. The practical consequence is that standing access becomes the default risk, not an operational convenience. Teams should re-evaluate any database path that still depends on a long-lived shared secret.

Identity attribution in database logging is now a baseline control for humans, workloads, and AI agents. The article explicitly notes that the audit trail must identify the real executor, not just the local database account. That matters because agent-assisted operations blur who initiated the query, who approved it, and who should answer for it afterward. Practitioners should assume mixed executor populations and design logging to preserve responsibility across them.

Unified infrastructure identity is the named concept that database teams now need. The article points to a model where databases, servers, Kubernetes, and cloud consoles all rely on the same cryptographic identity layer. That eliminates the old assumption that database access can be governed in isolation from the rest of the infrastructure identity stack. The implication is that database governance must be planned as part of a broader identity fabric, not as a siloed control.

Write access is the real boundary condition when AI agents reach databases. The article makes clear that query access and modify access should not be treated the same, especially when agents can operate inside production workflows. The governance issue is not whether an AI agent can connect, but whether it can alter state without human approval. Practitioners should treat write paths as the most sensitive control point in agent-aware database governance.

From our research:

  • 70% of organisations grant AI systems more access than they would give a human employee performing the exact same job, according to The 2026 Infrastructure Identity Survey.
  • Only 44% of organisations have implemented any policies to manage their AI agents, despite 92% agreeing that governing AI agents is critical to enterprise security.
  • That gap is part of why the Ultimate Guide to NHIs is relevant here, especially for teams separating shared secrets from short-lived identity and session control.

What this signals

Shared database passwords are becoming an identity governance debt line item. As more organisations mix human operators, workloads, and AI agents in the same database estate, the old pattern of team-shared credentials becomes harder to justify. The practical signal is that access models need to move toward identity-bound sessions and away from shared secrets before audit and accountability gaps become routine.

Unified infrastructure identity is the right mental model for database access across machines and agents. Databases are no longer isolated from the broader access fabric, which means IAM and NHI teams have to align on role mapping, session boundaries, and attribution. For implementation context, the Ultimate Guide to NHIs is the clearest place to start.

With 70% of organisations already granting AI systems more access than human employees, the governance gap is structural, not speculative. Teams that still treat database access as a password-sharing problem will struggle to govern agent-driven write paths, because the access model itself is no longer aligned to how work is actually executed.


For practitioners

  • Replace shared database passwords with identity-bound certificates Use short-lived X.509 or equivalent identity-bound credentials for database sessions so access is tied to the executor and expires with the task.
  • Map database permissions from current SSO roles Derive database access from live organisational attributes such as team or group membership, and revoke reach automatically when those attributes change.
  • Require session MFA for write-capable database roles Gate INSERT, UPDATE, DELETE, and other state-changing operations behind per-session hardware key or biometric approval.
  • Log the real executor for every query Ensure SIEM and audit pipelines store the cryptographic identity behind each query, not only the local database username used for the connection.
  • Treat AI agent database access as a separate privilege tier Allow agents to query only within narrowly defined roles and require human approval before any role can perform writes or destructive actions.

Key takeaways

  • Shared database passwords undermine accountability because multiple actors can operate under the same credential.
  • Short-lived certificates, role mapping, and session MFA are the controls that change database access from secret sharing to identity governance.
  • As AI agents reach production data, attribution and write-path control become the decisive database security requirements.

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 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01Shared passwords and standing access are direct NHI credential risks.
NIST CSF 2.0PR.AC-4Least-privilege database access and role enforcement map cleanly here.
NIST Zero Trust (SP 800-207)AC-6Zero Trust for databases depends on session-level verification and narrow privilege.

Replace shared database secrets with short-lived, identity-bound credentials and revoke standing access.


Key terms

  • Shared Database Password: A shared database password is a single reusable secret that multiple people or systems use to reach the same database. It reduces operational friction, but it also collapses accountability because the credential no longer identifies the actual executor of a query or change.
  • Short-Lived Database Certificate: A short-lived database certificate is a temporary cryptographic credential that binds database access to a verified identity for a limited session. It is stronger than a reusable password because it expires quickly, carries identity context, and is easier to scope to a task or role.
  • Query Attribution: Query attribution is the ability to tie each database action back to the real person, workload, or agent that performed it. In practice, this means logs must preserve identity, session, and role context, not just the local username used to connect.
  • Unified Infrastructure Identity: Unified infrastructure identity is a model where databases, servers, clusters, and cloud consoles all rely on the same identity fabric. It treats access as a single governance problem across infrastructure, which helps teams enforce short-lived privilege, traceability, and consistent policy.

What's in the full article

Teleport's full blog post covers the operational detail this post intentionally leaves for the source:

  • Step-by-step examples for connecting to MySQL and PostgreSQL with short-lived certificates.
  • Role configuration details for read-only and read-write access mapped from SSO identity.
  • Hardware key approval flow for write-capable database sessions.
  • Audit log examples showing how query attribution is recorded at session level.

👉 The full Teleport post covers certificate-based access flow, role examples, and audit logging details.

Deepen your knowledge

Database access governance and short-lived identity are covered in our NHI Foundation Level course, the industry's only accredited NHI security programme. If your team is still relying on shared credentials for production databases, the course maps the control shift you need to make.
NHIMG Editorial Note
Published by the NHIMG editorial team on 2026-05-20.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org