docs(agent-server): say what --token does not buy - #927
Merged
Conversation
#924 made `--token` mandatory off loopback and explained why. It did not say what the token stops short of, which leaves the paragraph reading as "bind wide, pass a token, you are fine." Both listeners are plaintext. The bearer token travels in an `Authorization` header over `http://`, and `POST /sessions` answers with a `ws://` URL carrying the per-session token as a query parameter (`server.py`, `ws_url`); there is no TLS anywhere in that server. So the token distinguishes who may connect, not who may watch — anyone able to read the traffic can lift it and create sessions afterwards. That makes a remote bind defensible on a trusted network or behind a TLS terminator, and not defensible on its own over the internet. The refusal message and `--help` text were already accurate — they say what is wrong without a token and claim nothing about what having one achieves — so only the prose that a reader plans a deployment from needed the clause. Raised in review of #924 and verified against the code rather than taken on report: the same shape as the #920 correction, where I let a true fact carry an inference I had not checked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WAB22BuCSRhjbpR3a8kc5v
Test Results 5 files 1 009 suites 30m 10s ⏱️ For more details on these failures, see this check. Results for commit fd2f5ec. |
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.
#924 made
--tokenmandatory off loopback and explained why it is required. Itnever said what the token stops short of, which leaves the paragraph reading as
"bind wide, pass a token, you're fine."
Both listeners are plaintext. The bearer token rides an
Authorizationheader over
http://, andPOST /sessionsreplies with aws://URL carryingthe per-session token as a query parameter:
There is no TLS anywhere in that server. So
--tokenanswers who mayconnect, not who may watch — anyone positioned to read the traffic, rather
than merely to reach the port, can lift either token and create sessions
afterwards.
That makes a remote bind defensible on a trusted network or behind a TLS
terminator, and not defensible on its own over the internet. The docs now say
so.
Deliberately unchanged: the refusal message and the
--tokenhelp text.Both were already accurate — they state what is wrong without a token and
claim nothing about what having one achieves. Only the prose someone plans a
deployment from needed the caveat.
Raised in review of #924, and verified against the code rather than taken on
report —
grepfor ssl/TLS insrc/server/server.pyreturns nothing, and thews_urlline is quoted above. This is the same failure shape as the #920correction: a true fact (
--tokengatesPOST /sessions) carrying aninference I had not checked (that it therefore makes the bind safe).
Docs only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WAB22BuCSRhjbpR3a8kc5v