By NHI Mgmt Group Editorial TeamBased on Entro Security: “Managing Kubernetes secrets with HashiCorp Vault vs. Azure Key Vault” (January 2, 2024)

TL;DR: Kubernetes secrets security still depends on how credentials are created, stored, rotated, and monitored, even when teams choose HashiCorp Vault or Azure Key Vault instead of native cluster secrets, according to Entro Security. The real issue is not vault selection alone but lifecycle visibility, least privilege, and exposure control across apps, chat, and code.


At a glance

What this is: This article compares HashiCorp Vault and Azure Key Vault for Kubernetes secrets and finds that vault choice alone does not solve exposure, monitoring, or lifecycle control gaps.

Why it matters: IAM and platform teams need lifecycle controls for secrets because storage centralisation does not prevent leakage, overprivilege, or stale access in Kubernetes estates.


Context

Kubernetes secrets are sensitive credentials such as API keys, access tokens, SSH keys, and certificates that workloads use to authenticate and reach services. The security problem is not only where those secrets are stored, but whether organisations can see how they are created, exposed, rotated, and revoked across the full lifecycle.

This article focuses on the gap between vault deployment and secrets governance. Even when a team uses HashiCorp Vault or Azure Key Vault, exposure can still occur through code, chat, logs, third-party components, or weak token handling, which means the control problem sits at lifecycle visibility rather than vault branding.

For Kubernetes programmes, that makes secrets management an identity issue as much as an infrastructure issue. Service and application credentials need ownership, least privilege, environment separation, and revocation discipline, or the vault becomes only one part of a larger exposure path.


Key questions

Q: What breaks when Kubernetes secrets are stored in a vault but access tokens are overprivileged?

A: The vault still stores data securely, but the access path becomes the weak point. A broad token can retrieve far more secrets than the workload actually needs, which turns one credential into many. That creates a large blast radius, weakens separation of duties, and makes revocation harder because the compromise is in authorization rather than storage.

Q: Why do overprivileged vault tokens create so much risk for Kubernetes secrets?

A: Because the token becomes a high-value machine credential that can retrieve more secrets than its caller actually needs. If one token can read multiple vaults or environments, compromise of that token expands access far beyond a single workload and turns the vault into an acceleration point for lateral access.

Q: What are the signs that Kubernetes secret management is failing in practice?

A: Common warning signs include secrets stored in code, YAML files, or container images, broad namespace access, stale credentials, and secrets copied between environments without clear control. Another red flag is when teams cannot quickly identify who accessed a secret or when it was last rotated. These symptoms usually indicate weak governance and poor operational visibility.

Q: How should security teams choose between Azure Key Vault and HashiCorp Vault?

A: They should choose based on operating model, cloud scope, and governance maturity rather than feature count. Azure Key Vault fits teams that are fully committed to Azure and want minimal infrastructure. HashiCorp Vault fits teams that need multi-cloud reach and dynamic secrets, but only if they can sustain the operational overhead of running and securing it.


Technical breakdown

Why vault storage does not equal secrets governance

A vault changes where secrets live, but not whether they are controlled across their lifecycle. Kubernetes secrets can still be copied into code, chat, tickets, or CI/CD workflows before they ever reach the vault, and they can still remain reachable through overprivileged tokens after storage is centralised. The operational problem is that many teams treat encryption at rest as the endpoint, when the real risk is exposure before and after storage. In identity terms, the secret is only secure if issuance, use, monitoring, and revocation are governed together.

Practical implication: assess secrets governance as a lifecycle control problem, not a vault procurement decision.

How access tokens turn vaults into high-value NHI targets

Vault access usually depends on tokens, API keys, or other machine credentials, which makes the vault itself part of the NHI attack surface. If one token can retrieve broad secret sets, the blast radius is determined by token scope, not by the encryption engine. The article also points to common gaps in monitoring those tokens, including missing anomaly detection, unclear rotation, and weak separation between environments. That is classic non-human identity risk: a credential that can be used silently, broadly, and repeatedly unless offboarding and scoping are explicit.

Practical implication: inventory vault access credentials as NHIs and review their scope, rotation, and monitoring separately from stored secrets.

Why cloud integration changes the control model for Kubernetes secrets

Azure Key Vault and HashiCorp Vault integrate differently with Kubernetes, but both introduce dependency chains that affect visibility and revocation. CSI drivers, agents, plugins, and application-specific vaults can improve operational fit, yet they also add more places where misconfiguration or third-party exposure can occur. The article makes a useful distinction: a vault can serve secrets on demand, but it does not by itself tell you where those secrets are used, who can reuse them, or whether they have leaked elsewhere. That is why lifecycle control has to extend beyond the storage layer into usage context and downstream exposure tracking.

Practical implication: map every integration path that moves secrets into or out of Kubernetes and govern each handoff as an exposure point.


Threat narrative

Attacker objective: The attacker aims to reuse one exposed or overprivileged secret to gain broader access to Kubernetes-linked services and cloud resources.

  1. Entry occurs when secrets are exposed in code, files, chat systems, or other pre-vault locations where they can be copied before central control applies.
  2. Credential access follows when a broad or poorly monitored vault token is used to retrieve secrets at scale, turning a single credential into many downstream accesses.
  3. Escalation happens when the same token or access pattern spans multiple vaults, environments, or workloads because least privilege and separation are weak.
  4. Impact is unauthorized access to application secrets, cloud resources, and related Kubernetes workloads, with no reliable visibility into where the secret has spread.
  • Hugging Face Spaces breach 2024: Unauthorised access to Hugging Face Spaces may have exposed secrets users stored for AI apps; tokens were revoked and org tokens removed.

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


NHI Mgmt Group analysis

Vault choice is not the control boundary; lifecycle visibility is. The article shows that secrets can be created, copied, exposed, and reused long before or after they sit in a vault. That means the real security boundary is not the storage product but the organisation's ability to track the secret across apps, chat, code, and runtime use. Practitioners should stop treating vault adoption as a complete control model and start treating it as one stage in a governed secret lifecycle.

Unscoped vault access is a non-human identity failure, not just a configuration issue. When a token can retrieve broad secret sets, the problem is overprivileged NHI access disguised as convenience. Encryption does little if a single API token can fetch every secret in the vault, and the article correctly points out that many teams do not monitor those access paths closely. The implication is that token ownership, scope, and revocation need to be managed as first-class identity controls.

Secret leakage is usually an ecosystem problem, not a vault problem. The article names code, chat, tickets, and third-party components as places where secrets can escape before they are governed. Secret exposure window: once a secret appears outside controlled storage, the clock starts on revocation, containment, and downstream discovery. Practitioners need to treat every path into and out of the vault as part of the exposure surface, not as implementation detail.

Kubernetes secret governance depends on environment separation and offboarding discipline. The article highlights different vaults, environments, and temporary credentials, which only work when access is cleanly segmented and retired on time. Without that, a secret created for one workload can drift into broader use and survive beyond its intended purpose. Security teams should use this as a trigger to align Kubernetes secrets with NHI lifecycle governance rather than storage administration.

Continuous monitoring is the missing control in many secrets programmes. The article notes that audit capabilities often exist but are not used regularly, which leaves exposed secrets and abnormal token use undetected. That gap matters because secrets are not static assets. They are living credentials with movement, reuse, and exposure risk. Practitioners should treat audit and anomaly review as core governance, not optional visibility.

From our research library:

What this signals

Secret exposure window: Kubernetes teams need to think in terms of how long a credential can exist outside governed storage, because that window often matters more than the vault brand. Once secrets spread into code, chat, or tickets, revocation and discovery become the real controls.

Vault adoption can reduce sprawl, but it does not replace ownership, rotation, or anomaly review. In practice, the programme that wins is the one that can show where each secret lives, who can retrieve it, and when it was last validated.

Only 44% of organisations are currently using a dedicated secrets management system, according to the 2024 State of Secrets Management Survey. That makes lifecycle governance even more important, because many environments still rely on fragmented controls and manual handling.


For practitioners

  • Map the full secret lifecycle Track where Kubernetes secrets are created, copied, stored, used, rotated, and revoked so governance covers every exposure point.
  • Review vault access tokens as NHIs Inventory every token, API key, and machine credential that can retrieve secrets from the vault, then validate scope and ownership.
  • Separate secrets by environment and workload Use distinct secrets and vault boundaries for production, non-production, and application-specific access to reduce cross-environment reuse.
  • Monitor secret access and anomaly patterns Activate audit review for unusual retrieval volumes, repeated token use, and secrets exposed outside the vault through code or chat.
  • Build revocation into offboarding workflows Ensure secrets, tokens, and temporary credentials are revoked when workloads, vendors, or integrations no longer need them.

Key takeaways

  • Kubernetes secret risk does not end when credentials move into a vault, because exposure can happen earlier and persist later through tokens, code, or chat.
  • Only 44% of organisations are currently using a dedicated secrets management system, which helps explain why lifecycle gaps remain common.
  • The practical control is to govern secret creation, access, rotation, revocation, and monitoring as one lifecycle rather than as separate tooling decisions.

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 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageSecrets leaking into code, chat, and tickets are the article's central governance problem.
NHI-05 — Overprivileged NHIBroad vault tokens and cross-environment access create overprivileged machine identity risk.
NHI-07 — Long-Lived SecretsThe article stresses rotation and revocation gaps for Kubernetes credentials and vault access tokens.
Recommendation — Scan for exposed secrets across development and collaboration surfaces and revoke anything that escaped governed storage. Reduce vault token scope to the minimum retrieval set and separate privileges by workload and environment. Shorten secret lifetime and enforce revocation when a workload, integration, or environment no longer needs access.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementTokens, API keys, and secret rotation are authenticator lifecycle issues under NIST control.
Recommendation — Apply authenticator management controls to rotate, monitor, and revoke Kubernetes secret access credentials.
CIS Controls v8CIS-5 — Account ManagementThe article's least-privilege and offboarding issues map to account and access lifecycle governance.
Recommendation — Inventory and retire secret access accounts and tokens when they are no longer required.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementLeaked or overbroad secrets enable credential access and broaden lateral movement paths.
Recommendation — Map exposed Kubernetes secrets to credential-access paths and constrain reuse across workloads and environments.

Key terms

  • Kubernetes Secret: A Kubernetes Secret is an object used to store sensitive data such as passwords, tokens, certificates, and API keys outside application code. It simplifies delivery to Pods, but it does not automatically protect the data. Security depends on storage encryption, access control, and monitoring of how the secret is used.
  • Secrets Management: The discipline of securely storing, distributing, rotating, and auditing secrets across an organisation's systems and pipelines, typically implemented via a centralised secrets vault such as HashiCorp Vault, AWS Secrets Manager, or Akeyless.
  • Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.
  • Secret exposure window: A secret exposure window is the period between when a credential becomes visible to an attacker and when it is detected, revoked, or rotated. In CI/CD environments that window can be extremely short, which is why detection speed and identity-linked revocation matter as much as storage hygiene.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 23, 2026.
Updated on October 6, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org