Load balancers and application delivery controllers (ADCs) terminate TLS for most customer-facing services, so they are the place where a missed renewal turns into a visible outage. A single listener can carry dozens of certificates, each one a machine identity with its own private key, issuer, expiry date and owner. When those certificates are renewed by hand, the work depends on a calendar reminder, a person who remembers the change process and an engineer who knows which profile or listener to update. This guide sets out a repeatable pattern for automating certificate issuance, renewal and rotation on four common platforms: AWS Application Load Balancer (ALB), Azure Application Gateway, F5 BIG-IP and NetScaler ADC.
The guide focuses on the delivery tier: how a renewed certificate actually reaches the listener, how to prove it arrived, and how to stop the automation itself from causing an outage. For the issuing side, see the ACME and Automated Certificate Management Guide, and for the AWS issuing and private CA service in depth, see the AWS Certificate Manager and Private CA Guide.
Key takeaways
- Most load balancer expiry outages come from certificates that were imported or uploaded by hand, because those certificates sit outside any managed renewal process.
- Automation has three parts that must all work: issuance (getting a new certificate), delivery (placing it on the listener or profile) and verification (proving the live endpoint now serves it).
- Where the platform can pull a certificate from a managed store, such as AWS Certificate Manager or Azure Key Vault, prefer that over pushing files to the device.
- Where the platform needs a push, treat the automation account as a privileged non-human identity with narrow scope, short-lived credentials and full logging.
- The automation can fail silently. Monitor the certificate the endpoint actually presents, not only the certificate in the store.
- Keep the default certificate, the SNI list and every partition or virtual server in the inventory. Forgotten listeners are where the last manual certificate usually hides.
Why load balancers concentrate expiry risk
Load balancers sit in front of many applications at once. A single HTTPS listener can serve many host names through Server Name Indication (SNI), with a separate certificate for each. That is efficient, but it means one device carries a large share of the organisation's public TLS certificates, often owned by different application teams.
Three patterns make this tier fragile. First, certificates are often bought from a public CA, downloaded as a PFX or PEM bundle and uploaded by an engineer during a change window. Nothing renews that certificate except another change. Second, ownership is split: the network team owns the device, the application team owns the domain, and a third team may own the CA account. Third, certificate replacement on an ADC usually touches more than one object, such as a certificate-key pair, an intermediate chain and an SSL profile, so the change is easy to do partly.
Shorter public certificate lifetimes make manual handling harder each year. The Certificate Expiry Outages and 47-Day TLS Certificates Guide covers the timeline and the programme case. This guide assumes the decision to automate has been made and focuses on how to do it at the load balancer.
The automation pattern: issue, deliver, verify
Every platform in this guide fits the same three-stage model. Designing for all three stages, rather than only the first, is what separates a working renewal pipeline from one that renews certificates nobody is serving.
Issue
A certificate source produces a new certificate before the old one expires. The source can be a managed service that renews on its own, an ACME client that requests a new certificate from a public or private CA, or an enterprise certificate platform that calls the CA through an API. Use DNS-based domain validation where you can, because it does not depend on the load balancer being reachable on port 80.
Deliver
The new certificate and key reach the listener. There are two models:
- Pull: the load balancer references a certificate in a managed store and picks up new versions itself. The private key never leaves the cloud provider's control plane as a file.
- Push: an external automation account uploads the certificate and key to the device and updates the profile or listener binding through an API or command line.
Verify
An independent check connects to the public endpoint, reads the certificate actually presented for each host name, and compares its serial number and expiry against what the inventory expects. Verification closes the loop. Without it, a pipeline can renew a certificate in the store while the device keeps serving the old one.
Platforms covered
The four platforms below are listed in alphabetical order. Each section describes that platform's own mechanism, based on its public documentation, and is not a comparison.
| Platform | Delivery mechanism described in its documentation | Documentation |
|---|---|---|
| AWS Application Load Balancer | HTTPS listener default certificate and certificate list, using certificates from AWS Certificate Manager | SSL certificates for your Application Load Balancer |
| Azure Application Gateway | Key Vault certificate reference using a user-assigned managed identity | TLS termination with Key Vault certificates |
| F5 BIG-IP | ACME client with an HTTP-01 challenge iRule and scheduled runs, as described in an F5 community article | Automating Certificate Management on F5 BIG-IP |
| NetScaler ADC | NITRO API, Terraform and Ansible tooling in the NetScaler Automation Toolkit | NetScaler documentation |
AWS Application Load Balancer with AWS Certificate Manager
An ALB HTTPS listener needs at least one X.509 server certificate. AWS documents that each HTTPS listener must have exactly one default certificate, used when a client does not send SNI or when no certificate in the certificate list matches the requested host name. The certificate list lets one listener serve multiple domains on the same port, each with its own certificate.
AWS recommends creating certificates in AWS Certificate Manager (ACM), which integrates directly with Elastic Load Balancing. According to the ACM documentation, ACM renews Amazon-issued certificates automatically when they use DNS validation, and sends email notices otherwise. A renewed certificate keeps the same ARN, so the listener does not need to be updated. ACM lists the certificates that are eligible for managed renewal, including those associated with another AWS service such as Elastic Load Balancing, and the ones that are not, including imported certificates, already expired certificates and ACME-issued certificates, whose renewal is handled by the ACME client.
The practical rules for automation on ALB follow from that:
- Use ACM-issued, DNS-validated certificates wherever the domain allows it, and keep the validation CNAME records in place permanently. Removing them breaks future renewals.
- Treat imported certificates as manual. AWS states that for certificates imported into ACM you must monitor expiry and renew before the certificate expires. If a business reason requires a third-party CA, build a pipeline that re-imports to the same ARN and add it to the verification checks.
- Remember that ACM is regional. AWS notes that certificates for the same domain in different Regions are renewed independently, so a multi-Region deployment has one certificate per Region to track.
- Check the certificate list, not only the default. AWS explains that when several certificates match a host name, the load balancer selects the best one the client supports, preferring an unexpired certificate. Old entries left in the list are clutter at best and a surprise at worst, so remove superseded certificates after each rotation.
- Use the access logs. ALB access log entries record the host name the client requested and the certificate presented, which gives a cheap way to confirm which certificate is in use per host.
AWS also notes that renewing or replacing a certificate does not affect in-flight requests already received by a load balancer node. New requests use the renewed certificate. That makes rotation low risk, provided the new certificate covers every name the listener serves. Remember that a wildcard such as *.example.com covers only one subdomain level and does not cover the apex domain.
Azure Application Gateway with Key Vault
Application Gateway v2 can reference TLS server certificates stored in Azure Key Vault for HTTPS listeners. Microsoft documents that the gateway uses a user-assigned managed identity to retrieve certificates, that only one managed identity can be used per gateway, and that certificates must be in PFX format with an exportable private key and status Enabled. Only software-protected certificates are supported for this integration, not HSM-protected ones.
Rotation works through polling. Microsoft states that gateway instances poll Key Vault every four hours for a renewed certificate version, and that any change to the gateway configuration forces an immediate check. The key setting is the secret identifier:
- Use a versionless secret ID, for example
https://myvault.vault.azure.net/secrets/mysecret/. A versioned ID pins the gateway to one version, and it will not rotate. - Grant the minimum role. With the Azure RBAC permission model, the managed identity needs the Key Vault Secrets User role. With vault access policies, it needs Get permission on secrets. Do not grant broader vault roles to the gateway identity.
- Plan for network controls. Key Vault treats Application Gateway as a trusted service through its managed identity, so the vault firewall can block other traffic and still allow the gateway. If the vault uses a private endpoint, link the
privatelink.vaultcore.azure.netprivate DNS zone to the gateway's virtual network. - Use code for anything beyond basic setup. Microsoft notes the portal supports only Key Vault certificates, and that secrets, RBAC-model references and cross-subscription references need PowerShell, Azure CLI, Bicep or ARM templates.
The most important failure mode is documented directly: if the gateway cannot access the Key Vault or cannot find the certificate object, it automatically disables the listener. Microsoft surfaces this through Resource Health and an Azure Advisor recommendation titled "Resolve Azure Key Vault issue for your Application Gateway". In practice this means that a change to vault access, such as removing a role assignment during a permissions clean-up or tightening the vault firewall, can take HTTPS listeners offline. Add an alert on that Advisor recommendation and on Resource Health, and include the gateway identity in any review of Key Vault access before revoking it.
The certificate in Key Vault still has to be renewed. Key Vault can renew certificates from an integrated issuer, or a pipeline can import new versions from another CA. Either way, the gateway only rotates when a new version exists under the same versionless name. The Azure Key Vault Security Guide covers vault access and logging.
F5 BIG-IP
On BIG-IP, a certificate in use is a combination of a certificate object, a key object, an optional chain and a client SSL profile that references them, attached to one or more virtual servers. Automation has to update the certificate and key and make sure the profile points to the right objects.
An F5 community technical article describes one ACME-based approach, built on the dehydrated ACME client adapted for BIG-IP. In that approach:
- Domains and their CA details are held in a data group (
dg_acme_config), and challenge tokens are held in a second, temporary data group that is cleared when the process completes. - An iRule attached to the port 80 virtual server answers the HTTP-01 challenge from the ACME server. The article mentions DNS validation through a TXT record as an alternative.
- The handler script runs from
/shared/acmeand can be scheduled, for example weekly, with a cron-style schedule option. - The article notes that placing the new certificate and key into an SSL profile is a separate step, and that the setup needs DNS already pointing at the virtual server and internet access to reach the CA.
Whichever tool issues the certificate, the following controls apply on BIG-IP:
- Use a dedicated automation account with only the role needed to manage certificate, key and profile objects in the target partitions. Do not run certificate automation as the admin account.
- Renew in place or swap by name with a plan. Decide whether the pipeline overwrites the existing certificate and key objects or creates new named objects and repoints the profile. Creating new objects gives an easy rollback; overwriting keeps profile references stable. Write the choice down and apply it consistently.
- Cover every partition and device. Multi-partition and high-availability deployments need the pipeline to target each partition and to confirm that configuration has synchronised to peers.
- Protect the private keys. Keys generated on the device for ACME stay on the device. Keys generated elsewhere and pushed in should travel over the management API only, and never through ticket attachments or shared drives.
The F5 BIG-IP Hardening Guide covers management plane protection, which matters because a certificate automation account is a route into the management interface.
NetScaler ADC
On NetScaler ADC, server certificates are held as certificate-key pairs that are bound to SSL virtual servers, with intermediate CA certificates linked to form the chain. Automation therefore has to place the new certificate and key files on the appliance, update the certificate-key pair, keep the chain link intact and confirm that the bound virtual servers present the new certificate.
NetScaler documents an automation toolkit that brings together its APIs, infrastructure as code, templates and SDKs, and links to the NITRO API, Terraform and Ansible. Those interfaces are the usual delivery route for a push-based pipeline:
- Keep certificate state in code. Hold the certificate-key pair names, bindings and chain links in Terraform or Ansible definitions so a rebuild or a new appliance reproduces them.
- Use a scoped API identity. Create a dedicated NITRO user with a command policy limited to SSL certificate and file operations, and keep its credentials in a secrets manager rather than in pipeline variables.
- Update, then save and synchronise. A certificate change that is not saved to the configuration or not propagated to a high-availability peer is lost on failover or reboot. Add both steps to the pipeline and verify them.
- Check the chain after every change. A renewed leaf certificate may be issued under a different intermediate. Confirm the linked intermediate matches the new issuer before you close the change.
Because the management interface of an ADC is a high-value target, the NetScaler ADC and Gateway Hardening Guide should be applied before any automation account is created.
Securing the automation identity
Every push pipeline introduces a non-human identity with the power to replace the certificate on a production listener. Whoever controls that identity can serve a certificate of their choice for the organisation's domains, or take a listener offline. Treat it accordingly:
- Give each pipeline its own identity per environment, and never share it with human administrators.
- Prefer workload identity and short-lived tokens, such as cloud role assumption or managed identity, over static passwords or API keys on the device.
- Restrict the identity to certificate, key and profile operations on named objects or partitions.
- Log every certificate change with the identity, the object and the new serial number, and send those logs to the SOC.
- Alert when a certificate on a listener changes outside the pipeline, which is a sign of either manual drift or misuse.
Pull models reduce this exposure because the device fetches from a managed store with its own identity. The store's access policy then becomes the control point, which is why Key Vault and ACM permissions deserve the same review as device admin roles.
Verification and monitoring
Store-side monitoring tells you a certificate is due. Endpoint-side monitoring tells you what users actually see. Run both.
- Build the target list from the inventory, including every host name in every SNI list and the default certificate on each listener. The How to build a TLS certificate inventory guide explains how to assemble that list.
- Probe each host name with SNI set, record the presented serial number, issuer and expiry, and compare with the expected values.
- Alert on three conditions: a presented certificate within your renewal threshold, a presented certificate that differs from the store's current version for longer than the platform's normal pickup time, and a listener that stops answering TLS.
- Watch platform signals, such as Azure Advisor and Resource Health for Application Gateway and ALB access logs for certificate selection.
- Feed results back into the inventory so that each certificate shows its last verified deployment.
Certificate Transparency monitoring adds a useful outside view: it shows every publicly trusted certificate issued for your domains, including ones that never reached a load balancer. See the Certificate Transparency Monitoring Guide for Web Teams.
Common failure patterns
- Imported certificate assumed to be managed. A certificate imported into a managed store sits next to auto-renewing ones and looks the same in a list, but it is not renewed.
- Versioned reference. An Application Gateway listener pointing at a versioned Key Vault secret ID will keep serving the old version after renewal.
- Vault access removed during a clean-up. Removing the gateway managed identity's role, or tightening the vault firewall, leads the gateway to disable the listener.
- Validation records deleted. DNS validation CNAMEs removed as "unused" break the next managed renewal.
- Profile not updated. A new certificate and key are created on an ADC but the SSL profile or virtual server binding still points to the old objects.
- Chain mismatch. The leaf is renewed under a new intermediate but the old intermediate stays linked, so some clients fail to build a path.
- High-availability peer missed. The change is made on the active unit and lost after failover.
- Forgotten listener. A legacy virtual server, a second partition or an old Region still holds a manually uploaded certificate that is outside the pipeline.
- Over-privileged automation account. The pipeline runs as a full administrator, so a compromise of the CI system gives full control of the ADC.
Practitioner checklist
- List every HTTPS listener, virtual server, partition and Region, with its default certificate and full SNI certificate list.
- Mark each certificate as managed renewal, pipeline renewal or manual, and set a date to remove every manual entry.
- On ALB, use ACM-issued DNS-validated certificates and keep validation records permanently.
- On Application Gateway, use versionless Key Vault secret IDs, the Key Vault Secrets User role and alerts on Resource Health and the Key Vault Advisor recommendation.
- On BIG-IP and NetScaler, run certificate automation through a dedicated, scoped API identity, and include profile updates, chain links, configuration save and HA synchronisation in the pipeline.
- Store automation credentials in a secrets manager, or replace them with workload identity, and log every certificate change.
- Probe every host name with SNI after each renewal and daily thereafter, and alert when the presented certificate differs from the expected one.
- Remove superseded certificates from listener lists and device stores after a successful rotation.
- Rehearse a rollback: restore the previous certificate on one listener in a test environment and time it.
Standards and references
- AWS: SSL certificates for your Application Load Balancer
- AWS: Managed certificate renewal in AWS Certificate Manager
- Microsoft Learn: TLS termination with Key Vault certificates for Application Gateway
- F5 DevCentral: Automating Certificate Management on F5 BIG-IP
- IETF: RFC 8555, Automatic Certificate Management Environment (ACME)
- NIST: SP 1800-16, Securing Web Transactions: TLS Server Certificate Management
- NIST: SP 800-53 Rev. 5 (SC-12 Cryptographic Key Establishment and Management, SC-17 Public Key Infrastructure Certificates)
Related NHI Mgmt Group resources: AWS Certificate Manager and Private CA Guide · ACME and Automated Certificate Management Guide · Certificate Expiry Outages and 47-Day TLS Certificates Guide · Machine Identity, PKI and Certificate Lifecycle Guide