Skip to content

fix(proxy): add trusted client attribution - #104

Merged
osolmaz merged 1 commit into
mainfrom
fix/openclaw-proxy-attribution
Aug 27, 2026
Merged

osolmaz merged 1 commit into
mainfrom
fix/openclaw-proxy-attribution

Conversation

@osolmaz

@osolmaz osolmaz commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Onur Solmaz (osolmaz).

Summary

OpenClaw 2026.8.1-beta.3 requires a safe client attribution header for requests that arrive through a trusted proxy.
MLClaw stripped the browser's forwarding headers but did not rebuild x-forwarded-for, so GoEPT returned 403 proxy_attribution_required.
This change adds a server-owned attribution header for both HTTP and WebSocket traffic and prepares MLClaw 0.12.4.

What Changed

The proxy still rejects all browser-supplied forwarding and OpenClaw headers.
After session validation, it now rebuilds x-forwarded-for from the immediate Space ingress peer.

  • Uses the peer IP when it is a valid non-loopback address.
  • Uses documentation-only 192.0.2.1 for loopback proxy traffic.
  • Applies the same header contract to HTTP and WebSocket requests.
  • Adds a regression test that proves an attacker-supplied value is replaced.
  • Documents the client-attribution rule.

Testing

The focused proxy test and the full local quality gate passed under Node.js 24.

  • npm test -- --run test/mlclaw.space-runtime.test.ts
  • npm run check
  • git diff --check

Risks

MLClaw does not trust a browser-supplied client IP.
When the immediate ingress peer is loopback, OpenClaw sees a documentation-only address instead of the user's real network address; authenticated users share that attribution for rate limiting.

Co-Authored-By: GPT-5.6 Sol <noreply@pi.dev>
Generated-By: pi 0.84.2 (https://pi.dev)
@osolmaz
osolmaz merged commit d8ab8c1 into main Aug 27, 2026
1 check passed
@osolmaz
osolmaz deleted the fix/openclaw-proxy-attribution branch August 27, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant