restrict_by_ip_address_spec with SSH fails against gdk with http-router enabled

This issue is blocked by https://gitlab.com/gitlab-org/cells/http-router/-/issues/140 which is blocked by https://github.com/cloudflare/workers-sdk/issues/7588


The following tests fail whe run against the gdk with the http router enabled:

rspec ./qa/specs/features/ee/browser_ui/10_govern/group/restrict_by_ip_address_spec.rb:76 # Govern Group access when restricted by another ip address with SSH denies access
rspec ./qa/specs/features/ee/browser_ui/10_govern/group/restrict_by_ip_address_spec.rb:122 # Govern Group access when restricted by user's ip address with SSH allows access

These tests were passing when the router was disabled.

Context: #471172 (comment 2020105721)

Debugging

I noticed that with the restrict_by_ip_address_spec.rb spec we have some warnings which aren't present when we disable gitlab_http_router

./gdk.sshd.log:2024-07-30_08:02:08.00642 sshd                  : {"correlation_id":"01J41AJBZXBY1P2S9E2C5QT2GV","error":"read tcp 172.18.0.3:2222-\u003e172.18.0.4:50368: read: connection reset by peer","level":"warning","msg":"connection: initServerConn: failed to initialize SSH connection","remote_addr":"172.18.0.4:50368","time":"2024-07-30T08:02:08Z"}
./gdk.sshd.log:2024-07-30_08:16:25.42277 sshd                  : {"correlation_id":"01J41BCHA70KM484RHA8PY23K9","error":"read tcp 172.18.0.3:2222-\u003e172.18.0.4:58490: read: connection reset by peer","level":"warning","msg":"connection: initServerConn: failed to initialize SSH connection","remote_addr":"172.18.0.4:58490","time":"2024-07-30T08:16:25Z"}

To give some context 172.18.0.4 is the IP address we use in the test to check that other IP addresses are denied. The IP address of the client is actually 172.18.0.3.

We get the IP address from the current_sign_in_ip field from the response to http://gdk.test:3000/api/v4/users/

I suspect it is something relating to how we configure sshd for the gdk tests or the way we are setting the IP address.

Edited by Lin Jen-Shin