Vaulting protects privileged secrets by reducing exposure at rest and controlling retrieval, but it still allows standing access patterns if policy is loose. Just-in-time access is better when the goal is to remove persistent privilege and limit the duration of elevated rights. Most teams need both, with vaulting for containment and JIT for privilege minimisation.
Why This Matters for Security Teams
Vaulting and just-in-time access solve different failure modes, and confusing them creates a false sense of control. Vaulting is primarily about reducing secret exposure and centralising retrieval, while JIT is about removing standing privilege from the path of execution. For modern environments with service accounts, pipelines, and OWASP Non-Human Identity Top 10 issues, the real question is whether access should exist continuously or only when a task is actively being performed.
This distinction matters because many incidents are not caused by missing a password in a vault, but by secrets that are overused, reused, or left active far longer than necessary. NHIMG research shows the 2025 State of NHIs and Secrets in Cybersecurity found 62% of secrets are duplicated and stored in multiple locations, which undermines the containment value of vaulting alone. In practice, many security teams encounter misuse only after a token is already active across multiple systems rather than through intentional access design.
How It Works in Practice
A useful decision model starts with the asset, the workload, and the duration of privilege. Vaulting works best when the problem is secret storage, retrieval control, and auditability. It helps centralise API keys, certificates, and credentials so they are not embedded in code or copied into tickets. JIT works best when the problem is persistent entitlement. It issues access only at the moment a user, pipeline, or non-human identity needs it, then automatically removes or expires it.
In operational terms, teams often combine both. A workload authenticates to a vault using a strong identity signal, such as workload identity or federated authentication, retrieves a short-lived secret, performs a bounded action, and then loses access. For higher-risk actions, JIT can gate the actual privilege escalation while the vault supplies the secret material needed for the session. This aligns with current guidance from CISA Zero Trust guidance and the general direction of zero standing privilege.
- Use vaulting when the main risk is secret sprawl, hard-coded credentials, or poor retrieval auditing.
- Use JIT when the main risk is always-on privilege, excessive blast radius, or unnecessary admin access.
- Use both when a workflow needs controlled secret retrieval and time-bounded elevation.
- Prefer short TTLs and automatic revocation wherever the workload can tolerate it.
For non-human identities, this becomes a lifecycle question as much as an access question. If a token is valid for months, vaulting may hide it but will not meaningfully reduce exposure. If a system can mint ephemeral credentials per task, JIT becomes the stronger control. These controls tend to break down when legacy applications require long-lived shared credentials because the application cannot re-authenticate cleanly.
Common Variations and Edge Cases
Tighter JIT controls often increase operational overhead, requiring organisations to balance reduced privilege against deployment speed and support complexity. That tradeoff is real in batch jobs, air-gapped environments, and legacy systems that cannot complete a fresh authentication flow for every task. In those cases, teams often retain vaulting as a containment layer while gradually shortening credential lifetime.
There is no universal standard for this yet, but best practice is evolving toward dynamic, short-lived secrets instead of durable shared credentials. The Secret Sprawl Challenge is a good reminder that centralisation alone does not eliminate exposure if the same secret is copied into multiple runtime locations. The practical test is simple: if the credential must persist, vault it; if the privilege can disappear after use, put it on JIT. In mature programmes, the deciding factor is usually not technology preference but whether the environment can support reliable re-authentication, revocation, and per-task policy evaluation.
Edge cases appear when human operators need emergency access, when automation chains across several systems, or when a secret is both a retrieval object and an active session token. In those situations, current guidance suggests separating the stored secret from the permission to use it, then reviewing whether the permission can be made ephemeral. Teams that keep both layers explicit usually recover faster from misuse and make offboarding, rotation, and incident response much simpler.
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.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Addresses secret rotation and lifecycle limits for non-human identities. |
| NIST CSF 2.0 | PR.AC-1 | Covers identity and access management decisions for privileged access. |
| NIST Zero Trust (SP 800-207) | 5.2 | Zero trust requires continuous verification rather than standing privilege. |
Use vaulting for storage, but enforce JIT and rotation so secrets are short-lived and revocable.
Related resources from NHI Mgmt Group
- How should security teams decide whether JIT access is safe for non-human identities?
- How should security teams choose between RBAC, ABAC, and PBAC for NHI access?
- How should security teams choose between CLI and MCP for AI tool access?
- How should security teams choose between secrets management and access mediation?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on June 10, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org