Conversation
🦋 Changeset detectedLatest commit: f3c20b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Author
Why is there no review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant components:## Relevant components:
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_tokenand--streamer_token_file, same idea as player_token. Reused the existing verifier instead of writing a new one (renamed it tocreateTokenVerifiersince it's shared now). Hooks intostreamerWsOptions.verifyClientso 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:
401Updated the existing player-token tests for the shared verifier rename without removing any assertions.
Verified on Node.js 22.14.0:
Nothing else changes if you're not using the new option.