Repository navigation
Isolate bundled go2rtc and run recorder containers without root - #668
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
The bundled go2rtc API was exposed independently of LightNVR's authentication, and the images ran the recorder and media subprocess as root. Bind the generated/default API listener to loopback, remove port 1984 publishing, keep browser signaling on the dashboard origin, and run both images as UID:GID
10001:10001. Update the go2rtc submodule to41c9dfd38c513d73a8265259dcda19a1932f6174, which validates sources and redirects, uses FFmpeg argument vectors, and requires administrative API authentication.Depends on opensensor/go2rtc#2. Merge that PR first while retaining the pinned commit in the repository history, or update this pin to the resulting merge commit before merging LightNVR.
Deployment changes:
/go2rtc/api/wsand/go2rtc/api/webrtc; HLS and snapshots retain LightNVR's authenticated proxy. The proxy must share the recorder's network namespace to reach loopback. Documentation replaces wildcard nginx, Caddy, and Traefik routes and explains that gateway credentials do not enforce per-camera permissions./var/run/lightnvr/lightnvr.pid. Existing configuration files need that path updated. Review persisted go2rtc overrides for explicit public listeners.Validation:
nginx -t; live checks reject anonymous media/admin requests and allow authenticated WebSocket upgrades.Full multi-architecture image builds and end-user camera/browser revalidation remain release checks.