Skip to content

The gateway rebinding barrier judges Host against the bind, so a wildcard-bind install stops answering to its DNS name #1273

Description

@philcunliffe

Deferred from the triage of PR #1271 (head ab56f4e83ea7481e59067f5bb728b4c8d59e8c92), review round 2 residual finding 2. Severity: medium.

Where

hypaware-core/plugins-workspace/ai-gateway/src/proxy.js:411, the rebinding barrier added by PR #1271.

Observed behavior

LLP 0233 #loopback-peers-only records a non-loopback listen as an operator-configurable, supported exposure (reverse-proxying to registered upstreams), and scoped the CONNECT refusal to the peer, not the bind, to keep such an install working. The new barrier judges Host against the bound address, and a wildcard bind earns no routable exemption (boundAddress is 0.0.0.0, never the arrival address). So after #1271 a client on another machine reaching a listen = "0.0.0.0" install by its DNS name (Host: gateway.corp:18521) gets 421, while the interface literal (Host: 192.168.1.10:18521) still passes. The install stops answering to its DNS name.

Why deferral is safe

This is the same trade PR #1236 already shipped on the OTLP and OpenCode listeners, and issue #1239 settled it explicitly ("no config key widens the accepted set"). Widening the accepted set here would be a design change against a settled decision, not a fix. Non-loopback binds are a rare, deliberate operator configuration; the workaround (address the gateway by the routable interface literal, not by a name) works today and is documented in the README section this PR added ("On a wildcard bind a client on another machine has the same constraint as a remote exporter"). Default installs (127.0.0.1) are unaffected.

Acceptance condition

Either a decision (a new LLP extending 0233, or a recorded resolution on this issue) affirms that DNS-name addressing of a wildcard-bound gateway stays refused, or a mechanism ships under which a request arriving on a wildcard bind may be accepted under a name that resolves to the arrival address, covered by a test showing Host: <dns-name>:<port> accepted on a 0.0.0.0 bind while Host: attacker.example on a loopback bind is still refused.

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

    Labels

    neutral:fixDelegate this issue to neutral for an autonomous fix attempt (reproduce -> fix -> PR)neutral:stuckneutral attempted this but cannot complete it autonomously — needs a human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions