ssl-tls-management
Manage SSL/TLS certificates with Let's Encrypt and internal PKI. Configure secure HTTPS, certificate renewal, and cipher suites. Use when implementing secure communications.
What this skill does
# SSL/TLS Management Manage certificates and secure communications across web servers, Kubernetes clusters, and internal services. ## When to Use This Skill Use this skill when: - Setting up HTTPS for a new web application - Automating certificate renewal with Let's Encrypt - Deploying cert-manager in Kubernetes - Configuring TLS for internal service-to-service communication - Auditing cipher suites and TLS versions for compliance - Responding to an expiring or compromised certificate ## Prerequisites - Domain name with DNS control for public certificates - Root/sudo access on web servers - `certbot` installed for Let's Encrypt - `openssl` CLI available (installed by default on most Linux distros) - Kubernetes cluster with Helm for cert-manager deployment - Understanding of X.509 certificate chain of trust ## Let's Encrypt with Certbot ### Installation and Certificate Issuance ```bash # Install certbot (Ubuntu/Debian) apt update && apt install -y certbot python3-certbot-nginx # Obtain certificate for nginx (interactive) certbot --nginx -d example.com -d www.example.com # Non-interactive mode for automation certbot certonly --nginx \ -d example.com \ -d www.example.com \ --non-interactive \ --agree-tos \ --email [email protected] # Standalone mode (when no web server is running) certbot certonly --standalone \ -d example.com \ --preferred-challenges http # DNS challenge (for wildcard certs) certbot certonly --manual \ --preferred-challenges dns \ -d "*.example.com" \ -d example.com # Using DNS plugin for automation (Cloudflare example) pip install certbot-dns-cloudflare cat > /etc/letsencrypt/cloudflare.ini << 'EOF' dns_cloudflare_api_token = YOUR_CLOUDFLARE_API_TOKEN EOF chmod 600 /etc/letsencrypt/cloudflare.ini certbot certonly --dns-cloudflare \ --dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini \ -d "*.example.com" \ -d example.com ``` ### Renewal Automation ```bash # Test renewal certbot renew --dry-run # Systemd timer (preferred over cron) cat > /etc/systemd/system/certbot-renewal.service << 'EOF' [Unit] Description=Certbot certificate renewal After=network-online.target [Service] Type=oneshot ExecStart=/usr/bin/certbot renew --quiet --deploy-hook "systemctl reload nginx" EOF cat > /etc/systemd/system/certbot-renewal.timer << 'EOF' [Unit] Description=Run certbot renewal twice daily [Timer] OnCalendar=*-*-* 00,12:00:00 RandomizedDelaySec=3600 Persistent=true [Install] WantedBy=timers.target EOF systemctl enable --now certbot-renewal.timer # Verify timer is active systemctl list-timers certbot-renewal.timer # Renewal hooks for post-renewal actions mkdir -p /etc/letsencrypt/renewal-hooks/deploy cat > /etc/letsencrypt/renewal-hooks/deploy/reload-services.sh << 'HOOK' #!/bin/bash systemctl reload nginx # Also reload other services using the cert systemctl reload haproxy 2>/dev/null || true HOOK chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-services.sh ``` ## cert-manager for Kubernetes ### Installation ```bash # Install with Helm helm repo add jetstack https://charts.jetstack.io helm repo update helm install cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --version v1.14.0 \ --set installCRDs=true \ --set prometheus.enabled=true # Verify installation kubectl get pods -n cert-manager kubectl get crds | grep cert-manager ``` ### ClusterIssuer Configurations ```yaml # letsencrypt-staging (use for testing first) apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-staging spec: acme: server: https://acme-staging-v02.api.letsencrypt.org/directory email: [email protected] privateKeySecretRef: name: letsencrypt-staging solvers: - http01: ingress: class: nginx --- # letsencrypt-prod apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-prod spec: acme: server: https://acme-v02.api.letsencrypt.org/directory email: [email protected] privateKeySecretRef: name: letsencrypt-prod solvers: - http01: ingress: class: nginx --- # DNS challenge solver (for wildcard certs with Cloudflare) apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-prod-dns spec: acme: server: https://acme-v02.api.letsencrypt.org/directory email: [email protected] privateKeySecretRef: name: letsencrypt-prod-dns solvers: - dns01: cloudflare: apiTokenSecretRef: name: cloudflare-api-token key: api-token --- # Self-signed CA issuer for internal services apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: selfsigned-ca spec: selfSigned: {} ``` ### Certificate Resources ```yaml # Public-facing certificate apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: example-cert namespace: default spec: secretName: example-tls issuerRef: name: letsencrypt-prod kind: ClusterIssuer dnsNames: - example.com - www.example.com duration: 2160h # 90 days renewBefore: 720h # 30 days before expiry --- # Wildcard certificate apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: wildcard-cert namespace: default spec: secretName: wildcard-tls issuerRef: name: letsencrypt-prod-dns kind: ClusterIssuer dnsNames: - "*.example.com" - example.com --- # Ingress with automatic TLS apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example-ingress annotations: cert-manager.io/cluster-issuer: letsencrypt-prod spec: tls: - hosts: - example.com secretName: example-tls rules: - host: example.com http: paths: - path: / pathType: Prefix backend: service: name: web port: number: 80 ``` ## OpenSSL Commands Reference ```bash # Generate a private key openssl genrsa -out server.key 4096 # Generate an ECDSA key (preferred for performance) openssl ecparam -genkey -name prime256v1 -out server-ec.key # Generate a CSR (Certificate Signing Request) openssl req -new -key server.key -out server.csr \ -subj "/C=US/ST=California/L=San Francisco/O=Acme Corp/CN=example.com" # Generate CSR with SAN (Subject Alternative Names) openssl req -new -key server.key -out server.csr -config <(cat <<EOF [req] default_bits = 4096 distinguished_name = dn req_extensions = san prompt = no [dn] CN = example.com O = Acme Corp C = US [san] subjectAltName = DNS:example.com,DNS:www.example.com,DNS:api.example.com EOF ) # Generate self-signed certificate (development/testing) openssl req -x509 -nodes -days 365 -newkey rsa:4096 \ -keyout selfsigned.key -out selfsigned.crt \ -subj "/CN=localhost" # View certificate details openssl x509 -in cert.pem -noout -text # Check certificate expiration date openssl x509 -in cert.pem -noout -dates # Check remote certificate openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | \ openssl x509 -noout -dates -subject -issuer # Verify certificate chain openssl verify -CAfile ca-bundle.crt server.crt # Check certificate chain from remote server openssl s_client -connect example.com:443 -showcerts 2>/dev/null | \ openssl x509 -noout -text # Convert PEM to PKCS12 openssl pkcs12 -export -out cert.pfx -inkey server.key -in server.crt -certfile ca.crt # Convert PKCS12 to PEM openssl pkcs12 -in cert.pfx -out cert.pem -nodes # Test TLS connection and cipher negotiation openssl s_client -connect example.com:443 -tls1_3 openssl s_client -connect example.com:443 -cipher 'ECDHE-RSA-AES256-GCM-SHA384' ``` ## Strong TLS Configuration ### Nginx ```nginx server { listen 443 ssl http2; server_name example.com; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; #
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.