Operations

Azure Key Vault auto-renewal: how long until App Gateway, App Service, and Front Door serve the new certificate

November 8, 202612 min readCertPulse Engineering

Key Vault makes renewal look finished. The lifetime action is set, the issuer is configured, "Automatically renew at a given percentage lifetime" is selected. Then a listener serves an expired certificate anyway, and the vault shows a new version that was issued three weeks earlier. I've been on that bridge call. The vault did its job. Nobody downstream was told about the new version, and one consumer was still pointed at an old version that nobody had ever moved it off.

Azure Key Vault certificate auto renewal is a pull model. The vault creates versions. Application Gateway, App Service and Front Door each decide when to go looking for a new one, and some never look at all. Below I cover how each of them picks up a renewal, where each one fails without telling you, and how big your renewal window needs to be now that the CA/B Forum's SC-081v3 schedule is eating the slack you used to have.

What "renewed" means inside Key Vault

A Key Vault certificate is a versioned object. When an AutoRenew lifetime action fires, Key Vault creates a new version with a new identifier and a new secret holding the PFX. The previous version stays enabled and valid until its own notAfter date. Your gateway gets no webhook and no config push. The only thing that changes is where the versionless URI points.

Whether renewal happens without a human depends on the issuer:

  • With an integrated issuer (DigiCert or GlobalSign), Key Vault places the order using your CA account credentials and merges the result itself. These partners only issue OV and EV certificates through Key Vault, so an order can still stall at the CA because organization validation lapsed, domain validation needs redoing, or someone rotated the account credential. Under SC-081v3, DCV reuse dropped to 200 days in March 2026. It drops to 100 days in March 2027 and 10 days in March 2029. By that last phase nearly every renewal needs fresh DCV, and an integrated order waiting on DCV just sits there as a pending certificate operation that nobody checks.
  • With a non-integrated CA, Key Vault generates the key and a CSR, then waits. Someone has to download the CSR, submit it to the CA and merge the signed certificate back. Microsoft's docs say plainly that autorotation doesn't apply here, so the most your lifetime action can do is email the vault's contacts. If whoever did this last year has left, those emails land in a list nobody reads.
  • Self-signed certificates auto-renew fine. They also don't matter for anything public-facing.

Then there's the trigger. New certificates in the portal default to 12 months of validity with auto-renewal at 80% of lifetime. Apply that 80% to the CA/B Forum caps and watch the margin disappear:

Max lifetime In effect from Renewal at 80% Days left when it fires
398 days before March 2026 ~day 318 ~80
200 days March 15, 2026 day 160 40
100 days March 15, 2027 day 80 20
47 days March 15, 2029 ~day 38 ~9

Eighty days covered almost any amount of downstream sloppiness. Nine won't.

How each consumer picks up the new version

Application Gateway

Of the three, Application Gateway's Key Vault certificate rotation is the best documented. v2 instances poll Key Vault every four hours and rotate the listener certificate if a newer version exists. That only works if the listener references a versionless secret identifier, meaning the URI stops at the secret name. Any change to the gateway, even a tag edit, forces an immediate check, which is handy when four hours is too long. If the listener points at a versioned identifier instead, the gateway serves that exact version until it expires, however many renewals happen in the meantime.

The gateway authenticates with a user-assigned managed identity, and it only gets one. That identity needs Get on secrets or the Key Vault Secrets User role. If the gateway can't reach the vault or can't find the object, it puts the listener in a disabled state. One broken permission kills the listener outright. You'll see it in Resource Health and as an Advisor recommendation titled "Resolve Azure Key Vault issue for your Application Gateway", but only if someone has alerts on one of them.

App Service

App Service imports a Key Vault certificate by vault and secret name, so it always tracks the latest version. Microsoft documents that renewed versions sync automatically within 24 hours and the TLS binding updates with them. If you don't want to wait, open the certificate's menu under Bring your own certificates (.pfx) and hit Sync.

Two things catch people out.

The first is identity. App Service doesn't fetch the certificate with your app's managed identity. It uses the App Service resource provider's service principal (Microsoft Azure App Service, app ID abfa0a7c-a6b6-4736-8310-5855508787cd in public cloud), and that principal needs the Key Vault Certificate User role or Get on secrets and certificates. No team owns it, so it looks like an orphan, and that's exactly why it gets removed in access reviews. Microsoft also notes that Bicep and ARM role assignments usually need the principal's object ID in your tenant, not the app ID, so templates copied from somewhere else fail in confusing ways.

The second is App Service's version of pinning: an uploaded PFX. Someone exports the certificate from Key Vault, uploads the file, and it sits in the same certificate list as a real import. Uploaded certificates never get an automatic binding update. They just expire.

Front Door

Front Door Standard and Premium reference Key Vault through a secret resource, and when you create it you pick a version: Latest, or a specific one. With Latest, Microsoft says a new version can take up to 72 hours to deploy. With a specific version, you reselect it by hand after every renewal, forever. You can't flip an existing secret between the two modes either. You add a new certificate and point the domain at it.

Front Door is also the fussiest of the three:

  • The vault has to be in the same subscription as the Front Door profile.
  • If the vault has network restrictions, the trusted Microsoft services bypass has to be on.
  • Access goes through a managed identity or the Microsoft.AzureFrontDoor-Cdn service principal with Get on secrets and certificates. The app registration method is being deprecated.
  • No elliptic curve certificates. If someone "modernizes" the issuance policy to EC, Key Vault renews successfully and hands you a certificate Front Door can't use.

The quiet failure modes

Those pickup intervals are the happy path. Everything below fails silently right up until expiry.

Lost access is the big one, and it usually starts far from the people who own the gateway. The classic case is migrating a vault from access policies to Azure RBAC. Access policies stop applying the moment the permission model changes. Unless role assignments already exist for the gateway identities, the App Service resource provider and Front Door's principal, they all lose access at once. Nothing breaks that day. App Service and Front Door keep serving what they already have until it expires. Application Gateway disables the listener as soon as it notices.

Network rules do the same thing from another direction. Switch a vault to selected networks and any consumer without a working network path is cut off. For Application Gateway that path is either a Microsoft.KeyVault service endpoint on the gateway subnet plus the trusted-services bypass, or a private endpoint with the privatelink.vaultcore.azure.net zone linked to the gateway's VNet. Custom DNS that returns the vault's public address instead of the private one fails exactly like an access denial, which makes for a fun afternoon of debugging.

Disabled and deleted versions are sneakier. Say someone disables the newest version after a bad issuance. A versionless reference doesn't fall back to the previous one. It resolves to the disabled version and gets "Operation get is not allowed on a disabled secret." Soft delete is worse. Every reference returns not-found, and you can't create a replacement under the same name until someone recovers or purges the old one.

The one I see most often is infrastructure as code undoing the fix. In Terraform, azurerm_key_vault_certificate exports both secret_id, which is versioned, and versionless_secret_id. Plenty of modules wire the versioned one into the gateway's ssl_certificate block. Bicep has the same split between secretUriWithVersion and secretUri, and Front Door's secret has an explicit use-latest flag. Someone spots the pinned version at 2am and fixes the gateway in the portal. The next pipeline run writes the old version ID right back. There's a slower variant too. The versioned reference shows a diff after every renewal, someone adds ignore_changes to shut the plan up, and now the gateway is pinned for good.

Adding up the real timeline

Four stages sit between Key Vault deciding to renew and every client seeing the new certificate:

  1. Trigger. It fires whenever your lifetime action says it should.
  2. Issuance. This takes minutes if validation is current and days if it isn't, and "isn't" gets more common as DCV reuse shrinks. With a non-integrated CA, it takes as long as the human takes.
  3. Pickup. Up to 4 hours for Application Gateway, 24 for App Service, 72 for Front Door. Gateway instances poll independently, so for a while different instances can serve different certificates.
  4. Drain. Existing connections keep the certificate they negotiated. This mostly matters for long-lived connections, and for monitoring that reuses a connection and reports what it saw an hour ago.

What the defaults don't account for is that a failure makes you sit through the pickup window twice: once to find out nothing changed, and again after the fix. A permission problem on a vault behind Front Door costs six days of waiting, and that's before you count the time spent figuring out what broke.

Now look at the validity field. Key Vault's policy takes validity in whole months, and the caps don't line up with months. Seven months is more than 210 days, so 6 months (181 to 184 days, depending on the calendar) is the longest you can request under the 200-day cap. Under 100 days you get 3 months. Under 47 days the only whole number that fits is 1 month, which is 28 to 31 days. That's about two-thirds of the allowed lifetime, so you renew roughly 50% more often than you need to, and 80% of a 30-day certificate leaves you six days of margin. The portal still defaults new certificates to 12 months. What a CA does with a request above the cap is up to the CA, so check the notAfter on your most recent version instead of trusting the policy.

My advice is to stop using the percentage trigger. Switch to days-before-expiry, which is tied to the actual expiry date rather than a percentage of whatever the CA happened to issue, and size it around your slowest consumer. As a floor, add up:

  • twice the slowest consumer's pickup window,
  • plus your worst realistic issuance delay,
  • plus a weekend,
  • plus however long your team takes to act on an alert.

For Front Door on one-month certificates, that puts renewal around the halfway point. Renewing early means more issuances, so check how your DigiCert or GlobalSign contract counts them before you change policy across a whole vault.

Detection that doesn't depend on trusting the platform

Every signal so far comes from the vault, and the vault thinks it succeeded. What matters is what the endpoint serves. Build detection in layers, cheapest first.

Cheapest is Event Grid on the vault. Subscribe to Microsoft.KeyVault.CertificateNewVersionCreated and treat each event as the start of a timer. Within the slowest consumer's window, every endpoint using that certificate should be serving the new serial. Subscribe to VaultAccessPolicyChanged too. It fires on permission model switches, which is the change behind most mass lockouts.

CertificateNearExpiry is less useful than it looks. It always fires 30 days before expiry. With 100-day certificates on the default trigger, that's ten days before every normal renewal. With 47-day certificates, it fires on every single certificate 17 days after issuance. That's noise, and people learn to ignore it fast.

The signal worth having is the event that never arrives. If no new-version event shows up by the date your lifetime action should have fired, the renewal is stuck at the CA.

Next is an inventory of references. Use Resource Graph or the ARM API to list:

  • every Application Gateway SSL certificate with a Key Vault secret ID
  • every Microsoft.Web/certificates resource
  • every Front Door secret

Flag gateway IDs that end in a version segment, Front Door secrets not set to Latest, and App Service certificates with no Key Vault source at all. App Service certificate resources also carry a Key Vault secret status field that reports values like AzureServiceUnauthorizedToAccessKeyVault. Alert on that field directly.

Last is probing the endpoints, and it's the only layer that tells you what users actually get. For each public hostname, connect with the correct SNI, read the leaf certificate's serial and thumbprint, and compare them to the vault's current version. A mismatch inside the consumer's pickup window is normal. A mismatch after the window is your alert, and the time left on the old certificate tells you how urgent it is. Hit each gateway more than once so you reach different instances, and probe Front Door from several regions.

What to do this week

  • Pull every Key Vault reference across your subscriptions and fix the versioned ones. Start with the IaC, or the next pipeline run will undo your portal fixes.
  • Before anyone touches a vault's permission model, confirm role assignments exist for gateway identities, the App Service resource provider and Front Door's principal.
  • Move lifetime actions to days-before-expiry, sized for your slowest consumer.
  • Route Event Grid and Application Gateway Resource Health alerts to something that pages a person.
  • Probe what your endpoints serve and compare it to the vault.

CertPulse automates that last comparison. It inventories Key Vault certificates next to the external endpoints serving them, so a renewed version that never reached the listener shows up as a mismatch instead of a 2am expiry. Use it or script your own, but check the endpoint. The vault only knows what it issued. Your users get whatever the endpoint serves.

This is why we built CertPulse

CertPulse connects to your AWS, Azure, and GCP accounts, enumerates every certificate, monitors your external endpoints, and watches Certificate Transparency logs. One dashboard for every cert. Alerts when auto-renewal fails. Alerts when certs approach expiry. Alerts when someone issues a cert for your domain that you didn't request.

If you're looking for complete certificate visibility without maintaining scripts, we can get you there in about 5 minutes.