Skip to content

feat(signalling): add optional streamer_token auth - #1086

Open
s-uryansh wants to merge 1 commit into
EpicGames:masterfrom
s-uryansh:feat/streamer-token-auth
Open

s-uryansh wants to merge 1 commit into
EpicGames:masterfrom
s-uryansh:feat/streamer-token-auth

Conversation

@s-uryansh

Copy link
Copy Markdown

Relevant components:## Relevant components:

  • Signalling server
  • Common library
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • Platform scripts
  • SFU

Problem statement:

Streamer port has no auth. player_token exists for players but there's nothing equivalent for streamers anyone who can reach that port can connect and register as a streamer.

Solution

Added --streamer_token and --streamer_token_file, same idea as player_token. Reused the existing verifier instead of writing a new one (renamed it to createTokenVerifier since it's shared now). Hooks into streamerWsOptions.verifyClient so bad tokens get rejected at the upgrade step, before a connection is even made.

Opt-in if you don't set a token nothing changes. Token can go in the query string or as a Bearer header, same as player_token. Also made sure it gets redacted from --save, logs, and the interactive config printout.

Documentation

Updated README with the new flags, and updated Security-Guidelines.md since it used to flat out say streamer connections aren't authenticated that's not true anymore if you set the token.

Test plan and compatibility

Added tests covering the Commander option parsing and token-file loading paths, including:

  • Authentication disabled when no token is configured
  • Missing and incorrect tokens rejected with 401
  • Correct token accepted
  • Invalid configuration values rejected
  • Missing, empty, and valid token files
  • Token-file whitespace trimming
  • Configuration-log redaction

Updated the existing player-token tests for the shared verifier rename without removing any assertions.

Verified on Node.js 22.14.0:

  • SignallingWebServer test suite passes
  • Build passes
  • Lint passes
  • Live WebSocket upgrade checks return the expected authorization results

Nothing else changes if you're not using the new option.

@changeset-bot

changeset-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f3c20b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@epicgames-ps/wilbur Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@s-uryansh

Copy link
Copy Markdown
Author

Why is there no review

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant