[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B1R4TMSSWGXF7EYP2YXREG":3,"skill-same:01M7B1R4TMSSWGXF7EYP2YXREG":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7B1R4TMSSWGXF7EYP2YXREG","ssl-tls-management",null,"Manage SSL\u002FTLS certificates with Let's Encrypt and internal PKI. Configure secure HTTPS, certificate renewal, and cipher suites. Use when implementing secure communications.","aeroalgo\u002Fdev-hub","aeroalgo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71006969?v=4","01M7B06910BBQC29R55C0V7XYW","Андрей","01M7B0691R77MY9Q3YXE7W683M",0,"MIT","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fssl-tls-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ssl-tls-management\ndescription: Manage SSL\u002FTLS certificates with Let's Encrypt and internal PKI. Configure secure HTTPS, certificate renewal, and cipher suites. Use when implementing secure communications.\nlicense: MIT\nmetadata:\n  author: devops-skills\n  version: \"1.0\"\n---\n\n# SSL\u002FTLS Management\n\nManage certificates and secure communications across web servers, Kubernetes clusters, and internal services.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up HTTPS for a new web application\n- Automating certificate renewal with Let's Encrypt\n- Deploying cert-manager in Kubernetes\n- Configuring TLS for internal service-to-service communication\n- Auditing cipher suites and TLS versions for compliance\n- Responding to an expiring or compromised certificate\n\n## Prerequisites\n\n- Domain name with DNS control for public certificates\n- Root\u002Fsudo access on web servers\n- `certbot` installed for Let's Encrypt\n- `openssl` CLI available (installed by default on most Linux distros)\n- Kubernetes cluster with Helm for cert-manager deployment\n- Understanding of X.509 certificate chain of trust\n\n## Let's Encrypt with Certbot\n\n### Installation and Certificate Issuance\n\n```bash\n# Install certbot (Ubuntu\u002FDebian)\napt update && apt install -y certbot python3-certbot-nginx\n\n# Obtain certificate for nginx (interactive)\ncertbot --nginx -d example.com -d www.example.com\n\n# Non-interactive mode for automation\ncertbot certonly --nginx \\\n  -d example.com \\\n  -d www.example.com \\\n  --non-interactive \\\n  --agree-tos \\\n  --email admin@example.com\n\n# Standalone mode (when no web server is running)\ncertbot certonly --standalone \\\n  -d example.com \\\n  --preferred-challenges http\n\n# DNS challenge (for wildcard certs)\ncertbot certonly --manual \\\n  --preferred-challenges dns \\\n  -d \"*.example.com\" \\\n  -d example.com\n\n# Using DNS plugin for automation (Cloudflare example)\npip install certbot-dns-cloudflare\ncat > \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini \u003C\u003C 'EOF'\ndns_cloudflare_api_token = YOUR_CLOUDFLARE_API_TOKEN\nEOF\nchmod 600 \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini\n\ncertbot certonly --dns-cloudflare \\\n  --dns-cloudflare-credentials \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini \\\n  -d \"*.example.com\" \\\n  -d example.com\n```\n\n### Renewal Automation\n\n```bash\n# Test renewal\ncertbot renew --dry-run\n\n# Systemd timer (preferred over cron)\ncat > \u002Fetc\u002Fsystemd\u002Fsystem\u002Fcertbot-renewal.service \u003C\u003C 'EOF'\n[Unit]\nDescription=Certbot certificate renewal\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStart=\u002Fusr\u002Fbin\u002Fcertbot renew --quiet --deploy-hook \"systemctl reload nginx\"\nEOF\n\ncat > \u002Fetc\u002Fsystemd\u002Fsystem\u002Fcertbot-renewal.timer \u003C\u003C 'EOF'\n[Unit]\nDescription=Run certbot renewal twice daily\n\n[Timer]\nOnCalendar=*-*-* 00,12:00:00\nRandomizedDelaySec=3600\nPersistent=true\n\n[Install]\nWantedBy=timers.target\nEOF\n\nsystemctl enable --now certbot-renewal.timer\n\n# Verify timer is active\nsystemctl list-timers certbot-renewal.timer\n\n# Renewal hooks for post-renewal actions\nmkdir -p \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\ncat > \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\u002Freload-services.sh \u003C\u003C 'HOOK'\n#!\u002Fbin\u002Fbash\nsystemctl reload nginx\n# Also reload other services using the cert\nsystemctl reload haproxy 2>\u002Fdev\u002Fnull || true\nHOOK\nchmod +x \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\u002Freload-services.sh\n```\n\n## cert-manager for Kubernetes\n\n### Installation\n\n```bash\n# Install with Helm\nhelm repo add jetstack https:\u002F\u002Fcharts.jetstack.io\nhelm repo update\n\nhelm install cert-manager jetstack\u002Fcert-manager \\\n  --namespace cert-manager \\\n  --create-namespace \\\n  --version v1.14.0 \\\n  --set installCRDs=true \\\n  --set prometheus.enabled=true\n\n# Verify installation\nkubectl get pods -n cert-manager\nkubectl get crds | grep cert-manager\n```\n\n### ClusterIssuer Configurations\n\n```yaml\n# letsencrypt-staging (use for testing first)\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-staging\nspec:\n  acme:\n    server: https:\u002F\u002Facme-staging-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-staging\n    solvers:\n      - http01:\n          ingress:\n            class: nginx\n---\n# letsencrypt-prod\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-prod\nspec:\n  acme:\n    server: https:\u002F\u002Facme-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-prod\n    solvers:\n      - http01:\n          ingress:\n            class: nginx\n---\n# DNS challenge solver (for wildcard certs with Cloudflare)\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-prod-dns\nspec:\n  acme:\n    server: https:\u002F\u002Facme-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-prod-dns\n    solvers:\n      - dns01:\n          cloudflare:\n            apiTokenSecretRef:\n              name: cloudflare-api-token\n              key: api-token\n---\n# Self-signed CA issuer for internal services\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: selfsigned-ca\nspec:\n  selfSigned: {}\n```\n\n### Certificate Resources\n\n```yaml\n# Public-facing certificate\napiVersion: cert-manager.io\u002Fv1\nkind: Certificate\nmetadata:\n  name: example-cert\n  namespace: default\nspec:\n  secretName: example-tls\n  issuerRef:\n    name: letsencrypt-prod\n    kind: ClusterIssuer\n  dnsNames:\n    - example.com\n    - www.example.com\n  duration: 2160h    # 90 days\n  renewBefore: 720h  # 30 days before expiry\n---\n# Wildcard certificate\napiVersion: cert-manager.io\u002Fv1\nkind: Certificate\nmetadata:\n  name: wildcard-cert\n  namespace: default\nspec:\n  secretName: wildcard-tls\n  issuerRef:\n    name: letsencrypt-prod-dns\n    kind: ClusterIssuer\n  dnsNames:\n    - \"*.example.com\"\n    - example.com\n---\n# Ingress with automatic TLS\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: example-ingress\n  annotations:\n    cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\nspec:\n  tls:\n    - hosts:\n        - example.com\n      secretName: example-tls\n  rules:\n    - host: example.com\n      http:\n        paths:\n          - path: \u002F\n            pathType: Prefix\n            backend:\n              service:\n                name: web\n                port:\n                  number: 80\n```\n\n## OpenSSL Commands Reference\n\n```bash\n# Generate a private key\nopenssl genrsa -out server.key 4096\n\n# Generate an ECDSA key (preferred for performance)\nopenssl ecparam -genkey -name prime256v1 -out server-ec.key\n\n# Generate a CSR (Certificate Signing Request)\nopenssl req -new -key server.key -out server.csr \\\n  -subj \"\u002FC=US\u002FST=California\u002FL=San Francisco\u002FO=Acme Corp\u002FCN=example.com\"\n\n# Generate CSR with SAN (Subject Alternative Names)\nopenssl req -new -key server.key -out server.csr -config \u003C(cat \u003C\u003CEOF\n[req]\ndefault_bits = 4096\ndistinguished_name = dn\nreq_extensions = san\nprompt = no\n\n[dn]\nCN = example.com\nO = Acme Corp\nC = US\n\n[san]\nsubjectAltName = DNS:example.com,DNS:www.example.com,DNS:api.example.com\nEOF\n)\n\n# Generate self-signed certificate (development\u002Ftesting)\nopenssl req -x509 -nodes -days 365 -newkey rsa:4096 \\\n  -keyout selfsigned.key -out selfsigned.crt \\\n  -subj \"\u002FCN=localhost\"\n\n# View certificate details\nopenssl x509 -in cert.pem -noout -text\n\n# Check certificate expiration date\nopenssl x509 -in cert.pem -noout -dates\n\n# Check remote certificate\nopenssl s_client -connect example.com:443 -servername example.com 2>\u002Fdev\u002Fnull | \\\n  openssl x509 -noout -dates -subject -issuer\n\n# Verify certificate chain\nopenssl verify -CAfile ca-bundle.crt server.crt\n\n# Check certificate chain from remote server\nopenssl s_client -connect example.com:443 -showcerts 2>\u002Fdev\u002Fnull | \\\n  openssl x509 -noout -text\n\n# Convert PEM to PKCS12\nopenssl pkcs12 -export -out cert.pfx -inkey server.key -in server.crt -certfile ca.crt\n\n# Convert PKCS12 to PEM\nopenssl pkcs12 -in cert.pfx -out cert.pem -nodes\n\n# Test TLS connection and cipher negotiation\nopenssl s_client -connect example.com:443 -tls1_3\nopenssl s_client -connect example.com:443 -cipher 'ECDHE-RSA-AES256-GCM-SHA384'\n```\n\n## Strong TLS Configuration\n\n### Nginx\n\n```nginx\nserver {\n    listen 443 ssl http2;\n    server_name example.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fprivkey.pem;\n\n    # Protocol versions\n    ssl_protocols TLSv1.2 TLSv1.3;\n\n    # Cipher suites (TLS 1.2)\n    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;\n    ssl_prefer_server_ciphers off;\n\n    # Session settings\n    ssl_session_timeout 1d;\n    ssl_session_cache shared:SSL:10m;\n    ssl_session_tickets off;\n\n    # OCSP stapling\n    ssl_stapling on;\n    ssl_stapling_verify on;\n    ssl_trusted_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fchain.pem;\n    resolver 8.8.8.8 8.8.4.4 valid=300s;\n    resolver_timeout 5s;\n\n    # Security headers\n    add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;\n    add_header X-Content-Type-Options nosniff always;\n    add_header X-Frame-Options DENY always;\n\n    # HTTP to HTTPS redirect (in separate server block)\n}\n\nserver {\n    listen 80;\n    server_name example.com www.example.com;\n    return 301 https:\u002F\u002F$host$request_uri;\n}\n```\n\n### Apache\n\n```apache\n\u003CVirtualHost *:443>\n    ServerName example.com\n\n    SSLEngine on\n    SSLCertificateFile \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Ffullchain.pem\n    SSLCertificateKeyFile \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fprivkey.pem\n\n    SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1\n    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384\n    SSLHonorCipherOrder off\n\n    SSLUseStapling on\n    SSLStaplingCache shmcb:\u002Ftmp\u002Fstapling_cache(128000)\n\n    Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"\n\u003C\u002FVirtualHost>\n```\n\n## Certificate Monitoring\n\n```bash\n#!\u002Fbin\u002Fbash\n# cert-monitor.sh - Monitor certificate expiration across hosts\n\nWARN_DAYS=30\nCRIT_DAYS=7\nHOSTS=(\n  \"example.com:443\"\n  \"api.example.com:443\"\n  \"admin.example.com:443\"\n)\n\nfor host in \"${HOSTS[@]}\"; do\n  expiry=$(echo | openssl s_client -connect \"$host\" -servername \"${host%%:*}\" 2>\u002Fdev\u002Fnull | \\\n    openssl x509 -noout -enddate 2>\u002Fdev\u002Fnull | cut -d= -f2)\n\n  if [ -z \"$expiry\" ]; then\n    echo \"ERROR: Cannot connect to $host\"\n    continue\n  fi\n\n  expiry_epoch=$(date -d \"$expiry\" +%s)\n  now_epoch=$(date +%s)\n  days_left=$(( (expiry_epoch - now_epoch) \u002F 86400 ))\n\n  if [ \"$days_left\" -le \"$CRIT_DAYS\" ]; then\n    echo \"CRITICAL: $host expires in $days_left days ($expiry)\"\n  elif [ \"$days_left\" -le \"$WARN_DAYS\" ]; then\n    echo \"WARNING: $host expires in $days_left days ($expiry)\"\n  else\n    echo \"OK: $host expires in $days_left days ($expiry)\"\n  fi\ndone\n```\n\n### Prometheus cert-manager Metrics\n\n```yaml\n# Alert on expiring certificates in Kubernetes\ngroups:\n  - name: cert-manager\n    rules:\n      - alert: CertificateExpiringSoon\n        expr: certmanager_certificate_expiration_timestamp_seconds - time() \u003C 7 * 24 * 3600\n        for: 1h\n        labels:\n          severity: critical\n        annotations:\n          summary: \"Certificate {{ $labels.name }} expires in less than 7 days\"\n\n      - alert: CertificateNotReady\n        expr: certmanager_certificate_ready_status{condition=\"True\"} == 0\n        for: 15m\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Certificate {{ $labels.name }} is not ready\"\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Certbot fails with \"connection refused\" | Port 80 blocked by firewall | Open port 80 for ACME HTTP-01 challenge |\n| \"Too many certificates already issued\" | Let's Encrypt rate limit hit | Use staging endpoint for testing; wait for rate limit reset |\n| cert-manager challenge stuck pending | Ingress or DNS misconfigured | Check `kubectl describe challenge`; verify DNS records |\n| Mixed content warnings | HTTP resources on HTTPS page | Update all asset URLs to HTTPS; use CSP headers |\n| OCSP stapling not working | Resolver not configured | Add `resolver` directive in nginx; verify outbound DNS |\n| Intermediate cert missing | Incomplete chain served | Use `fullchain.pem` not `cert.pem`; verify with `openssl s_client -showcerts` |\n| TLS handshake failure | Client doesn't support offered ciphers | Add TLS 1.2 support; check cipher suite compatibility |\n\n## Best Practices\n\n- Automate renewal with systemd timers or cert-manager\n- Monitor expiration dates with alerting (30-day and 7-day warnings)\n- Use only TLS 1.2 and TLS 1.3\n- Enable HSTS with long max-age and includeSubDomains\n- Enable OCSP stapling to improve handshake performance\n- Use ECDSA keys for better performance where possible\n- Test configuration with SSL Labs (ssllabs.com\u002Fssltest)\n- Keep private keys secure with proper file permissions (0600)\n- Rotate certificates before expiry, not after\n- Maintain a certificate inventory across all services\n\n## Related Skills\n\n- [hashicorp-vault](..\u002F..\u002Fsecrets\u002Fhashicorp-vault\u002F) - PKI management\n- [waf-setup](..\u002Fwaf-setup\u002F) - Web protection\n- [zero-trust](..\u002Fzero-trust\u002F) - mTLS and identity-based access\n","# SSL\u002FTLS Management\n\nManage certificates and secure communications across web servers, Kubernetes clusters, and internal services.\n\n## When to Use This Skill\n\nUse this skill when:\n- Setting up HTTPS for a new web application\n- Automating certificate renewal with Let's Encrypt\n- Deploying cert-manager in Kubernetes\n- Configuring TLS for internal service-to-service communication\n- Auditing cipher suites and TLS versions for compliance\n- Responding to an expiring or compromised certificate\n\n## Prerequisites\n\n- Domain name with DNS control for public certificates\n- Root\u002Fsudo access on web servers\n- `certbot` installed for Let's Encrypt\n- `openssl` CLI available (installed by default on most Linux distros)\n- Kubernetes cluster with Helm for cert-manager deployment\n- Understanding of X.509 certificate chain of trust\n\n## Let's Encrypt with Certbot\n\n### Installation and Certificate Issuance\n\n```bash\n# Install certbot (Ubuntu\u002FDebian)\napt update && apt install -y certbot python3-certbot-nginx\n\n# Obtain certificate for nginx (interactive)\ncertbot --nginx -d example.com -d www.example.com\n\n# Non-interactive mode for automation\ncertbot certonly --nginx \\\n  -d example.com \\\n  -d www.example.com \\\n  --non-interactive \\\n  --agree-tos \\\n  --email admin@example.com\n\n# Standalone mode (when no web server is running)\ncertbot certonly --standalone \\\n  -d example.com \\\n  --preferred-challenges http\n\n# DNS challenge (for wildcard certs)\ncertbot certonly --manual \\\n  --preferred-challenges dns \\\n  -d \"*.example.com\" \\\n  -d example.com\n\n# Using DNS plugin for automation (Cloudflare example)\npip install certbot-dns-cloudflare\ncat > \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini \u003C\u003C 'EOF'\ndns_cloudflare_api_token = YOUR_CLOUDFLARE_API_TOKEN\nEOF\nchmod 600 \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini\n\ncertbot certonly --dns-cloudflare \\\n  --dns-cloudflare-credentials \u002Fetc\u002Fletsencrypt\u002Fcloudflare.ini \\\n  -d \"*.example.com\" \\\n  -d example.com\n```\n\n### Renewal Automation\n\n```bash\n# Test renewal\ncertbot renew --dry-run\n\n# Systemd timer (preferred over cron)\ncat > \u002Fetc\u002Fsystemd\u002Fsystem\u002Fcertbot-renewal.service \u003C\u003C 'EOF'\n[Unit]\nDescription=Certbot certificate renewal\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStart=\u002Fusr\u002Fbin\u002Fcertbot renew --quiet --deploy-hook \"systemctl reload nginx\"\nEOF\n\ncat > \u002Fetc\u002Fsystemd\u002Fsystem\u002Fcertbot-renewal.timer \u003C\u003C 'EOF'\n[Unit]\nDescription=Run certbot renewal twice daily\n\n[Timer]\nOnCalendar=*-*-* 00,12:00:00\nRandomizedDelaySec=3600\nPersistent=true\n\n[Install]\nWantedBy=timers.target\nEOF\n\nsystemctl enable --now certbot-renewal.timer\n\n# Verify timer is active\nsystemctl list-timers certbot-renewal.timer\n\n# Renewal hooks for post-renewal actions\nmkdir -p \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\ncat > \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\u002Freload-services.sh \u003C\u003C 'HOOK'\n#!\u002Fbin\u002Fbash\nsystemctl reload nginx\n# Also reload other services using the cert\nsystemctl reload haproxy 2>\u002Fdev\u002Fnull || true\nHOOK\nchmod +x \u002Fetc\u002Fletsencrypt\u002Frenewal-hooks\u002Fdeploy\u002Freload-services.sh\n```\n\n## cert-manager for Kubernetes\n\n### Installation\n\n```bash\n# Install with Helm\nhelm repo add jetstack https:\u002F\u002Fcharts.jetstack.io\nhelm repo update\n\nhelm install cert-manager jetstack\u002Fcert-manager \\\n  --namespace cert-manager \\\n  --create-namespace \\\n  --version v1.14.0 \\\n  --set installCRDs=true \\\n  --set prometheus.enabled=true\n\n# Verify installation\nkubectl get pods -n cert-manager\nkubectl get crds | grep cert-manager\n```\n\n### ClusterIssuer Configurations\n\n```yaml\n# letsencrypt-staging (use for testing first)\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-staging\nspec:\n  acme:\n    server: https:\u002F\u002Facme-staging-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-staging\n    solvers:\n      - http01:\n          ingress:\n            class: nginx\n---\n# letsencrypt-prod\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-prod\nspec:\n  acme:\n    server: https:\u002F\u002Facme-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-prod\n    solvers:\n      - http01:\n          ingress:\n            class: nginx\n---\n# DNS challenge solver (for wildcard certs with Cloudflare)\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt-prod-dns\nspec:\n  acme:\n    server: https:\u002F\u002Facme-v02.api.letsencrypt.org\u002Fdirectory\n    email: admin@example.com\n    privateKeySecretRef:\n      name: letsencrypt-prod-dns\n    solvers:\n      - dns01:\n          cloudflare:\n            apiTokenSecretRef:\n              name: cloudflare-api-token\n              key: api-token\n---\n# Self-signed CA issuer for internal services\napiVersion: cert-manager.io\u002Fv1\nkind: ClusterIssuer\nmetadata:\n  name: selfsigned-ca\nspec:\n  selfSigned: {}\n```\n\n### Certificate Resources\n\n```yaml\n# Public-facing certificate\napiVersion: cert-manager.io\u002Fv1\nkind: Certificate\nmetadata:\n  name: example-cert\n  namespace: default\nspec:\n  secretName: example-tls\n  issuerRef:\n    name: letsencrypt-prod\n    kind: ClusterIssuer\n  dnsNames:\n    - example.com\n    - www.example.com\n  duration: 2160h    # 90 days\n  renewBefore: 720h  # 30 days before expiry\n---\n# Wildcard certificate\napiVersion: cert-manager.io\u002Fv1\nkind: Certificate\nmetadata:\n  name: wildcard-cert\n  namespace: default\nspec:\n  secretName: wildcard-tls\n  issuerRef:\n    name: letsencrypt-prod-dns\n    kind: ClusterIssuer\n  dnsNames:\n    - \"*.example.com\"\n    - example.com\n---\n# Ingress with automatic TLS\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: example-ingress\n  annotations:\n    cert-manager.io\u002Fcluster-issuer: letsencrypt-prod\nspec:\n  tls:\n    - hosts:\n        - example.com\n      secretName: example-tls\n  rules:\n    - host: example.com\n      http:\n        paths:\n          - path: \u002F\n            pathType: Prefix\n            backend:\n              service:\n                name: web\n                port:\n                  number: 80\n```\n\n## OpenSSL Commands Reference\n\n```bash\n# Generate a private key\nopenssl genrsa -out server.key 4096\n\n# Generate an ECDSA key (preferred for performance)\nopenssl ecparam -genkey -name prime256v1 -out server-ec.key\n\n# Generate a CSR (Certificate Signing Request)\nopenssl req -new -key server.key -out server.csr \\\n  -subj \"\u002FC=US\u002FST=California\u002FL=San Francisco\u002FO=Acme Corp\u002FCN=example.com\"\n\n# Generate CSR with SAN (Subject Alternative Names)\nopenssl req -new -key server.key -out server.csr -config \u003C(cat \u003C\u003CEOF\n[req]\ndefault_bits = 4096\ndistinguished_name = dn\nreq_extensions = san\nprompt = no\n\n[dn]\nCN = example.com\nO = Acme Corp\nC = US\n\n[san]\nsubjectAltName = DNS:example.com,DNS:www.example.com,DNS:api.example.com\nEOF\n)\n\n# Generate self-signed certificate (development\u002Ftesting)\nopenssl req -x509 -nodes -days 365 -newkey rsa:4096 \\\n  -keyout selfsigned.key -out selfsigned.crt \\\n  -subj \"\u002FCN=localhost\"\n\n# View certificate details\nopenssl x509 -in cert.pem -noout -text\n\n# Check certificate expiration date\nopenssl x509 -in cert.pem -noout -dates\n\n# Check remote certificate\nopenssl s_client -connect example.com:443 -servername example.com 2>\u002Fdev\u002Fnull | \\\n  openssl x509 -noout -dates -subject -issuer\n\n# Verify certificate chain\nopenssl verify -CAfile ca-bundle.crt server.crt\n\n# Check certificate chain from remote server\nopenssl s_client -connect example.com:443 -showcerts 2>\u002Fdev\u002Fnull | \\\n  openssl x509 -noout -text\n\n# Convert PEM to PKCS12\nopenssl pkcs12 -export -out cert.pfx -inkey server.key -in server.crt -certfile ca.crt\n\n# Convert PKCS12 to PEM\nopenssl pkcs12 -in cert.pfx -out cert.pem -nodes\n\n# Test TLS connection and cipher negotiation\nopenssl s_client -connect example.com:443 -tls1_3\nopenssl s_client -connect example.com:443 -cipher 'ECDHE-RSA-AES256-GCM-SHA384'\n```\n\n## Strong TLS Configuration\n\n### Nginx\n\n```nginx\nserver {\n    listen 443 ssl http2;\n    server_name example.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fprivkey.pem;\n\n    # Protocol versions\n    ssl_protocols TLSv1.2 TLSv1.3;\n\n    # Cipher suites (TLS 1.2)\n    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;\n    ssl_prefer_server_ciphers off;\n\n    # Session settings\n    ssl_session_timeout 1d;\n    ssl_session_cache shared:SSL:10m;\n    ssl_session_tickets off;\n\n    # OCSP stapling\n    ssl_stapling on;\n    ssl_stapling_verify on;\n    ssl_trusted_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fchain.pem;\n    resolver 8.8.8.8 8.8.4.4 valid=300s;\n    resolver_timeout 5s;\n\n    # Security headers\n    add_header Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\" always;\n    add_header X-Content-Type-Options nosniff always;\n    add_header X-Frame-Options DENY always;\n\n    # HTTP to HTTPS redirect (in separate server block)\n}\n\nserver {\n    listen 80;\n    server_name example.com www.example.com;\n    return 301 https:\u002F\u002F$host$request_uri;\n}\n```\n\n### Apache\n\n```apache\n\u003CVirtualHost *:443>\n    ServerName example.com\n\n    SSLEngine on\n    SSLCertificateFile \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Ffullchain.pem\n    SSLCertificateKeyFile \u002Fetc\u002Fletsencrypt\u002Flive\u002Fexample.com\u002Fprivkey.pem\n\n    SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1\n    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384\n    SSLHonorCipherOrder off\n\n    SSLUseStapling on\n    SSLStaplingCache shmcb:\u002Ftmp\u002Fstapling_cache(128000)\n\n    Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"\n\u003C\u002FVirtualHost>\n```\n\n## Certificate Monitoring\n\n```bash\n#!\u002Fbin\u002Fbash\n# cert-monitor.sh - Monitor certificate expiration across hosts\n\nWARN_DAYS=30\nCRIT_DAYS=7\nHOSTS=(\n  \"example.com:443\"\n  \"api.example.com:443\"\n  \"admin.example.com:443\"\n)\n\nfor host in \"${HOSTS[@]}\"; do\n  expiry=$(echo | openssl s_client -connect \"$host\" -servername \"${host%%:*}\" 2>\u002Fdev\u002Fnull | \\\n    openssl x509 -noout -enddate 2>\u002Fdev\u002Fnull | cut -d= -f2)\n\n  if [ -z \"$expiry\" ]; then\n    echo \"ERROR: Cannot connect to $host\"\n    continue\n  fi\n\n  expiry_epoch=$(date -d \"$expiry\" +%s)\n  now_epoch=$(date +%s)\n  days_left=$(( (expiry_epoch - now_epoch) \u002F 86400 ))\n\n  if [ \"$days_left\" -le \"$CRIT_DAYS\" ]; then\n    echo \"CRITICAL: $host expires in $days_left days ($expiry)\"\n  elif [ \"$days_left\" -le \"$WARN_DAYS\" ]; then\n    echo \"WARNING: $host expires in $days_left days ($expiry)\"\n  else\n    echo \"OK: $host expires in $days_left days ($expiry)\"\n  fi\ndone\n```\n\n### Prometheus cert-manager Metrics\n\n```yaml\n# Alert on expiring certificates in Kubernetes\ngroups:\n  - name: cert-manager\n    rules:\n      - alert: CertificateExpiringSoon\n        expr: certmanager_certificate_expiration_timestamp_seconds - time() \u003C 7 * 24 * 3600\n        for: 1h\n        labels:\n          severity: critical\n        annotations:\n          summary: \"Certificate {{ $labels.name }} expires in less than 7 days\"\n\n      - alert: CertificateNotReady\n        expr: certmanager_certificate_ready_status{condition=\"True\"} == 0\n        for: 15m\n        labels:\n          severity: warning\n        annotations:\n          summary: \"Certificate {{ $labels.name }} is not ready\"\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Certbot fails with \"connection refused\" | Port 80 blocked by firewall | Open port 80 for ACME HTTP-01 challenge |\n| \"Too many certificates already issued\" | Let's Encrypt rate limit hit | Use staging endpoint for testing; wait for rate limit reset |\n| cert-manager challenge stuck pending | Ingress or DNS misconfigured | Check `kubectl describe challenge`; verify DNS records |\n| Mixed content warnings | HTTP resources on HTTPS page | Update all asset URLs to HTTPS; use CSP headers |\n| OCSP stapling not working | Resolver not configured | Add `resolver` directive in nginx; verify outbound DNS |\n| Intermediate cert missing | Incomplete chain served | Use `fullchain.pem` not `cert.pem`; verify with `openssl s_client -showcerts` |\n| TLS handshake failure | Client doesn't support offered ciphers | Add TLS 1.2 support; check cipher suite compatibility |\n\n## Best Practices\n\n- Automate renewal with systemd timers or cert-manager\n- Monitor expiration dates with alerting (30-day and 7-day warnings)\n- Use only TLS 1.2 and TLS 1.3\n- Enable HSTS with long max-age and includeSubDomains\n- Enable OCSP stapling to improve handshake performance\n- Use ECDSA keys for better performance where possible\n- Test configuration with SSL Labs (ssllabs.com\u002Fssltest)\n- Keep private keys secure with proper file permissions (0600)\n- Rotate certificates before expiry, not after\n- Maintain a certificate inventory across all services\n\n## Related Skills\n\n- [hashicorp-vault](..\u002F..\u002Fsecrets\u002Fhashicorp-vault\u002F) - PKI management\n- [waf-setup](..\u002Fwaf-setup\u002F) - Web protection\n- [zero-trust](..\u002Fzero-trust\u002F) - mTLS and identity-based access\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"devops-skills","1.0","master","6afd82404843540f5a44d929a8738661d4ee1a46","harness\u002Fskills\u002Fssl-tls-management","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub","https:\u002F\u002Fgithub.com\u002Faeroalgo","2026-10-30 21:15:25",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add aeroalgo\u002Fdev-hub --skill ssl-tls-management",{"tool":39,"command":40},"bunx","bunx skills add aeroalgo\u002Fdev-hub --skill ssl-tls-management",{"tool":42,"command":43},"pnpm","pnpm dlx skills add aeroalgo\u002Fdev-hub --skill ssl-tls-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fssl-tls-management\u002FSKILL.md",true,[],[48,56,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7B1WAEEY273S87Y9A8WT0EN","your-skill-name","Replace with a clear description of what this skill does. Use when \u003Cthe situations that should trigger it>.","CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fyour-skill-name\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7B1W0HKXX2J9R6NSFBFPB12","websocket-engineer","Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fwebsocket-engineer\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7B1VXEW7V2QJWBYWTYGDZ4Z","web-security-review","Review web applications against the OWASP Top 10 for Web Applications (2021). Use when auditing web apps, reviewing server-side code, or assessing web frameworks for the classic OWASP Top 10 risks including injection, broken auth, and XSS.","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fweb-security-review\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7B1V47JB0TAGPE3FJPG0F0V","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fvercel-react-view-transitions\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7B1TZS9MNJKTKTFNPRCEB0C","vercel-react-native-skills","React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fvercel-react-native-skills\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7B1TT4SA56VD9Z32HKBHGZK","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Faeroalgo\u002Fdev-hub\u002Fblob\u002Fmaster\u002Fharness\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[]]