Prerequisites
- Target system, dependencies and environment configured.
Usage
Purpose
Certificates are the identity layer of TLS, and the most common certificate incident is embarrassingly simple: one expired in production and took a service down. Beyond expiry, unmanaged certificate sprawl means you don't know what you have, what's expiring, or what's misissued. This skill covers managing certificates across their lifecycle — issuance, renewal, revocation, and inventory — so they're an automated non-event instead of a recurring outage.
When to use it
Running any service that uses certificates (nearly all of them), or fixing a "the cert expired again" pattern. It's operational rather than deeply cryptographic, and that's the point — most certificate problems are lifecycle failures, not crypto failures.
Procedure
- Automate renewal — the single most important practice. The overwhelming majority of certificate incidents are expiries that automation would have prevented. Use ACME (Let's Encrypt/certbot) or your CA's automated issuance so certificates renew and deploy without a human remembering:
certbot renew # automated ACME renewal (run on a timer)
- Keep an inventory of every certificate — where it's deployed, its CA, expiry date, and owner. You can't manage what you can't see; certificate sprawl (certs on load balancers, services, internal systems nobody tracks) is where surprise expiries hide. Certificate Transparency logs (OSINT ct skill) can help discover your own public certs.
- Monitor expiry and alert well in advance — even with automation, monitor expiry dates and alert with enough lead time to fix a failed renewal before it becomes an outage. Automation plus monitoring is belt-and-suspenders for a high-impact failure.
- Manage issuance properly — use the right validation level, correct hostnames/SANs, strong keys (RSA-2048+/ECDSA), and a complete chain (missing intermediates is a common "works in my browser, breaks elsewhere" issue). Protect the private keys (key-management skill).
- Know your revocation path — if a private key is compromised or a cert is misissued, you need to revoke and reissue. Understand OCSP/CRL, and that revocation checking is imperfect, so short-lived certificates (which automation enables) reduce the window a compromised cert stays valid.
- For internal PKI, manage the CA carefully — the internal CA's key is a high-value target (it can issue trusted certs for anything), and internal certs need the same lifecycle discipline as public ones.
- Prefer short-lived, automated certificates — they limit exposure from key compromise and force the automation that prevents expiry incidents.
Cheatsheet
the #1 fix: AUTOMATE RENEWAL (most cert incidents = preventable expiry)
ACME / certbot / CA auto-issuance -> renew + deploy without a human
inventory (can't manage what you can't see)
every cert: location, CA, expiry, owner ; find sprawl (LBs, services, internal)
discover public certs via Certificate Transparency (OSINT ct skill)
monitor + alert on expiry with LEAD TIME (backstop for failed auto-renewal)
issuance done right
correct hostnames/SANs, strong key (RSA-2048+/ECDSA), COMPLETE chain
(missing intermediates = works here, breaks there), protect private keys
revocation: know OCSP/CRL path for compromise/misissuance
revocation checking is imperfect -> SHORT-LIVED certs limit the window
internal PKI: the CA key is high-value (can issue anything) — guard it
Reading the situation
- Manual renewal = the leading cause of certificate outages; a human will eventually forget. Automate it — this alone prevents most incidents.
- No certificate inventory = surprise expiries and misissued certs go unnoticed; you can't monitor what you don't know exists. Sprawl on load balancers and internal systems is the usual blind spot.
- No expiry monitoring = even automated renewals can fail silently, and without alerting the first sign is an outage. Monitor with lead time.
- An incomplete chain (missing intermediates) = intermittent failures ("works in Chrome, fails for this client"); a common, confusing issuance mistake.
- Long-lived certs with no revocation plan = a compromised key stays trusted for a year; short-lived automated certs shrink that window.
- Automated renewal + full inventory + expiry monitoring + short-lived certs = certificates become a non-event.
The fix / best practice
- Automate issuance and renewal (ACME/certbot/CA automation) — the highest-impact practice, preventing the expiry incidents that dominate certificate problems.
- Maintain a complete inventory with location, expiry, and owner; discover sprawl and public certs (CT logs).
- Monitor and alert on expiry with lead time as a backstop even when automated.
- Issue correctly — right SANs, strong keys, complete chain — and protect private keys (key-management).
- Have a revocation/reissue path and prefer short-lived certificates to limit compromise windows.
- Guard internal CA keys and apply the same lifecycle discipline to internal certs.
Pitfalls
- Manual renewal. The classic outage cause — someone forgets, the cert expires, the service goes down. Automate.
- No inventory. Untracked certs (load balancers, internal services) expire or get misissued unnoticed. Discover and track them all.
- No expiry monitoring. Automation can fail; without alerting you find out via outage. Monitor with lead time regardless.
- Incomplete certificate chain. Missing intermediates cause intermittent, hard-to-diagnose failures. Serve the full chain.
- Long-lived certs, no revocation plan. A compromised key stays trusted; short-lived automated certs and a known revocation path limit the damage.
References
- Let's Encrypt / ACME and certbot documentation
- CA/Browser Forum baseline requirements; NIST SP 800-57 (key/cert management)
- The tls-configuration, key-management, and OSINT certificate-transparency skills
- CWE-298 (improper validation of certificate expiration), CWE-295 (improper cert validation)
Inputs
- Relevant source code, logs, network traces, or system specifications.
Outputs
- Analysis findings, security audit report, or generated code artifacts.
1---2name: certificate-management3description: Use when managing TLS/PKI certificates across their lifecycle — issuance, renewal, revocation, and inventory — so certificates don't expire in production or become an unmanaged sprawl.4---5678## Prerequisites9- Target system, dependencies and environment configured.1011## Usage12### Purpose1314Certificates are the identity layer of TLS, and the most common certificate incident is embarrassingly simple: one expired in production and took a service down. Beyond expiry, unmanaged certificate sprawl means you don't know what you have, what's expiring, or what's misissued. This skill covers managing certificates across their lifecycle — issuance, renewal, revocation, and inventory — so they're an automated non-event instead of a recurring outage.1516### When to use it1718Running any service that uses certificates (nearly all of them), or fixing a "the cert expired again" pattern. It's operational rather than deeply cryptographic, and that's the point — most certificate problems are lifecycle failures, not crypto failures.1920### Procedure21221. **Automate renewal — the single most important practice.** The overwhelming majority of certificate incidents are expiries that automation would have prevented. Use ACME (Let's Encrypt/certbot) or your CA's automated issuance so certificates renew and deploy without a human remembering:23 ```24 certbot renew # automated ACME renewal (run on a timer)25 ```262. **Keep an inventory of every certificate** — where it's deployed, its CA, expiry date, and owner. You can't manage what you can't see; certificate sprawl (certs on load balancers, services, internal systems nobody tracks) is where surprise expiries hide. Certificate Transparency logs (OSINT ct skill) can help discover your own public certs.273. **Monitor expiry and alert well in advance** — even with automation, monitor expiry dates and alert with enough lead time to fix a failed renewal before it becomes an outage. Automation plus monitoring is belt-and-suspenders for a high-impact failure.284. **Manage issuance properly** — use the right validation level, correct hostnames/SANs, strong keys (RSA-2048+/ECDSA), and a complete chain (missing intermediates is a common "works in my browser, breaks elsewhere" issue). Protect the private keys (key-management skill).295. **Know your revocation path** — if a private key is compromised or a cert is misissued, you need to revoke and reissue. Understand OCSP/CRL, and that revocation checking is imperfect, so short-lived certificates (which automation enables) reduce the window a compromised cert stays valid.306. **For internal PKI**, manage the CA carefully — the internal CA's key is a high-value target (it can issue trusted certs for anything), and internal certs need the same lifecycle discipline as public ones.317. **Prefer short-lived, automated certificates** — they limit exposure from key compromise and force the automation that prevents expiry incidents.3233### Cheatsheet3435```36the #1 fix: AUTOMATE RENEWAL (most cert incidents = preventable expiry)37 ACME / certbot / CA auto-issuance -> renew + deploy without a human3839inventory (can't manage what you can't see)40 every cert: location, CA, expiry, owner ; find sprawl (LBs, services, internal)41 discover public certs via Certificate Transparency (OSINT ct skill)4243monitor + alert on expiry with LEAD TIME (backstop for failed auto-renewal)4445issuance done right46 correct hostnames/SANs, strong key (RSA-2048+/ECDSA), COMPLETE chain47 (missing intermediates = works here, breaks there), protect private keys4849revocation: know OCSP/CRL path for compromise/misissuance50 revocation checking is imperfect -> SHORT-LIVED certs limit the window5152internal PKI: the CA key is high-value (can issue anything) — guard it53```5455### Reading the situation5657- **Manual renewal** = the leading cause of certificate outages; a human will eventually forget. Automate it — this alone prevents most incidents.58- **No certificate inventory** = surprise expiries and misissued certs go unnoticed; you can't monitor what you don't know exists. Sprawl on load balancers and internal systems is the usual blind spot.59- **No expiry monitoring** = even automated renewals can fail silently, and without alerting the first sign is an outage. Monitor with lead time.60- **An incomplete chain (missing intermediates)** = intermittent failures ("works in Chrome, fails for this client"); a common, confusing issuance mistake.61- **Long-lived certs with no revocation plan** = a compromised key stays trusted for a year; short-lived automated certs shrink that window.62- **Automated renewal + full inventory + expiry monitoring + short-lived certs** = certificates become a non-event.6364### The fix / best practice6566- **Automate issuance and renewal** (ACME/certbot/CA automation) — the highest-impact practice, preventing the expiry incidents that dominate certificate problems.67- **Maintain a complete inventory** with location, expiry, and owner; discover sprawl and public certs (CT logs).68- **Monitor and alert on expiry with lead time** as a backstop even when automated.69- **Issue correctly** — right SANs, strong keys, complete chain — and protect private keys (key-management).70- **Have a revocation/reissue path** and prefer short-lived certificates to limit compromise windows.71- **Guard internal CA keys** and apply the same lifecycle discipline to internal certs.7273### Pitfalls7475- **Manual renewal.** The classic outage cause — someone forgets, the cert expires, the service goes down. Automate.76- **No inventory.** Untracked certs (load balancers, internal services) expire or get misissued unnoticed. Discover and track them all.77- **No expiry monitoring.** Automation can fail; without alerting you find out via outage. Monitor with lead time regardless.78- **Incomplete certificate chain.** Missing intermediates cause intermittent, hard-to-diagnose failures. Serve the full chain.79- **Long-lived certs, no revocation plan.** A compromised key stays trusted; short-lived automated certs and a known revocation path limit the damage.8081### References8283- Let's Encrypt / ACME and certbot documentation84- CA/Browser Forum baseline requirements; NIST SP 800-57 (key/cert management)85- The tls-configuration, key-management, and OSINT certificate-transparency skills86- CWE-298 (improper validation of certificate expiration), CWE-295 (improper cert validation)8788## Inputs89- Relevant source code, logs, network traces, or system specifications.9091## Outputs92- Analysis findings, security audit report, or generated code artifacts.