Caddy www block lacks trusted_proxies (strip client-supplied XFF at the edge) #129
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#129
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Severity: MEDIUM (defence-in-depth) — pre-onboarding infra audit (2026-07-19).
The
www.gitborg.seblock (ansible/roles/caddy/templates/Caddyfile.j2:60-67) is a barereverse_proxy bitborg-web:3000with notrusted_proxies, so Caddy appends the real client IP to any client-suppliedX-Forwarded-Forrather than stripping it. bitborg-web PR #60 fixes the app side (read the rightmost/last XFF hop), but the edge should also strip client-supplied XFF for defence-in-depth — as Forgejo already does (REVERSE_PROXY_TRUSTED_PROXIES+REVERSE_PROXY_LIMIT=1,app.ini.j2:69-74).Ask
Add
trusted_proxies(the podman subnet) to thewwwblock so Caddy replaces rather than appends XFF. Related: monitoring-VM Caddy pasta client-IP loss #100. Effort S.Implemented on branch
feat/129-caddy-trusted-proxies(committed, push pending — SSH agent re-locked). Addedcaddy_trusted_proxies(the internal podman subnet, 10.89.0.0/24) andtrusted_proxiesto all three reverse_proxy blocks (www, kanidm, forgejo), not just www — Caddy is the edge and sees the real client IP via socket activation (#81), so real clients are untrusted and Caddy overwrites their X-Forwarded-For, stripping spoofed hops. Rendered Caddyfile validated withcaddy validate(2.11.4). Ready to push + PR + apply.