Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Machine Key Rotation
Cyber Security

Machine Key Rotation

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: Cyber Security

Machine key rotation is the process of replacing the validation and decryption keys used by an application to sign and protect state data. In SharePoint incidents, rotation is essential because stolen keys let attackers generate trusted payloads, preserve access, and survive a patch unless IIS is restarted and tokens are invalidated.

What machine key rotation actually changes

Machine key rotation replaces the application keys that validate and decrypt protected state, so old signed or encrypted material no longer remains implicitly trusted. In systems that use these keys for ViewState, tokens, or other server-side state, rotation changes what the application will accept as authentic and what it will reject as stale.

That makes rotation more than a housekeeping task. It is the mechanism that separates a compromised trust boundary from a recovered one, especially when a stolen key could let an attacker mint trusted payloads or preserve access after the initial fix.

Why stolen machine keys are dangerous

When an attacker gets a machine key, they may be able to forge data that the application will treat as legitimate, including payloads that survive ordinary patching. That is why key compromise can turn a contained incident into persistent access, because the defender has patched the software but not invalidated the trust material behind it.

This is especially serious in web applications that rely on long-lived signing or validation material. If the application continues to trust an old key, the attacker can keep generating accepted state, and the compromise can outlast the original intrusion path.

Rotation becomes part of the security boundary itself, not just a cryptographic preference. Signing keys and certificates in breaches shows the same pattern across different incidents: once trust material is stolen, the most important question becomes whether the old material is truly retired.

How organisations verify exposure and trigger rotation

Exposure assessment starts with knowing where machine keys exist, how they are stored, and which applications depend on them. Teams usually confirm whether the key is hard-coded, copied across environments, embedded in configuration, or exposed through source control, backups, or compromised hosts.

Vendor and product advisories matter because key rotation can be environment-specific. For SharePoint-related incidents, the operational question is not only whether the product is patched, but whether the old keys have been replaced and the application has been restarted or otherwise forced to stop trusting old tokens.

Inventory and dependency mapping are essential because one key can protect multiple application functions. If you miss even one server, farm, or service endpoint, an attacker may keep a foothold through the remaining trusted instance.

For application teams, SharePoint Server Security Guide is a practical companion because it ties machine key rotation to farm accounts, logging, patching, and the broader on-premises hardening model.

Safe rotation, verification, and post-incident recovery

Safe rotation usually requires a controlled cutover, not an abrupt change that breaks the application. Operators need a plan for dependency checks, dual-key overlap where supported, rollback if validation fails, and verification that old material is no longer accepted.

After rotation, defenders should validate that the application rejects pre-rotation signatures and that any session or token material derived from the old key is no longer usable. If the compromise involved a real incident, the recovery scope often extends beyond the key itself to related secrets, service accounts, and session state.

For engineering teams, a rotation runbook is the difference between a clean recovery and a partial one. Secrets Rotation Runbook Template is useful here because the same operational logic applies: dependency checks, validation, rollback, and emergency rotation all matter when trust material is being replaced.

In SharePoint-style compromise cases, post-patch review should also ask whether tokens, cached material, or long-lived trust artifacts were invalidated. If they were not, the attacker may still have a path back in even after the software fix.

What good key hygiene looks like over time

Machine key rotation works best when teams treat keys as lifecycle-managed security material, not static configuration. That means knowing who owns the key, how long it should live, how it is stored, and what evidence proves the old key is retired.

Long-lived keys are especially risky when they are shared across applications, copied into multiple environments, or left in place after a migration. The safer pattern is to limit blast radius, rotate on a defined schedule or after suspicion of compromise, and avoid any design that makes old trust material difficult to invalidate.

NIST SP 800-57 Key Management is the most direct external reference for the lifecycle view, because it frames key management around cryptoperiods, retirement, and controlled replacement rather than ad hoc replacement after an incident.

Risk and Threat Considerations

Machine key compromise is dangerous because the attacker may not need to exploit the software again after first stealing the key. If validation and decryption keys remain trusted, the attacker can keep minting accepted payloads, preserving access and evading a patch that only fixes the vulnerable code path.

Failure mechanism: The application continues to accept old signed or decrypted state because the key has not been fully replaced, the service has not been restarted, or dependent tokens and sessions were not invalidated.

Impact: Persistent unauthorized access, forged application state, and post-patch compromise can continue until the trust material is actually retired and the environment is revalidated.

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

FrameworkControl / ReferenceRelevance
NIST SP 800-57Key ManagementDefines cryptoperiods, retirement, and replacement of cryptographic keys.
Recommendation — Set key lifecycle policy, rotate on schedule or compromise, and retire old keys cleanly.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers authenticators and their lifecycle, including replacement and revocation.
IA-9 — Service Identification and AuthenticationApplies when applications and services rely on shared machine keys for trust and authentication.
Recommendation — Manage authenticator lifecycle so old validation material is replaced and unusable after rotation. Use service-authentication controls to limit trust in long-lived machine keys and revoke them promptly.
CIS Controls v8CIS-5 — Account ManagementSupports lifecycle control over credentials and trusted access material that must be retired.
Recommendation — Maintain ownership and retirement processes for keys so stale trust material is removed quickly.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageMachine keys are secret trust material; exposure directly creates compromise risk.
Recommendation — Reduce leakage risk by keeping machine keys out of source control, backups, and exposed configs.

Practitioner Guidance

Governance implication: Treat machine key rotation as a recovery control, not just a maintenance task. Ownership should sit with the team that can prove the old key is no longer trusted across every dependent application instance.

What to watch for: Key reuse across environments, configuration drift, and stale tokens or cached state are the common signs that rotation was incomplete. If the application still accepts old material, the incident is not fully contained.

Practitioner takeaway: A successful rotation is verified by rejection of old trust material, not by the mere act of changing a file or configuration value.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org