Security model

Separate the public site from every privileged control.

Tube draws explicit boundaries around identity, data, media, operations, and licensing. The controls ship with the platform; the operator still owns secrets, network policy, monitoring, backups, and response.

01

Database authorization

Supabase tables ship with Row Level Security policies. Anonymous reads are scoped, write paths require an authenticated session, and privileged paths verify operator roles server-side.

02

Controlled media delivery

Playback access is issued server-side with short-lived signed URLs, keeping privileged storage credentials out of the browser contract.

03

Role-gated operations

Admin, moderator, and uploader boundaries are checked on the server. Cron and worker endpoints require dedicated bearer credentials.

04

Abuse resistance

Authentication and sensitive mutations are rate-limited. Bulk-import URLs pass SSRF guards, and redirect targets are constrained before navigation.

05

Audit and drift visibility

Privileged mutations enter the audit trail, while readiness and environment checks surface missing controls before they become silent production drift.

Implemented controls

Security is part of the application contract.

These are shipped controls and operational checks, not a separate badge or marketing add-on.

  • Row Level Security on every Supabase table

  • Service-role key segregated server-only

  • Signed, short-lived media URLs

    Playback access stays server controlled

  • CSRF-safe server actions

  • Auth rate limiting

    lib/auth/auth-rate-limit.ts

  • Cron bearer auth

    lib/auth/verify-cron-bearer.ts

  • Admin role gate

    lib/auth/require-admin.ts

  • Uploader role gate

    lib/auth/require-uploader.ts

  • Safe-redirect guard

  • URL guard for bulk imports

  • Audit log on all admin mutations

  • Env-var audit script

Shared responsibility

Application controls do not replace sound operations.

Self-Host operators configure secrets, firewall policy, monitoring, backups, service access, and incident response for their environment. Managed customers retain responsibility for their content, users, editorial choices, and legal obligations.

Explore the operator surface

Build on clear boundaries

Launch the product with the security model already in place.

Choose a managed branded site or operate the same application controls on infrastructure you own.