Skip to content

Deploy: production proxy-trust chain unsolved — silently disables #144 HSTS and the #143 per-IP login limiter #260

Description

@mforce

Deployment-readiness gap (#244), BLOCKER — flagged independently by all 3 reviewers.

Problem

Behind any reverse proxy / edge (the production topology terminates TLS at an
edge and forwards plain HTTP to the container), the app never learns the original
request was HTTPS or who the real client is unless the immediate proxy is
trusted. Two already-"hardened" controls silently break when the trusted-proxy
list is empty:

The compose stack already ships a sane default (TRUSTED_PROXY_CIDR=172.16.0.0/12
in deploy/.env.example + docker-compose.yml); the gap is that a real deploy
must set the correct immediate-proxy CIDR for its edge, and leaving it empty is
unsafe.

Fix (app-side, portable)

The app already reads the trusted-proxy list from config — keep that, and make an
empty TrustedProxies fail loud in Production (refuse to serve with inert
HSTS / a collapsed limiter) so a misconfigured deploy can't silently ship without
the controls. The concrete CIDR for the chosen edge is deploy-repo config.

Verify

  • curl -I https://<prod> shows Strict-Transport-Security.
  • A forged X-Forwarded-For from a non-proxy peer is ignored.
  • Two distinct clients hit two distinct login buckets (11 logins from client A
    does not 429 client B).

Part of the #244 deployment-readiness audit; tracked in epic #15.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions