Skip to content

P1 gateway: enforce HLS auth via signed JWT #9

Description

@SlavaKuntsov

Phase / Priority / Area

Phase 13 · Priority P1 · Area gateway

Зависимости

Blocked by: #7 (предположение)

Scope

services/gateway/cmd/server/main.go:115, services/gateway/internal/middleware/hlsauth.go (new), frontend/src/lib/api.ts

Goal

Приватные видео недоступны подбором UUID.

Acceptance Criteria

  • Middleware HLSAuth: GET /hls/{id}/*?token=JWT(video_id,exp 1h) или Authorization: Bearer + metadata owner_id check; public — пропуск
  • private без токена →403, с токеном →200, Cache-Control: private

Проверки

curl /hls/{private}/master.m3u8 403 без токена / 200 с токеном, curl -I

Out of scope

CDN Cache-Control diff (#9)

Риски

Формат токена JWT vs signed URL — решить

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions