Incident · Senior
Azure AD Mar 2021: rotation removes signing key
Real incident. Key points: authentication and authorization and progressive deploys.
Short answer
Real incident. Key points: authentication and authorization and progressive deploys. From around 19:00 UTC on March 15, 2021 until 09:25 UTC, customers may have encountered errors in authentication operations. The impact reached Microsoft and third-party applications that depend on Azure AD for authentication.
01 · CONTEXT
When the identity provider is everyone's dependency
From around 19:00 UTC on March 15, 2021 until 09:25 UTC, customers may have encountered errors in authentication operations. The impact reached Microsoft and third-party applications that depend on Azure AD for authentication.
Microsoft's preliminary post attributes the incident to an error in the rotation of the keys that Azure AD uses in OpenID and other identity protocols, for cryptographic signing operations. The case is therefore a problem of disponibilidade that originates in a key rotation operation.
Before the failure, the expected behavior is this: Azure AD publishes the signing key metadata at a global location, and applications that use these protocols fetch that metadata and keep it cached.
The user authenticates with the identity service, which issues a token signed with one of its keys.
The identity service publishes the signing key metadata at a global location.
The application fetches this metadata and keeps a cached copy.
02 · THE CHAIN OF EVENTS
A key removed by automation
As a security hygiene measure, an automated system removes, on a time schedule, keys that are no longer in use. In recent weeks, one specific key had been marked as retain for longer than normal, to support a complex cross-cloud migration.
This situation exposed a bug: the automation ignored the retain state and removed precisely that key.
| Elemento | What the post describes |
|---|---|
| Removal automation | Removes, on a time schedule, keys that are no longer in use |
| Retained key | Marked as retain for longer than normal, for a complex cross-cloud migration |
| Falha | The automation ignored the retain state and removed that key |
The automation removes the key marked as retain, because it ignores that state.
The public key metadata changes at 19:00 UTC.
Applications fetch the new metadata and stop trusting tokens signed with the removed key.
End users can no longer access these applications.
The service telemetry identifies the problem and the engineering team is paged automatically.
The key removal is identified as the cause, and the key metadata is returned to its previous state at 21:05 UTC.
03 · THE RECOVERY
Reverting the metadata does not revert the caches
Microsoft rolled the metadata back to its previous state at 21:05 UTC. However, applications needed to fetch the reverted metadata and renew their caches.
The post states that time to mitigation varies by application, because of server implementations that handle the cache in different ways.
A subset of Storage resources had residual impact because of cached metadata. Microsoft pushed an update to invalidate those entries and force a refresh, and mitigation for the still-affected customers was declared at 09:25 UTC.
The key metadata returns to its previous state.
For a subset of Storage resources, the cached metadata kept the residual impact.
An update invalidates the cached entries and forces a refresh from the source.
04 · WHAT WAS MISSING
Backup authentication and safe deployment
In the earlier September incident, Microsoft had mentioned rolling out a backup Azure AD authentication. In this case it did not help: it covered token issuance, but not validation, which depended on the affected metadata endpoint.
The backup authentication covered token issuance.
Token validation depended on the affected metadata endpoint.
With no coverage for validation, the backup authentication did not help in this case.
Azure AD had a multi-phase effort under way to protect the backend's safe deployment system (SDP). The first phase protects adding a new key; the key removal component was in the second phase, planned for mid-year.
| Etapa | What the post states |
|---|---|
| First phase | Protects adding a new key |
| Second phase | Includes the key removal component, planned for mid-year |
| In the meantime | Additional safeguards in the key removal process until the second phase is complete |
05 · LESSONS
What the design needs to prove
In any system with a central identity provider, it is worth separating two paths and asking which one each failure goes through: issuing credentials and validating them. A contingency plan only covers what it was designed to cover.
Removing a shared artifact deserves the same rigor of progressive rollout as creating one: the change reaches a small part of the consumers first and only advances if the health signals stay normal.
Reverting at the source only helps those who re-read the source. Metadata consumers need a predictable path to renew or invalidate the cache, and whoever operates the system needs to know how to use it under pressure. Alerts for observabilidade about validation failures shorten the time to detection.
Frequently asked questions
What is Azure AD Mar 2021: rotation removes signing key?
Real incident. Key points: authentication and authorization and progressive deploys.
What does the Azure AD Mar 2021: rotation removes signing key design cover?
It is organized in these sections: When the identity provider is everyone's dependency, A key removed by automation, Reverting the metadata does not revert the caches, Backup authentication and safe deployment, and What the design needs to prove.
How long is Azure AD Mar 2021: rotation removes signing key and what level is it?
It takes about 14 minutes to read and is rated Senior level.
Now design it yourself
Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.