By NHI Mgmt Group Editorial TeamPublished 2026-01-15Domain: Best PracticesSource: Raidiam

TL;DR: PCI DSS 4.0 now treats regular cryptographic key rotation, logging, and retirement as audit-ready requirements for both signing and encryption keys, according to Raidiam. For IAM and NHI teams, the control problem is no longer whether rotation matters, but whether it can be executed consistently across distributed token ecosystems.


At a glance

What this is: PCI DSS 4.0 raises cryptographic key rotation from a best practice to a compliance requirement, with a focus on automated, auditable lifecycle management for JWT signing and encryption keys.

Why it matters: For IAM and NHI practitioners, this shifts key rotation into the same governance lane as access control, making automation and auditability operational requirements rather than optional hygiene.

By the numbers:

  • The average estimated time to remediate a leaked secret is 27 days, despite 75% of organisations expressing strong confidence in their secrets management capabilities.

👉 Read Raidiam's guidance on automated key rotation for PCI DSS 4.0


Context

PCI DSS 4.0 pushes cryptographic key management into a governance problem, not just an implementation detail. In practice, that matters for NHI security because JWT signing keys, encryption keys, and the automation around them behave like privileged machine credentials: they can be overused, forgotten, or left in place long after their intended scope. NHI lifecycle thinking applies here, especially where key retirement and audit trails are part of the control objective.

For teams managing service-to-service authentication, the important change is that rotation must be repeatable under change pressure. Manual handling is fragile in distributed environments, and that fragility becomes more visible when keys are tied to token validation, federation, and audit evidence. The NHI Lifecycle Management Guide is a useful reference point for how lifecycle controls should be structured across issuance, rotation, and revocation.

JWT-specific key rotation also exposes a common governance gap: organisations often know how to publish a key, but not how to retire it without disrupting relying parties. That is a familiar pattern in NHI programs. Static operational habits survive longer than they should, and compliance requirements now force those habits into measurable, documented processes.


Key questions

Q: How should teams rotate JWT signing keys without breaking production traffic?

A: Plan rotation as a staged lifecycle event. Publish the new public key through JWKS, keep the old key available through a defined grace period, and make sure clients refresh key material before the old key is retired. The safest approach is to test cache behavior, token TTL, and fallback verification together, not separately.

Q: What is the difference between key rotation and key retirement?

A: Rotation introduces a new active key and shifts trust to it, while retirement removes the old key from service and from future validation. In practice, both are needed. Rotation reduces exposure, but retirement closes the trust window. Without retirement, you still carry residual risk from keys that remain technically usable.

Q: Why do cryptographic keys need to be part of NHI governance?

A: Because keys act as machine credentials that grant trusted access to systems and data. If they are long-lived, untracked, or difficult to revoke, they create the same governance problems as unmanaged service accounts or tokens. NHI governance must therefore include issuance, rotation, retirement, and audit evidence for keys.

Q: Should organisations prioritise automation before shortening key lifetimes?

A: Yes, usually. Shorter lifetimes increase operational pressure on issuance, distribution, and verification, so manual processes tend to fail under that load. Automation should come first because it makes rotation predictable and auditable. Once the workflow is stable, organisations can safely reduce trust windows without creating avoidable outages.


Technical breakdown

How asymmetric key rotation works for JWT signing and encryption

JWT signing keys and encryption keys use asymmetric cryptography, meaning one private key performs the sensitive operation while the public key is distributed for verification or encryption. In a rotation model, a new key pair is generated, the public key is published through JWKS, and clients fetch updated key material. The old key stays valid for a grace period so in-flight tokens can still be verified, then it is removed from active use and retired from storage. This only works when key identifiers, algorithms, expiry metadata, and cache behavior are coordinated across the issuing and consuming systems.

Practical implication: Treat JWKS publication and key retirement as one lifecycle event, not separate tasks.

Why automated key rotation reduces audit and downtime risk

Automation matters because key rotation is not just about frequency, it is about consistency under operational load. Manual rotation creates drift between authorization servers, clients, and audit logs, especially when multiple systems consume the same tokens. Automated workflows can generate new keys, update JWKS endpoints, notify dependent systems, and log each step for evidence. That reduces human error and narrows the window in which compromised or expired keys can be abused. For PCI DSS 4.0, the governance value is as important as the cryptography: the process must be observable and repeatable.

Practical implication: Use automation to make key rotation evidence-producing, not just faster.

Why token lifetime and key retirement must be designed together

Short-lived tokens reduce exposure, but they do not eliminate trust assumptions if old keys linger too long or clients cache stale material. The real control is the pairing of token TTL, grace periods, and explicit retirement rules. If a token expires faster than a key is revoked, you still carry residual risk; if a key is retired too early, you break legitimate verification. Good design aligns token lifetime with rotation cadence, cache refresh intervals, and revocation handling so the ecosystem can absorb change without opening an availability gap.

Practical implication: Align token expiry, cache refresh, and revocation timing before shortening any key lifecycle.


Threat narrative

Attacker objective: The attacker wants to mint or read trusted tokens long enough to impersonate services, bypass authorization checks, or silently access protected data.

  1. Entry occurs when an attacker obtains access to a long-lived signing or encryption key through poor lifecycle control, leaked configuration, or inadequate retirement discipline.
  2. Escalation follows when that key is still trusted by relying parties, allowing forged or intercepted JWTs to pass validation during the overlap period.
  3. Impact is persistent token abuse, because the attacker can continue issuing or decrypting traffic until the compromised key is fully removed and downstream caches expire.

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


NHI Mgmt Group analysis

Automated key rotation is now an NHI governance control, not just a crypto task. PCI DSS 4.0 makes the lifecycle of machine credentials auditable, repeatable, and policy-driven. That is the same control logic practitioners already apply to service accounts, API tokens, and certificates. The practical conclusion is that key rotation should sit inside identity governance, not be left to ad hoc platform administration.

Ephemeral trust is the right design target for JWT ecosystems. Rotation alone is not enough if public key distribution, token validation, and cache refresh all rely on assumptions that extend key trust beyond its intended window. The industry should treat key retirement as a first-class policy event. Practitioners should design for short trust horizons and explicit teardown paths.

Identity blast radius is the right way to think about a compromised key. A single exposed asymmetric key can affect many relying parties because JWT trust relationships are federated by design. That means compromise analysis has to include distribution reach, not just key location. Teams should map which systems trust each key and how quickly that trust can be withdrawn.

Manual key handling creates compliance debt that compounds over time. The issue is not only human error, but the inability to produce consistent evidence across generation, usage, rotation, and retirement events. When auditability depends on operators remembering to update every dependent system, control quality degrades as scale increases. Practitioners should assume the audit trail must be built into the workflow, not added afterward.

From our research:

  • Only 19.6% of security professionals express strong confidence in their organisation's ability to securely manage non-human workload identities, according to the 2024 Non-Human Identity Security Report.
  • A separate finding shows that 35.6% of organisations cite managing consistent access across hybrid and multi-cloud environments as their top NHI security challenge.
  • For teams modernising key lifecycle controls, the NHI Lifecycle Management Guide helps translate rotation policy into provisioning, revocation, and visibility practices.

What this signals

Ephemeral credential trust debt: many organisations can publish a key, but far fewer can retire trust cleanly across every dependent system. That gap becomes visible as soon as token validation, caching, and revocation are distributed across services. Teams that keep key lifecycle control outside the identity program will keep inheriting avoidable audit and outage risk.

With 88.5% of organisations saying their non-human IAM practices lag behind or merely match human IAM efforts, the control gap is structural rather than incidental. PCI DSS 4.0 turns that gap into a measurable compliance problem for machine credentials, especially where signing keys and encryption keys remain in manual workflows. Practitioners should expect lifecycle automation to become a baseline requirement, not a specialist enhancement.

The practical signal is that rotation policy, audit logging, and trust propagation now belong in the same operating model. If your programme still treats cryptographic keys as isolated infrastructure assets, you will struggle to prove control consistency when regulators or auditors ask how trust was withdrawn. Map those workflows to the OWASP Non-Human Identity Top 10 and the NIST Cybersecurity Framework 2.0 so the governance model matches the risk.


For practitioners


Key takeaways

  • PCI DSS 4.0 makes key rotation a governance obligation because cryptographic keys now need to be secure, repeatable, and auditable across their full lifecycle.
  • JWT ecosystems increase the operational burden because key distribution, cache refresh, and retirement must stay aligned to avoid trust gaps or outages.
  • Practitioners should automate key lifecycle control, connect it to audit logging, and treat keys as non-human identities with explicit trust windows.

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 CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03Rotating and retiring machine credentials maps directly to NHI lifecycle weaknesses.
NIST CSF 2.0PR.AC-1Credential issuance and access restrictions depend on managed trust relationships.
NIST CSF 2.0DE.CM-8Audit logs are required to prove key usage and retirement events.

Automate NHI rotation and retirement so keys, tokens, and certificates do not outlive their intended trust window.


Key terms

  • JWKS: A JWKS, or JSON Web Key Set, is a machine-readable publishing format for public keys used by clients to verify signatures or encrypt tokens. It lets consumers fetch current key material automatically instead of relying on manual distribution, which is critical when keys rotate on a schedule.
  • Key Retirement: Key retirement is the controlled removal of a cryptographic key from active trust and future use. In NHI governance, retirement is the step that closes the validation window after rotation, ensuring old keys are no longer accepted by relying parties or retained in service longer than policy allows.
  • Token Trust Window: A token trust window is the period during which a token or the key that validates it remains accepted by downstream systems. The shorter and more explicit this window is, the less time an attacker has to exploit a leaked key or token before it stops being trusted.

Deepen your knowledge

Key rotation for JWT signing and encryption keys is a core topic in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building lifecycle controls for machine credentials, it is a useful place to start.

This post draws on content published by Raidiam: PCI-DSS 4.0 automated key rotation for JWT signing and encryption. Read the original.

NHIMG Editorial Note
Published by the NHIMG editorial team on 2026-01-15.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org