Can I make the live stream public?
Description and use
The developer implemented a secure workflow that requires authentication and RBAC for live streams, preventing public exposure of camera feeds.
Problem
A developer was asked to expose a live camera stream publicly, but the system is designed for permissioned access only.
Outcome
The system now guarantees that only authenticated, authorized users can view live streams, preventing accidental public exposure and ensuring compliance with security policies.
Workflow
- 1. User logs in and requests a live stream via POST /sites/:id/cameras/:id/live.
- 2. Server verifies session.user and checks RBAC for site and camera.
- 3. If authenticated and authorized, vendor live session returns a short‑lived handle.
- 4. Browser mounts the player with the handle.
- 5. On logout or role revocation, the player is destroyed and subsequent refreshes are denied.
- 6. For kiosk usage, a device JWT is verified and a device‑specific live session is opened.
- 7. All playlists are served over HTTPS and never exposed in public URLs or QR codes.
- 8. Tests verify that unauthenticated, cross‑user, or revoked sessions cannot access the stream.
- 9. Debug code and leftover playlist strings are removed before launch.
- 10. Temporary event streams are revoked automatically after the event ends.
Evidence
I will not publish an unauthenticated HLS, FLV, or RTMP playlist.
I re-run RBAC on handle refresh.
I emit live_open with user_id or device_id. If that field is null, the deploy is a bug.
- Record date: 2026-09-22T05:00:28.206Z