Repository navigation
chore: adopter quick fixes — portable defaults, public-IP sweep, srt-listen docs, proxy-trust opt-in - #38
chore: adopter quick fixes — portable defaults, public-IP sweep, srt-listen docs, proxy-trust opt-in#38guycochran wants to merge 1 commit into
Conversation
|
Reviewed — this is a clean adopter/security hardening pass, no media-path changes, well-scoped. The proxy-trust default flip (opt-in Two interaction points with the open contribution PR (#37), which I'll handle on #37 so this PR stays clean:
Whichever merges first, the other rebases cleanly with those two adjustments. I'd suggest #38 merges first (it's small, security-relevant, and independent); #37 then rebases trivially. |
|
Correction to my previous comment — I re-checked the actual diffs and overstated the CONFIG.md overlap:
Net: the two PRs are effectively independent. Either merge order works with a trivial auto-merge. 👍 |
…s follow-up PR #38 (adopter hardening) swept MXL_BACKEND_URL defaults off the facility host but skipped tools/nmos_node.py because this PR rewrites it. Doing it here so it's resolved when #37 lands: --facility / MXL_BACKEND_URL now default to the LOCAL control plane http://127.0.0.1:3100, not a specific facility (a cloned core must not point at someone else's backend). Override with --facility / MXL_BACKEND_URL for a real deployment. After this, nmos_node.py has no prodbots.com reference; #38's tripwire allowlist entry for it (tests/test_no_hardcoded_hosts.py) is stale and can be dropped (harmless if left — allowlists over-permit). IS-05 tests set facility explicitly, unaffected. 152 py + 36 node green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwSKEZZz4yEc2CGq5hcTmT
…ity-default flip) The prior commit removed prodbots.com from tools/nmos_node.py (portable --facility default), which made its tripwire allowlist entry stale → test_allowlist_has_no_stale_entries failed (the ratchet: the allowlist only shrinks). Remove the entry. This is exactly PR #38's "then drop its allowlist entry" follow-up, done here since #37 owns the reason.⚠️ COORDINATION: PR #38 also edits tests/test_no_hardcoded_hosts.py (new IPv4 sweep + QR guard). This is a 1-line deletion of the nmos_node.py ALLOW row; it should not collide with #38's additions, but whoever merges second should confirm the row is gone (not re-added). 152 py + 36 node green (full suite clean — the prior push had this one test red; fixed here). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwSKEZZz4yEc2CGq5hcTmT
|
One more accurate note (I was wrong that the allowlist entry was purely your follow-up): Flipping
Everything on #37 is green again (152 py + 36 node). |
…docs, proxy-trust off - Remove the two static Larix QR PNGs from web/ (they encoded a fixed facility address); web/mxl.html now loads the per-box QR from GET /api/mxl/ingest/qr/guestN.png and hides it if unavailable. - docs/GCP-BUILD-PLAN.md: replace a routable IP with an RFC 5737 placeholder. - tests/test_no_hardcoded_hosts.py: scan web/ for site hosts too; add a repo-wide public-IPv4 sweep (docs, README, web, code; RFC 1918 / loopback / RFC 5737 allowed) and a guard against committing static QR images in web/. - Docs match the srt-listen default: README, QUICKSTART (open UDP 8890 AND 8891, no stream id in listen mode), SECURITY (passphrase not applied in listen mode — restrict the ports). - Tool/web defaults no longer point at a specific facility: MXL_BACKEND_URL defaults to http://127.0.0.1:3100, MXL_FEED_URL to http://127.0.0.1:8889; commentary WHIP goes via the same-origin /mxlfeed/ proxy; the DOMAIN link uses the serving host :9608. (tools/nmos_node.py left for a follow-up.) - backend/mxl-auth.js: CF-Connecting-IP / X-Forwarded-For are trusted only when MXL_TRUST_PROXY=1 (alias MXL_TRUST_PROXY_HEADERS=1). Default OFF so a directly exposed server can't have its throttles dodged by spoofed headers. - CONTRIBUTING.md: drop the claim that CI checks doc links. Signed-off-by: Guy Cochran <guycochran@gmail.com>
49ca43b to
fd22b63
Compare
|
Coordination note re: #37. #37 (commits This PR keeps the Rule: whichever of #37/#38 merges second removes the Also: the commit here is now signed off ( |
|
Reviewed One non-blocking note (only relevant when Everything on the #37 side that interacts with your PR is settled (nmos facility default flipped, stale allowlist row dropped, CONFIG.md non-conflicting). No further action needed from me on #38. |
What
These are small adopter-facing fixes from a review of the public core. There are no media-path changes.
Static QR images removed.
web/qr-larix-guest1.png/guest2.pngencoded one fixed facility address.web/mxl.htmlnow loads the per-box QR from the existing/api/mxl/ingest/qr/guestN.pngroute and hides it (onerror) if unavailable.Routable IP → placeholder in
docs/GCP-BUILD-PLAN.md, using RFC 5737203.0.113.10.Tripwire extended in
tests/test_no_hardcoded_hosts.py:web/(vendored JS excluded). Public project-site links are allowlisted with reasons. Stale allowlist entries were removed, since the allowlist only ever shrinks.tests/and vendored JS excluded). It allows RFC 1918, loopback, link-local, unspecified, CGNAT, and the RFC 5737 placeholder ranges, and has a self-test.web/again. A QR hides its address in pixels, where the text scans can't see it.Docs match the
srt-listendefault:README.md: Guest 1 on:8890, Guest 2 on:8891, Caller mode, no stream ID.docs/QUICKSTART.md: open UDP 8890 and 8891; no stream ID in listen mode;srt-directdescribed as the opt-in.SECURITY.md: in listen mode the passphrase options are not applied, so restrict the UDP ports in the firewall.Defaults no longer point at a specific facility.
MXL_BACKEND_URLnow defaults tohttp://127.0.0.1:3100(the local control plane) in:tools/layout_pgm.py,audio_pgm.py,mxl_multiview.pyselector-doctor.sh,guest-leg-doctor.shscripts/bring-up-mxl.shAlso changed:
MXL_FEED_URL→http://127.0.0.1:8889.docs/CONFIG.mdupdated, andtests/test_env_config.pynow pins the new portable defaults.Proxy-header trust is opt-in (
backend/mxl-auth.js). TheMXL_TRUST_PROXY=1setting (aliasMXL_TRUST_PROXY_HEADERS=1) is documented indocs/CONFIG.mdandSECURITY.md. A new test shows that rotatingX-Forwarded-Forno longer dodges the failed-auth lockout by default.CONTRIBUTING.md: removed the claim that CI checks doc links. It doesn't.Tests
node --test tests/js/*.test.js→ 38/38 pass (was 36; +2 proxy-trust tests).python -m pytest tests/→ 136 passed, 2 skipped (+3 new tripwire tests).bash -nis clean on all shell scripts, andnode --checkpasses on the Companion module.Follow-ups (deliberately not in this PR)
tools/nmos_node.pystill defaults--facility/MXL_BACKEND_URLto the original facility host. It's skipped here because an open PR is rewriting that file. Flip it tohttp://127.0.0.1:3100after that lands, then drop its allowlist entry.web/lower-third.htmlpolls the backend cross-origin from inside the keyer, so it needs a configurable host (allowlisted for now).*.companionconfig), and the comment examples inscripts/mxl-doctor/tools/contribution_core.py.srt-listenlistener itself, so listen mode can be gated, not just firewalled.