prop/test/microwaveprop_web
Graham McIntire ef54125aa6
fix(security): only trust forwarded-ip headers from known proxies
The remote_ip plug previously trusted Cf-Connecting-Ip and X-Forwarded-For
on every request, so any client reaching a pod directly (cluster-internal,
kubectl port-forward, misconfigured Service) could spoof conn.remote_ip,
which flows into session storage and logs.

Now only honour those headers when the immediate TCP peer sits inside a
configured CIDR list. Default list covers loopback, RFC1918, CGNAT,
link-local, and IPv6 ULA — matches the k8s pod/service network.
Override via config :microwaveprop, :trusted_proxies, or per-environment
via the TRUSTED_PROXY_CIDRS env var in runtime.exs.

Also refresh the stale "nginx/dokku proxy" moduledoc — deployment has
been k8s + Cloudflare for a while.
2026-04-21 13:19:52 -05:00
..
controllers feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
live test: fix three pre-existing test flakes 2026-04-21 13:07:01 -05:00
plugs fix(security): only trust forwarded-ip headers from known proxies 2026-04-21 13:19:52 -05:00
live_table_footer_test.exs Show windowed page list in live_table footer 2026-04-13 10:02:19 -05:00
metrics_log_suppression_test.exs fix(logging): suppress /metrics logs and harden scorer hot path 2026-04-21 10:44:25 -05:00
skew_t_test.exs Fix credo warnings: length/1 on list and nested module aliases 2026-04-16 08:49:25 -05:00
user_auth_test.exs Beacon power in mW, settings tweaks 2026-04-08 12:45:35 -05:00