Skip to content

feat: optional JWT auth for the relay - #5

Merged
pzanella merged 1 commit into
mainfrom
feat/jwt-auth
Oct 3, 2026
Merged

pzanella merged 1 commit into
mainfrom
feat/jwt-auth

Conversation

@pzanella

@pzanella pzanella commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Adds optional token checks to the relay. Without the new flags the stream stays public, as before.

./stream.sh bbb --auth                  # new signing key for each run
./stream.sh bbb --auth-key my-key.jwk   # your own key, tokens stay valid across runs

With either flag:

  • The relay only accepts connections and HTTP API calls with a JWT signed with the key. Without a token, or with a token from another key, it answers 401.
  • stream.sh prints a viewer token (subscribe only, valid 24 hours) and the player URL with the token in it.
  • stream.sh signs a publish token for its own publishers (content, ads, SGAI signaling).
  • Keys and tokens are made with moq token inside the Podman image, so nothing else is needed on the host.

Also:

  • New CI job smoke-test-podman-auth.
  • README: new section "Access control (JWT)", plus notes in the player, SGAI, HTTP API and troubleshooting sections.

Tested locally:

  • --auth and --auth-key: base, CSAI, SSAI and SGAI.
  • Rejected cases: no token, a token from another key, and a viewer token trying to publish.
  • Public mode: all smoke tests still pass.

Add --auth (new signing key per run) and --auth-key FILE (your own key) to
stream.sh. With either flag the relay only accepts connections and HTTP API
calls that carry a JWT signed with the key. stream.sh prints a
subscribe-only viewer token (valid 24 hours) and signs a publish token for
its own publishers. Without the flags the stream stays public.

Add the smoke-test-podman-auth CI job and document the feature in the
README.
@pzanella
pzanella merged commit 8e0a8bf into main Oct 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant