docs(website): the /mcp trusted-proxy guard exists — un-invert its documentation - #563
Merged
Conversation
added 4 commits
July 29, 2026 18:03
…tedProxies to the schema
Deploying paddock with
|
| Latest commit: |
0e257bb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1dfb7011.paddock-7u2.pages.dev |
| Branch Preview URL: | https://docs-trusted-proxy-guard.paddock-7u2.pages.dev |
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 defect
The website told operators a security guard does not exist when it does, and
recommended the workaround that guard exists to invalidate.
managementApi.trustedProxies/PADDOCK_MANAGEMENT_TRUSTED_PROXIESshipped in0.48.1 (#505, closing #474).
docs/CONFIGURATION.mddocuments it correctly;the two website pages were never updated, so
reference/mcp.mdstill carried a:::cautionsayingX-Forwarded-Protois honoured from any peer and framing#474 as open — and then presented
-H "X-Forwarded-Proto: https"as "alegitimate workaround". Docs-only; no code change, no changeset.
Related context: #556.
reference/mcp.mdThe
:::cautionblock — rewritten for current behaviour. New#### Which peers are believedsubsection documents the config surface: env-over-fileprecedence (
management-config.ts:255), theloopback, linklocal, uniquelocaldefault (trusted-proxy.ts:51), the accepted token set includingnone/all/*(trusted-proxy.ts:54-56,115), array-or-delimited-stringparsing (
:103-111), and that a bad entry is dropped with a logged error,not a startup failure (
:134-139). Also records the one-per-peer warning,capped at 32 peers, when a forwarded scheme is believed under the default
list (
routes/mcp.ts:206-215), and why Fastify'strustProxyis deliberatelyunused (
routes/mcp.ts:97-102;fastifyis pinned4.28.1).The page's honest tone is kept, and the caution is retitled rather than
deleted: a trusted peer still isn't proof TLS happened, and terminating TLS in
front of
/mcpis still the real advice. What changed is that this is now areal, configurable control that a public peer cannot switch off.
The "legitimate workaround" — replaced with what
trusted-proxy.ts:39-43actually prescribes:
docker compose exec paddock curl http://127.0.0.1:4000/mcp …, where the peer really is loopback, plus why thebridge gateway is deliberately not loopback-equivalent (SNAT from another
host lands on the same address). Notes honestly that under the default list a
172.xgateway does matchuniquelocalso the header still yields a200with a warning — but no longer presents it as the fix.
"The
managementApiblock is file-only — there is noPADDOCK_MANAGEMENT_*environment equivalent" — false. Now "file-first", with
trustedProxiesnamed as the one exception (phrasing follows
docs/CONFIGURATION.md:124-127,which was already right).
PADDOCK_MANAGEMENT_TRUSTED_PROXIESis the onlyPADDOCK_MANAGEMENT_*variable the server reads — verified by grep overpackages/server/src.Config schema — added the missing
trustedProxiesrow and a commentedentry in the YAML example.
The 403 row in the response matrix was incomplete. There are two 403 paths
with different message bodies (
routes/mcp.ts:180-199), now one row each:via: "plaintext"andvia: "spoofable".configuration/config-file.md— file-only, no env equivalent→— file-first; only trustedProxies has an env var, andtrustedProxiesadded to the example.managementApi— the one file-only block" → "the file-first block",body corrected, and a
trustedProxiesexample added covering the default, therecommended named-terminator posture, and locked-down
none.Verification
packages/server/src/trusted-proxy.ts,routes/mcp.tsandmanagement-config.ts— not against the changelog or theexisting docs.
0.48.1confirmed as the first tag containing fix(server): only believe X-Forwarded-Proto from a trusted proxy (#474) #505 (git tag --contains).cd website && npm install && npm run build→ exit 0, 45 pages.#which-peers-are-believed,#plaintext-is-refused--as-defence-in-depth) confirmed present asid=in thebuilt HTML, and every
href="#…"on the page resolves.documentation examples, most lifted from
trusted-proxy.ts's own comments.Deliberately untouched:
docs/CONFIGURATION.mdand everything else owned by thein-flight #558.