feat(streamdeck): a named pipe instead of a port, and no token at all - #55
Merged
Merged
Conversation
The Stream Deck server listened on `127.0.0.1:43120` behind a bearer token and a hand-written Host and Origin check, because a loopback port is reachable by any web page the user has open. It now listens on a named pipe, the move the internal API already made: - **A browser cannot open a pipe**, so the Host, Origin and DNS-rebinding checks have nothing left to stop, and are gone. - **Windows decides who can write to it.** The default security descriptor gives write access to this account, administrators and SYSTEM only; a request is a write, so another account cannot send one. - **So the token is gone too.** It only ever stopped web pages and other machines: anything running as the user could read it out of the plugin's settings, and that is exactly who can still reach the pipe. Still HTTP, spoken over the pipe with `socketPath`, so every route and reply is unchanged. **The pipe name carries the profile** (`pipe.ts`, unit-tested): the default profile gets `\.\pipe\goodbit-streamdeck`, a profile moved with `GOODBIT_USER_DATA` gets a hashed suffix, and GoodBit writes which into the installed plugin's `connection.json`, so a dev build never answers for the installed app. Settings lose the address and token rows, the copy buttons and the `streamDeckPort` / `streamDeckToken` keys. The plugin loses its connection property inspector; the tag key keeps only its tag. Gates: `npm run check` 860; `streamdeck-check.mjs` rewritten for the pipe, 15 checks, exit 0: the plugin gets in with no token, the app under test listens on no TCP port, the profile's pipe is its own, and every key rule as before. `streamdeck validate` successful; plugin 0.3.0. Not benched: that another Windows account cannot write to the pipe, which needs a second account and rests on the default descriptor. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
The Stream Deck connection is now a named pipe instead of
127.0.0.1:43120, and the token is gone.socketPath), so every route and reply is unchanged.connection.json).Gates:
npm run check860;streamdeck-check.mjs15/15 (no token needed, no TCP port, the profile gets its own pipe, all key rules);streamdeck validateOK. Not benched: another Windows account being refused (needs a second account).🤖 Generated with Claude Code