Zero Trust Video Delivery: Access Models and Secure Streaming
System DesignModel answerLast updated
Compare VPN, ZTNA, and RBI enforcement models, then design a chunk-level secure streaming pipeline for high-bitrate enterprise video under a Zero Trust policy.
Context
A large enterprise runs an internal video platform: recorded all-hands meetings, compliance training, and sensitive product briefings. Content is hosted across a hybrid cloud environment and must be reachable by both managed corporate laptops and unmanaged personal devices used by contractors.
The security team has given you two interconnected problems.
Part 1: Compare Three Remote-Access Models for High-Bitrate Media
Evaluate VPN, Zero Trust Network Access (ZTNA), and Remote Browser Isolation (RBI) as mechanisms for delivering web-streamed video to remote users.
For each model, address:
- Where enforcement lives — at what layer does authentication, policy evaluation, and traffic inspection occur?
- Blast radius on endpoint compromise — how far can an attacker move if they fully control the client machine?
- Cost of carrying high-bitrate video — what are the bandwidth, latency, and compute trade-offs when the content is 1080p–4K (5–25 Mbps per stream)?
Part 2: Design a Secure Segmented Video Delivery Pipeline
Using ZTNA as the primary access model (with RBI as a fallback for unmanaged devices), design an end-to-end delivery architecture for adaptive-bitrate video (HLS or DASH/CMAF).
Your design must address all five of the following areas:
-
Session bootstrap and manifest authorization — how does a client go from a fresh login to a playable manifest without receiving any long-lived credential?
-
Per-segment authorization and integrity — how are individual
.tsor.m4schunks authorized and protected against URL sharing, unauthorized caching, and tampering? -
Caching and distribution strategy — compare a public edge CDN, a private enterprise reverse proxy, and an in-branch P2P mesh. For each, explain how ephemeral or signed URLs interact with cache hit ratios and what adjustments are required.
-
Revocation at two granularities — contrast chunk/request-level token rotation (normal operation) with session-level revocation triggered by a mid-stream de-provisioning event. What is the worst-case exposure window, and how do you bound it?
-
RBI and high-resolution video — pixel streaming a 4K video inside a remote browser container is expensive and degrades quality. Describe a more efficient architecture for handling video inside the isolated browser without fully re-encoding every frame.
What a strong answer looks like
- Precise placement of each enforcement boundary (not just "the cloud")
- Quantified trade-offs where possible (scale, latency, TTL values, egress numbers)
- Recognition that caching and revocation are in tension and a concrete resolution
- A clear explanation of why caching encrypted ciphertext is safe and how it changes the CDN keying strategy
- A viable RBI media optimization that avoids the full decode → re-encode loop
Hints
Hint 1
For Part 1, anchor each model to a specific enforcement point in the network stack — VPN operates at L3/L4, ZTNA at the application session level, and RBI even further in (content never executes locally). Blast radius follows directly from where trust is established.
Hint 2
For per-segment security, there is a direct conflict between unique per-user signed URLs (strong authorization) and CDN cache hit ratio (efficiency). Think about what part of the URL the CDN uses as its cache key, and whether you can separate the authorization signal from the cache key.
Hint 3
Revocation has two distinct timescales: the token TTL governs how stale a chunk-level decision can be, while session revocation is an event-driven push. The worst-case exposure window is bounded by the shorter of the token lifetime and the key rotation period, plus the client's forward buffer — state that bound explicitly.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Approach
This question tests whether you can place enforcement boundaries precisely, reason about caching and revocation as opposing forces, and size trade-offs with real numbers rather than hand-waving. The structure below mirrors a strong onsite answer.
Clarify Scale Before Designing
State your assumptions up front:
- 80k employees, peak 4k concurrent viewers
- Content mix: 1080p at ~5 Mbps, 4K at ~15–25 Mbps
- Peak egress: 4k × 5 Mbps ≈ 20 Gbps — hairpinning through a central gateway is not viable
- Revocation SLO: a de-provisioned user loses access within 60 seconds
- Unmanaged devices: no local copies, watermarking required, served through RBI
Part 1: Access Model Comparison
| VPN | ZTNA | RBI | |
|---|---|---|---|
| Enforcement point | Network-edge concentrator. Auth happens once at tunnel setup; ongoing policy is L3/L4 ACLs. Inspection only if traffic is hairpinned through a firewall. | Identity broker / PoP, evaluated per application session. Device posture is checked at connection time. Inside-out app connectors mean no inbound firewall ports. | A cloud-hosted browser container. All web content executes remotely; the endpoint only receives a rendered pixel stream. |
| Blast radius on compromise | Large. The attacker inherits routable network access to everything behind the concentrator and can move laterally across subnets. | Contained to the specific apps the identity and device are authorized for, scoped to the session lifetime. | Smallest for web-borne threats — no active content runs locally. However, a compromised endpoint can still screen-record, keylog, or steal the session cookie for the RBI service itself. |
| 4K video cost | Full-tunnel crypto adds concentrator load (~25 Mbps per user). Client decodes natively, so endpoint compute is low. But centralized hairpin creates a bandwidth ceiling. | Traffic routes through the nearest PoP (better latency than VPN). Native client decode. CDN integration is possible if the media origin is published through ZTNA. | Worst case. Each session requires a server-side decode and re-encode (roughly one GPU per 4K stream), adds encode latency, and the re-encoded stream often consumes more bandwidth than the source. Quality degrades measurably. |
The key insight: VPN trusts a network location, ZTNA trusts identity + device posture per application, and RBI trusts nothing executable on the endpoint. That last property is RBI's strength for general browsing — and exactly what makes it expensive for high-bitrate video.
Part 2: Secure Segmented Video Delivery
Component map
IdP (OIDC) → Policy engine → Playback/manifest service → Key server → Encrypted CMAF origin → CDN / private edge → Client player (or RBI container)
Session bootstrap
- User authenticates via SSO; receives a short-lived access token (~5 min), ideally bound to the device via DPoP or mTLS.
- Player calls
POST /playback/{videoId}. The policy engine checks identity, group membership, device posture, and content entitlement.- Managed device → direct play
- Unmanaged device → redirect through RBI
- No entitlement → 403
- On success, the playback service creates a server-side
playback_sessionrecord{session_id, user_id, device_id, video_id, expires, revoked: false}and returns:- A manifest URL
- A path-scoped edge token: a signed cookie or JWT covering
/v/{videoId}/*, TTL 60–120 s, carryingsession_id,exp, ACL claims, and optionally an IP/ASN binding
No long-lived credential ever reaches the player.
Per-segment authorization and integrity
Segments are encrypted with CENC/AES-128 (or Widevine/FairPlay for higher sensitivity). The key URL embedded in the manifest points to the key server, which re-validates policy on every key fetch — not just at session start.
URL signing vs. cache hit ratio — the core tension:
- Per-chunk HMAC in the query string (
seg042.m4s?sig=abc&exp=1720000000): every user gets a different URL → near-0% CDN cache hit ratio. - Solution: configure the CDN edge to validate the HMAC and expiry, then strip the token from the cache key. The cache stores the response keyed only by path. Hit ratio approaches that of public content; authorization is still enforced on every request.
Integrity against tampering: the playback service signs the manifest, which includes a SHA-256 hash for every segment. The player verifies each segment before appending it to the MSE buffer. Segments in CDN caches are ciphertext — safe to cache on untrusted infrastructure because the key server controls decryption independently.
Unauthorized URL sharing: a leaked URL fails because the edge token has expired, the segment is encrypted ciphertext, and the key server requires the original session to still be valid.
Caching and distribution trade-offs
| Public edge CDN | Private reverse proxy | Branch P2P mesh | |
|---|---|---|---|
| Scale / latency | Best — global PoPs, lowest RTT | Medium — enterprise-controlled PoPs | Best for branch "all-hands" replays; terrible for first viewer |
| Control | Third party holds ciphertext; revocation depends on config propagation speed | Full enterprise control, fine-grained logging | Peers are untrusted; integrity must be hash-verified |
| Cost at 20 Gbps | Metered egress, but CDN rates are low | You provision the capacity | Significant WAN savings for rewatch scenarios |
All three are compatible with ephemeral tokens only if authorization is checked at the edge before the cache lookup and the token is excluded from the cache key.
Session vs. chunk-level revocation
Normal operation (chunk-level rotation): the edge token has a 60–120 s TTL. The player calls POST /playback/{session_id}/refresh at ~50% of TTL in the background, receives a new cookie, and continues without stalling. The 20–30 s forward buffer absorbs any refresh latency.
De-provisioning event (session revocation):
- IdP signals the policy engine.
- Policy engine sets
playback_session.revoked = true. - Pushes
session_idto an edge revocation KV store (fast-propagating, TTL = max token lifetime, typically ~2 min). - Key server refuses further key requests for that session.
- Next refresh call returns 401.
Worst-case exposure window: min(token TTL, key rotation period) + client forward buffer. With a 60 s token and a 30 s buffer that is at most ~90 s. State this bound explicitly — interviewers will ask.
RBI optimization: avoiding the decode → re-encode loop
Pixel streaming (decode in container → render to canvas → re-encode to WebRTC) is expensive: roughly one GPU per 4K session, adds 200–500 ms of encode latency, and produces a stream that is often larger than the source.
Better approach — media element remoting:
- The isolated browser intercepts the
<video>/ MSE pipeline rather than the rendered pixels. - It fetches encrypted segments, validates each SHA-256 hash, and transmuxes them into a container the local player understands (e.g., fMP4 → fragmented MP4 over a local WebSocket).
- The raw ciphertext (or, after a DRM license exchange, the decrypted stream) is forwarded to a lightweight local receiver that hands it directly to the system's hardware decoder.
- Decoding and rendering happen natively on the endpoint — no GPU needed in the container.
The isolation guarantee is preserved because no arbitrary JavaScript from the media origin executes locally; only the validated, transmuxed byte stream crosses the boundary. DRM key material stays inside the container, so the endpoint never holds a usable decryption key in accessible memory.
Common mistakes to avoid
- Treating revocation as instantaneous — it is bounded by propagation time and token TTL; always quantify the window.
- Forgetting that ZTNA still requires a CDN strategy for high-egress content; the PoP is not a media server.
- Per-chunk unique URLs without stripping the token from the CDN cache key — this kills cache efficiency entirely.
- Assuming RBI provides perfect isolation; a compromised endpoint can still exfiltrate through the screen or input channel.