fix: secure-by-default Docker auth (#864) + CSI yield recovery (#866)#868
Open
ruvnet wants to merge 1 commit into
Open
fix: secure-by-default Docker auth (#864) + CSI yield recovery (#866)#868ruvnet wants to merge 1 commit into
ruvnet wants to merge 1 commit into
Conversation
…eld recovery (#866) #864 — Docker no longer exposes the sensing API/stream unauthenticated: - Add `require_ws_token` middleware gating `/ws/*` (sensing + introspection) with the API token via `?token=` (browser) or `Authorization: Bearer` (programmatic). Previously /ws/sensing was ungated even with a token set. - docker-entrypoint.sh now fails closed: auto-generates a strong RUVIEW_API_TOKEN when none is supplied and prints it; explicit RUVIEW_ALLOW_UNAUTHENTICATED=1 restores the open LAN posture. - compose/Dockerfile wire the env vars; startup logs + CI smoke test updated to assert secure-by-default (401 with no token) and the opt-out path. - 7 new bearer_auth unit tests (15 total pass). #866 — CSI callbacks were starving (~3 in 70s, 0pps) under the MGMT-only promiscuous filter: - The documented "10 Hz probe injection" never existed — implement it for real (csi_inject_probe_request + 10 Hz timer). Validated on ESP32-C6 (COM9): probe TX succeeds at 10 Hz, but management-frame CSI stays sparse. - Re-admit DATA frames (MGMT+DATA) now that the original wDev_ProcessFiq SPI-cache crash is mitigated by WiFi RX/TX IRAM opts + the existing 50 Hz rate gate. Kconfig CSI_PROMISC_MGMT_ONLY falls back if needed. - Hardware-validated on COM9: yield 0 -> ~9pps avg (peak 19), presence/motion sensing restored, 0 panics over 35s. Co-Authored-By: claude-flow <ruv@ruv.net>
| # LAN with RUVIEW_ALLOW_UNAUTHENTICATED=1. | ||
| # REST: Authorization: Bearer <token> | ||
| # WS: ws://<host>:3001/ws/sensing?token=<token> | ||
| - RUVIEW_API_TOKEN=${RUVIEW_API_TOKEN:-} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #864, fixes #866. Also documents the resolution for #852.
#864 — Docker no longer exposes the sensing API/stream unauthenticated
/ws/*now gated — newrequire_ws_tokenmiddleware protects/ws/sensingand/ws/introspectionwhenRUVIEW_API_TOKENis set. Token via?token=<t>(browsers can't set WS headers) orAuthorization: Bearer. Previously the live sensing WebSocket was open even with a token configured.docker-entrypoint.shauto-generates a strongRUVIEW_API_TOKENwhen none is supplied and prints it to the logs, so the default Docker deployment is never anonymous. Operators on a trusted, isolated LAN opt out explicitly withRUVIEW_ALLOW_UNAUTHENTICATED=1.Validation: 15
bearer_authunit tests pass (7 new for WS), full sensing-server lib suite (436) green, compiles under themqttDocker feature, entrypoint POSIX-valid + token generator verified.#866 — CSI callbacks were starving under the MGMT-only filter
Root cause: the
csi_collector.ccomment promised "probe-request injection at 10 Hz" but no such injection existed — under the MGMT-only promiscuous filter the node depended entirely on ambient beacons, so heavy DATA traffic (or a beacon-sparse room) yielded ~3 callbacks in 70 s, 0 pps.csi_inject_probe_request+ 10 Hz timer). Hardware testing showed it transmits reliably but management-frame CSI stays sparse on the C6.MGMT+DATA). The originalwDev_ProcessFiqSPI-cache crash that forced MGMT-only is now neutralized by the WiFi RX/TX IRAM optimizations + the existing 50 Hz early rate gate (CSI_MIN_PROCESS_INTERVAL_US).Kconfig CSI_PROMISC_MGMT_ONLYprovides a fallback.Hardware validation (ESP32-C6 on COM9):
wDev_ProcessFiq)#852 — "no docker image / denied" (informational)
Not a broken package:
ghcr.io/ruvnet/wifi-densepose:latestis public (anonymous pull → HTTP 200). The reporter usedghcr.io/ruvnet/ruview, which doesn't exist. Correct names:ruvnet/wifi-densepose:latest(Docker Hub) /ghcr.io/ruvnet/wifi-densepose:latest.🤖 Generated with claude-flow