/security-tooling-skills:certificate-lifecycle-management-at-scalefrom security-tooling-skills
Guides TLS/mTLS certificate lifecycle management across heterogeneous fleets (VMs, on-prem, multi-cluster) beyond Kubernetes. Covers enterprise CA integration (ACME private CA, Microsoft AD CS, cloud-managed CAs), rotation automation, expiry monitoring/alerting, and CA hierarchy/trust-chain design.
Ships in security-tooling-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An expired certificate is one of the most preventable outages in production — the fix (renew it) is trivial, but the failure mode (a service silently stops accepting connections at exactly midnight on expiry, with no gradual degradation to warn anyone) is brutal, and it recurs constantly because certificate expiry is invisible until it happens. cert-manager-tls-automation solves this well inside a single Kubernetes cluster via a reconciliation loop, but most enterprises have a fleet that isn't just Kubernetes: VMs, on-prem load balancers, network appliances, multiple clusters across clouds, and internal services trusting an enterprise CA (Microsoft AD CS, a cloud-managed private CA, or a hand-rolled internal root) rather than a public ACME CA. This skill covers that broader scope — integrating with an enterprise/internal CA as the trust root, automating rotation across a heterogeneous fleet where no single Kubernetes controller has visibility, building expiry monitoring that covers every certificate regardless of where it lives, and designing a CA hierarchy (root/intermediate/issuing tiers) that scales across many teams and services without becoming an unmanageable sprawl of independently-issued, independently-tracked certificates.
certreq for Windows-
centric fleets, a cloud private CA's API/IAM permissions (AWS Private
CA's IssueCertificate action, GCP CA Service's issuer pool), or
Vault's PKI engine API if Vault is the org's chosen internal CA.cert-manager for in-cluster Kubernetes
workloads, and a scripted ACME/CA-API client for anything else (load
balancers, network appliances without native ACME support).Build (or validate) the CA hierarchy before automating rotation on top of it. A minimum viable enterprise hierarchy is root → environment-scoped intermediate(s) (e.g. one for production, one for internal/dev) → leaf certificates, never leaf certificates signed directly by the root:
Enterprise Root CA (offline, HSM-backed, years-long validity)
└── Production Issuing CA (online, signs leaf certs for prod services)
└── Internal/Dev Issuing CA (online, signs leaf certs for non-prod)
If the org already runs Vault's PKI engine for internal issuance, its intermediate (vault-operations-and-pki-engine-configuration) can itself be the "Production Issuing CA" node — this skill is about scaling rotation and inventory across however many issuing points like that the org has, not replacing them.
Integrate with the enterprise CA's issuance API rather than a
manual certificate-request form per service. Microsoft AD CS example
(via its REST-like enrollment web service or certreq scripted
against a certificate template):
# certreq against an AD CS certificate template (illustrative)
certreq -submit -config "ca-server\Production-Issuing-CA" `
-attrib "CertificateTemplate:WebServerAutomated" request.csr cert.crt
AWS Private CA example (API-driven, suitable for scripting across a fleet):
aws acm-pca issue-certificate \
--certificate-authority-arn arn:aws:acm-pca:us-east-1:<AWS_ACCOUNT_ID>:certificate-authority/<CA_ID> \
--csr fileb://service.csr \
--signing-algorithm SHA256WITHRSA \
--validity Value=90,Type=DAYS
Both patterns are automatable from a central rotation pipeline rather than a human filling out a request form per certificate.
Build a fleet-wide certificate inventory as the source of truth, populated from active scanning plus CA-issuance records rather than trusted to a manually maintained list:
# Illustrative: scan a list of known endpoints for cert expiry,
# feeding a central inventory (a small script, not a heavyweight tool)
for host in $(cat fleet_endpoints.txt); do
expiry=$(echo | openssl s_client -connect "${host}:443" -servername "${host}" 2>/dev/null \
| openssl x509 -noout -enddate | cut -d= -f2)
echo "${host},${expiry}"
done >> cert_inventory.csv
Cross-reference this active-scan inventory against the issuing CA's own issuance log/database — a certificate the scan can't reach (internal-only, firewalled) still needs to appear in inventory via the CA's records, and a certificate the CA issued but that scanning finds already replaced flags a stale or orphaned inventory entry.
Automate rotation per fleet segment, matched to that segment's deployment mechanism — there is no single tool that reaches VMs, appliances, and multiple Kubernetes clusters uniformly:
cert-manager per cluster remains the
right tool — see
cert-manager-tls-automation —
configured with an Issuer/ClusterIssuer pointed at the
enterprise CA (Vault PKI backend, or a cert-manager
venafi-issuer/ACME-fronted enterprise CA integration where
available) rather than a public ACME CA.renewBefore-equivalent
margin and redeploys the cert + reloads the consuming service:
# ansible playbook task (illustrative)
- name: renew certificate if within 30 days of expiry
when: cert_days_remaining | int < 30
block:
- name: request renewed cert from enterprise CA
command: >
certreq -submit -config "ca-server\Production-Issuing-CA"
{{ csr_path }} {{ cert_path }}
- name: reload nginx to pick up renewed cert
systemd:
name: nginx
state: reloaded
Set renewBefore-equivalent margins deliberately per fleet
segment, accounting for the segment's actual deployment lead time
— a VM fleet needing a change-management-approved deployment window
needs a longer lead time than an automated Kubernetes reconcile loop:
Kubernetes (cert-manager, automated reconcile): renew 15-30 days before expiry
VM fleet (config-management run, may need a change window): renew 45-60 days before expiry
Network appliances (manual-adjacent, longer lead time): renew 60-90 days before expiry
Alert on expiry as a first-class, fleet-wide signal, independent of whether automation is expected to have already renewed it — automation failing silently is exactly the case alerting exists to catch:
# Prometheus alerting rule using a blackbox/certificate exporter
- alert: CertificateExpiringSoon
expr: probe_ssl_earliest_cert_expiry - time() < 30 * 86400
for: 1h
labels: { severity: warning }
annotations:
summary: "Certificate for {{ $labels.instance }} expires in under 30 days"
- alert: CertificateExpiringCritical
expr: probe_ssl_earliest_cert_expiry - time() < 7 * 86400
for: 1h
labels: { severity: critical }
annotations:
summary: "Certificate for {{ $labels.instance }} expires in under 7 days — page on-call"
Route the critical-tier alert into the paging tool's escalation policy (see pagerduty-and-opsgenie-oncall-configuration), not just a dashboard — an expiry alert nobody's paged for is no better than no alert.
Plan and rehearse intermediate/root CA rotation as a fleet-wide, high-blast-radius event, distinct from routine leaf certificate renewal:
1. Generate/sign new intermediate under the (offline) root.
2. Distribute the new intermediate + updated trust chain to every
consuming service/trust store *before* any leaf cert is issued
from it — a leaf signed by an intermediate no one trusts yet is a
guaranteed outage.
3. Begin issuing new leaf certificates from the new intermediate.
4. Only after every leaf certificate has rotated onto the new chain,
retire trust in the old intermediate.
Warning: rotating or revoking an intermediate CA before every downstream trust store has the new chain is a fleet-wide outage risk, not a routine change — treat it with the same rehearsal discipline as a Vault seal migration (see vault-operations-and-pki-engine-configuration), including a non-production rehearsal and a documented rollback plan, before touching a production root/intermediate.
Reconcile CA-issued certificate records against actual CRL/OCSP revocation status periodically, so a revoked certificate (e.g. after a suspected key compromise) is confirmed to actually be rejected by consuming services, not just marked revoked in the CA's database:
openssl ocsp -issuer intermediate.crt -cert leaf.crt \
-url http://ocsp.example.internal -CAfile chain.pem
renewBefore value fits every environment.Symptom: A production outage occurs at exactly midnight with no warning, traced to a certificate that expired — and it turns out nobody had that host in the monitored inventory at all. Fix: This is an inventory gap, not a monitoring-tool failure — build inventory from both active scanning and the issuing CA's own records (step 3), and treat "certificate not in inventory" the same as any other unmanaged-asset finding, since automation and alerting built on an incomplete inventory only ever protects what's already known.
Symptom: A new intermediate CA is issued and starts signing leaf certificates immediately, but a subset of consuming services rejects every certificate signed by it with a trust-chain error. Fix: The new intermediate's chain wasn't distributed to every consuming trust store before issuance began. Always distribute the new chain fleet-wide first, confirm it's trusted everywhere, and only then begin issuing leaf certificates from the new intermediate (step 7's ordering).
Symptom: A VM fleet's certificate renewal automation runs, but a
renewed certificate sits on disk unused because the consuming service
(nginx, an appliance) was never reloaded/restarted to pick it up, and
the old certificate still expires on schedule.
Fix: Rotation automation must include the reload/restart step for
every consuming service, not just the file replacement — verify
post-renewal that the live-serving certificate (via openssl s_client
against the actual endpoint) matches the renewed one, not just that a
new file exists on disk.
Symptom: Different teams have each stood up their own small internal CA over time (a self-signed root here, a Vault PKI mount there), and there's no single place to answer "what's our total certificate expiry exposure this month." Fix: Consolidate onto a single enterprise CA integration point going forward, and treat existing shadow CAs as a migration backlog — fragmented issuance points are the root cause of an incomplete, unreliable fleet-wide inventory.
Symptom: A certificate is revoked in the CA's records after a suspected private-key compromise, but a consuming service continues accepting connections using it for days afterward. Fix: Confirm CRL/OCSP distribution is actually configured and reachable by consuming services (step 8), and that those services check revocation status rather than only validating the certificate chain and expiry — a CA-side revocation record with no enforced distribution mechanism doesn't actually stop anything from trusting the revoked certificate.
Scenario: An enterprise runs three fleet segments — 40 Kubernetes clusters across two clouds, ~300 VMs running internal services, and a dozen on-prem load balancers — all needing certificates trusted under one enterprise root, with fleet-wide expiry monitoring after a recent outage caused by an unmanaged VM's certificate expiring unnoticed.
CA hierarchy consolidated onto Vault's PKI engine as the single Production Issuing CA, itself signed by an offline enterprise root (see vault-operations-and-pki-engine-configuration for that setup).
Kubernetes clusters: each cluster's cert-manager ClusterIssuer is
pointed at Vault's PKI engine instead of a public ACME CA:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata: { name: vault-enterprise-ca }
spec:
vault:
server: "https://vault.example.internal:8200"
path: "pki_int/sign/production-services"
auth:
kubernetes:
role: "cert-manager"
mountPath: "/v1/auth/kubernetes"
VM fleet: an Ansible playbook run nightly checks each host's
certificate expiry against a 45-day threshold, requests renewal from
Vault's PKI issue endpoint, deploys the renewed cert, and reloads
the consuming service — logging every action to the central
inventory system.
Fleet-wide inventory reconciles active scan results (step 3 of the guidance) against Vault's PKI issuance log nightly, flagging any certificate present in one source but not the other for manual investigation — this is exactly how the previously-unmanaged VM (root cause of the earlier outage) gets caught this time, three weeks before its next certificate would have expired.
Prometheus alerting (step 6) fires a warning at 30 days and a
critical, paging alert at 7 days for any certificate across all
three fleet segments, routed through the existing on-call escalation
policy.
Result: a single enterprise CA (Vault-backed), one consolidated inventory covering all three fleet segments regardless of deployment mechanism, and expiry alerting that pages on-call well before any outage — rather than three independently-tracked, partially-automated certificate populations.
Issuer/ClusterIssuer at the enterprise CA described
here.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Kubernetes, AWS, GCP, Azure
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin security-tooling-skills15 skills in this plugin
/enterprise-sso-and-idp-federation-configurationGuides configuring enterprise workforce single sign-on — SAML 2.0 and OIDC federation between an identity provider (Okta, Azure AD/Entra ID, Keycloak) and downstream applications, including metadata exchange, attribute/claim mapping, group-to-role provisioning (SCIM), and multi-IdP federation trust. Use when the user asks to "set up SAML SSO with Okta," "configure Azure AD/Entra ID as our OIDC provider," "stand up Keycloak as an internal IdP," "map IdP groups to application roles," "debug a SAML assertion that won't validate," or "federate a second IdP for an acquired company's users." Distinct from cloud-iam-hardening (workload/service IAM in a cloud provider) — this skill is about federating *human workforce* identity into applications for SSO.
/falco-configuration-validationValidates Falco runtime detection rules for false-positive rate and actual firing correctness before trusting them in a channel that pages a human — running new/changed rules in log-only mode against real traffic, measuring alert volume and content, and confirming a rule fires on a deliberate positive-control trigger before promoting it to a higher-severity, paging-routed configuration. Use when the user asks to "validate this Falco rule before enabling it," "why is Falco so noisy," "test our Falco rules don't false-positive on real traffic," "review this rule set before it pages on-call," or "make sure Falco rules aren't about to be enabled in enforce/blocking mode without an audit period." Pairs with falco-runtime-threat-detection-configuration.
/falco-runtime-threat-detection-configurationGuides authoring and deploying Falco runtime threat detection rules — the eBPF/kernel-module-based syscall event stream, Falco's rule syntax (condition/output/priority), writing custom rules for a specific workload's known-good behavior, tuning noisy default rules, and wiring alerts to Falcosidekick outputs. Use when the user asks to "write a Falco rule to detect X," "why is Falco alerting on normal behavior," "detect a shell spawned inside a container at runtime," "set up Falco with eBPF instead of the kernel module," "send Falco alerts to Slack/PagerDuty," or "what's the difference between Falco and admission-control policy engines like OPA/Kyverno." Pairs with falco-configuration-validation for pre-enforcement false-positive testing.
/fortify-static-analysisGuides deep, tool-specific use of OpenText (formerly Micro Focus) Fortify Static Code Analyzer (SCA) and Fortify Audit Workbench for enterprise, on-premises static analysis — the translate/scan build workflow, Fortify Security Rulepacks, audit workbench triage (Not an Issue / Reliability / Suspicious), and how Fortify's on-prem, build-integrated model differs operationally from cloud-native SAST. Use when the user asks to "run a Fortify scan", "configure sourceanalyzer for a build", "triage findings in Fortify Audit Workbench", "integrate Fortify with Jenkins/Azure DevOps", "reduce Fortify SCA false positives", or "compare Fortify against SonarQube/Semgrep for enterprise compliance". Fortify-specific depth on the translate/scan model and enterprise workflow; for the general SAST concept see sast-integration in the devsecops domain.
/kubewarden-admission-policy-configurationGuides configuring Kubewarden as a WASM-based Kubernetes admission policy engine — installing the policy-server and controller, writing or reusing WebAssembly policies from the Kubewarden Policy Hub, ClusterAdmissionPolicy/AdmissionPolicy resources, monitor-mode rollout before enforce, and multi-language policy authoring (Rego, Rust, Go via the SDKs) as an alternative to OPA/Gatekeeper or Kyverno. Use when the user asks to "set up Kubewarden," "write a WASM admission policy," "why use Kubewarden instead of OPA/Kyverno," "reuse a policy from the Kubewarden Policy Hub," "run an admission policy in monitor mode before enforcing it," or "author a Kubernetes admission policy without writing Rego."
/owasp-zap-dast-configurationGuides deep, tool-specific configuration of OWASP ZAP (Zed Attack Proxy) for automated dynamic scanning — baseline vs. full active scan selection, the ZAP Automation Framework YAML plan, authenticated scanning via authentication scripts/contexts, and API-driven scans seeded from an OpenAPI spec. Use when the user asks to "configure a ZAP automation framework plan", "write a ZAP context file for authenticated scanning", "tune ZAP alert thresholds", "run zap-baseline vs zap-full-scan", "script ZAP login for a scan", or "seed a ZAP scan from an OpenAPI/Swagger spec". ZAP-specific depth on scan types, automation YAML, and auth scripting; for the general DAST concept and tool-agnostic workflow see dast-integration in the devsecops domain.
Other plugins' skills for the same job