
Certificate expiry on a proxy gateway is rarely a simple calendar problem. A client may validate the certificate presented by the proxy, the proxy may validate an upstream service, and a TLS inspection layer may create another trust boundary. Long-lived connections can hide a bad deployment until traffic is recycled. The result is an outage that appears sudden even though the warning was visible for weeks.
This runbook turns certificate renewal into a repeatable operational process. It covers inventory, alert thresholds, preflight checks, staged rotation, verification, rollback, and evidence collection. Use it for forward proxies, HTTPS proxy endpoints, API gateways, regional egress gateways, and managed proxy fleets.
1. Map every TLS boundary before setting alerts
Draw the actual connection path, not the intended architecture. Record each hop that terminates or originates TLS:
- application to proxy gateway;
- proxy gateway to an upstream target after CONNECT;
- proxy gateway to a control plane or authentication endpoint;
- load balancer to proxy nodes;
- inspection appliance to client or origin;
- health checker to gateway.
For each boundary, record the hostname, expected certificate authority, certificate owner, renewal mechanism, deployment target, and rollback owner. Also record whether Server Name Indication is required and whether IPv4 and IPv6 reach the same certificate set. A dual-stack service can pass on one address family and fail on the other.
Do not store private keys, bearer tokens, proxy passwords, or full session material in the inventory. Fingerprints, serial numbers, issuer names, validity windows, and public certificate chains are normally sufficient for monitoring.
2. Monitor the certificate clients actually receive
Checking a certificate file on disk is not enough. Query each public proxy hostname through every production path: each region, load balancer, address family, and important port. Capture at least:
- leaf certificate subject and subject alternative names;
- issuer and complete intermediate chain;
- not-before and not-after timestamps in UTC;
- SHA-256 fingerprint or serial number;
- negotiated protocol and cipher family;
- hostname and address family used;
- observed node, region, or load-balancer pool where available.
The monitor should validate the chain and hostname with a normal trust store. A probe that merely reads the expiry timestamp can report green while real clients reject an incomplete chain or hostname mismatch.
Use several thresholds rather than one emergency alert. A useful starting policy is 45 days for ownership review, 30 days for renewal confirmation, 14 days for deployment scheduling, 7 days for escalation, and 24 hours for incident response. Adjust these windows to the certificate lifetime and your change process.
3. Separate expiry risk from deployment risk
The replacement certificate can be valid and still break production. Before rollout, verify:
- The requested hostname appears in the subject alternative names.
- The certificate is already valid on the deployment clock.
- Every required intermediate certificate is included in the correct order.
- The private key matches the public certificate without exporting the key.
- The key type and signature algorithm are supported by older required clients.
- The gateway selects the right certificate for each SNI name.
- IPv4, IPv6, regional, and disaster-recovery listeners use the intended bundle.
- Health checks validate the same hostname and trust path as production clients.
Clock drift deserves a specific test. A certificate deployed seconds before its validity begins can fail on nodes whose clocks lag. Maintain time synchronization and allow a safe overlap window.
4. Rehearse rotation in a representative environment
Build a small test matrix before production. Include one current client, one oldest supported client, both address families, each authentication mode, one CONNECT tunnel, one direct HTTPS proxy request if supported, and one long-lived pooled connection.
The rehearsal should answer three questions:
- Can a new connection complete TLS and authenticate?
- Can the proxy establish and validate the upstream connection?
- What happens to existing connections during reload or node replacement?
Test failure cases deliberately: omit an intermediate certificate, use an incorrect hostname, present an untrusted chain, and simulate a clock outside the validity window. Confirm that monitoring distinguishes these failures instead of collapsing them into a generic timeout.
For deeper TLS diagnosis, use the internal troubleshooting workflow in HTTPS proxy TLS troubleshooting. If pooled sessions complicate the result, review proxy connection pooling.
5. Rotate with overlap, canaries, and a rollback trigger
Avoid a fleet-wide replacement as the first production test. Use this sequence:
- Load the new certificate bundle into a small canary pool.
- Verify the fingerprint and complete chain from outside the node.
- Send synthetic proxy traffic through the canary, including authentication and an upstream request.
- Observe handshake failures, connection latency, HTTP status mix, authentication errors, and upstream TLS errors.
- Increase traffic gradually across regions and address families.
- Keep the previous certificate bundle available until the observation window closes.
- Retire the old bundle only after all listeners and recovery paths have been verified.
Define rollback conditions before starting. Examples include a statistically meaningful rise in TLS alerts, a new hostname mismatch, missing-chain errors, or a canary conversion failure. Roll back the certificate bundle or remove the affected pool from service. Do not respond by disabling certificate verification.
6. Force fresh connections during verification
Connection reuse can produce a false sense of safety. A pooled TCP/TLS session established before rotation may continue working without seeing the new certificate. Verification therefore needs both paths:
- an existing session to confirm graceful continuity;
- a forced new connection to confirm the new certificate is presented and trusted.
Drain or recycle a controlled subset of connections after deployment. Verify new handshakes from several client networks, then confirm that normal connection pooling recovers. Do not terminate the entire fleet simultaneously unless the service design explicitly requires it.
7. Classify failures by evidence
Use the observed certificate and validation error to route the incident:
- Expired or not yet valid: check renewal timing, deployment clocks, and the certificate selected by SNI.
- Hostname mismatch: compare the requested hostname with the subject alternative names and listener configuration.
- Unknown issuer: check the client trust store and whether the intended private or public authority is in scope.
- Incomplete chain: inspect the gateway bundle and confirm every required intermediate is served.
- Old certificate still presented: find stale nodes, secondary listeners, IPv6 paths, or load-balancer pools.
- Handshake succeeds but proxy request fails: separate gateway TLS from proxy authentication, CONNECT policy, upstream TLS, and origin behavior.
- Only some clients fail: compare protocol versions, signature algorithms, trust-store age, SNI behavior, and inspection policies.
Record timestamps in UTC and hash or redact client identifiers. Preserve enough evidence to compare nodes without retaining sensitive payloads.
8. Close the change and improve the next rotation
After rollout, verify every monitored endpoint again and archive the new fingerprint, issuer, validity period, deployment time, and approving owner. Confirm that expiry alerts now track the new certificate rather than a file or unused listener.
Review any failed probe, slow region, or manual step. Convert repeated checks into automation, but keep human-readable rollback instructions. Coordinate credential changes separately through the proxy credential rotation guide; certificate and credential rotation may share a window, but they have different failure modes.
Operational checklist
- All proxy hostnames, regions, ports, IPv4, and IPv6 paths are inventoried.
- The monitor validates hostname, chain, and expiry from the client side.
- Alert thresholds have owners and escalation routes.
- The replacement certificate passes SAN, chain, key-match, SNI, and compatibility checks.
- Current and oldest supported clients pass the rehearsal.
- Canary traffic includes authentication and a real upstream request.
- Existing and fresh connections are tested separately.
- Rollback criteria and the previous bundle are ready.
- No validation bypass is introduced.
- Final fingerprints and dates are recorded without secrets.
FAQ
Is checking the not-after date enough?
No. Real clients also validate the hostname, trust chain, validity start, supported algorithms, and sometimes policy constraints. Monitor the public listener with normal validation enabled.
Why does one region still show the old certificate?
Common causes include a stale proxy node, a secondary load balancer, an IPv6 listener, a disaster-recovery pool, or a long-lived connection. Force a fresh connection and record the resolved address and observed fingerprint.
Should we restart every proxy node after rotation?
Only if the gateway requires it. Prefer graceful reloads, canary nodes, and controlled connection draining so capacity and existing sessions remain stable.
Can we temporarily disable TLS verification to restore service?
That creates a new security and integrity risk. Roll back to the last trusted bundle, remove the bad pool, or repair the chain and hostname instead.
Compliance note
Use this runbook only on proxy infrastructure and endpoints you are authorized to operate or test. Protect private keys and credentials, minimize retained connection data, follow regional privacy and security requirements, and never weaken TLS verification merely to make a failed deployment appear healthy.
Related Recommendations
- How to Test NO_PROXY Rules Before Traffic Bypasses Your Proxy
- How to Test Proxy IP Reputation Before Production
- Python Rotating Proxy Guide: Sessions, Retries and Troubleshooting
- Proxy Error Troubleshooting: 407, 429, Timeouts and Connection Resets
- How to Forecast Residential Proxy Bandwidth Before Buying a Plan
- Residential Proxy Session Stickiness Test: Measure Stability Before You Buy
- How to Test a Multi-Region Proxy Routing Policy Before Production
- How to change the IP address of a router: This setting can easily optimize the network
- Replay Proxy Requests Safely with Chrome DevTools 152
- How to Audit Proxy Bypass and PAC Rules in Browser Automation