Files
conversation-history/sessions/2026-04-19-jacob-ssl-debug.md

4.2 KiB
Raw Permalink Blame History

jacob.fetcherpay.com SSL & Routing Debug Session

Status: In Progress (as of 2026-04-19 ~05:15 UTC)

Goal

Expose Jacob (DeerFlow AI agent) at https://jacob.fetcherpay.com with:

  • Valid trusted SSL cert
  • HTTP basic auth (boaz / strength)

What's Working

  • Traefik is routing traffic to jacob.fetcherpay.com ✓
  • DeerFlow nginx container (deer-flow-nginx) is up and reachable at 192.168.200.2:2026 ✓
  • Traefik docker labels are correct on the nginx container ✓
  • Jacob router registered in Traefik with certResolver: letsencrypt ✓
  • jacob-auth basic auth middleware configured and registered ✓
  • Let's Encrypt RSA cert was issued for jacob.fetcherpay.com at 2026-04-19 04:11 UTC (stored in /home/garfield/letsencrypt/acme.json) ✓

What's Broken

Issue 1 — Fake SSL cert being served

  • openssl s_client shows: CN = Kubernetes Ingress Controller Fake Certificate
  • Traefik logs confirm cert IS loaded: Adding certificate for domain(s) jacob.fetcherpay.com
  • But TLS handshake returns the placeholder cert instead of the LE cert
  • Root cause unknown — the LE RSA cert is in acme.json (issuer: Let's Encrypt R13, valid Apr 19–Jul 18), identical structure to working certs (hermes, obsidian)

Issue 2 — Basic auth not enforcing

  • curl -sk https://jacob.fetcherpay.com returns nginx 404 directly (no 401 prompt)
  • Even with wrong credentials, no 401 — request passes straight through to DeerFlow nginx
  • Middleware IS registered in Traefik API (jacob-auth@docker, status: enabled)
  • Hash format: $2b$12$... (bcrypt) — possibly needs $2y$ for Apache htpasswd compat?

Issue 3 — nginx 404

  • DeerFlow's nginx returns 404 for Host: jacob.fetcherpay.com
  • DeerFlow nginx may only serve localhost — needs server_name config or _ default

Key Discoveries

  • hermes.fetcherpay.com serves a valid LE cert and works correctly — same acme.json format
  • File provider (/letsencrypt/manual/tls.yml) was tried but cert never served — Traefik was loading the ECC ZeroSSL cert into acme.json instead of using file provider cert
  • When file provider cert exists for a domain + certresolver is set, Traefik treats it as "provided cert" and skips ACME issuance (but doesn't serve it either — bug?)
  • Cleared tls.yml to {} to eliminate file provider interference
  • acme.json jacob entry: Let's Encrypt R13, RSA, notBefore=Apr 19 04:11:38 2026

Files Changed This Session

  • /home/garfield/deer-flow/docker/docker-compose-dev.yaml — nginx labels changed from tls=true to tls.certresolver=letsencrypt
  • /home/garfield/letsencrypt/manual/tls.yml — cleared to {}
  • /home/garfield/letsencrypt/acme.json — jacob cert removed/re-added multiple times; current state has valid LE RSA cert

Next Steps to Try

  1. Fix nginx 404: Check DeerFlow nginx config (docker/nginx/nginx.conf) — add server_name _; or jacob.fetcherpay.com to the server block
  2. Fix basic auth hash: Regenerate with $2y$ prefix via htpasswd -nbB and update docker-compose label
  3. Fix SSL cert: The cert exists in acme.json but isn't served — investigate whether Traefik v3.6.13 has a known bug with ACME certs not being served when a file provider is also configured for the same domain (even if tls.yml is empty)
  4. Alternative SSL fix: Remove file provider from traefik.yml entirely (remove file: block), restart Traefik — this might clear whatever state is blocking the LE cert from being served

Commands for Next Session

# Check cert being served
echo | openssl s_client -connect jacob.fetcherpay.com:443 -servername jacob.fetcherpay.com 2>/dev/null | openssl x509 -noout -subject -issuer

# Check current HTTP response
curl -sk -o /dev/null -w "%{http_code}" https://jacob.fetcherpay.com

# Check jacob in acme.json
echo "onelove" | sudo -S python3 -c "
import json
with open('/home/garfield/letsencrypt/acme.json') as f:
    data = json.load(f)
for r,v in data.items():
    for c in (v.get('Certificates') or []):
        if 'jacob' in c.get('domain',{}).get('main',''):
            print(r, c['domain'])
"

# Remove file provider from traefik.yml (try this if cert still not served)
# Edit /home/garfield/traefik.yml — remove the 'file:' block under providers
# Then: docker restart traefik