Repository navigation
fix: exempt loopback hosts from the CIMD metadata URL HTTPS requirement - #2326
Conversation
`getCimdClientMetadataUrlError` rejected every non-HTTPS CIMD client metadata URL with no loopback exemption, and the same check runs against `client.json` on disk through `refineCimdMetadataUrl`, so it could not be worked around by hand-editing the file either. Every test server in this repo speaks plain HTTP, so CIMD could not be driven against any local fixture: #2242 shipped verified by tests alone, and reproducing it by hand meant standing up a self-signed HTTPS listener plus `NODE_TLS_REJECT_UNAUTHORIZED=0` in the test server's environment. Accept plain `http:` on the three literals the SDK itself exempts from its token-endpoint TLS assertion — `localhost`, `127.0.0.1` and `[::1]`. That is option 1 in #2305 and matches what the runtime already tolerated: `core/auth/cimd.ts` notes that an already-stored `client_id` may be an `http://` URL used by local dev/test metadata servers. Anything outside those three, `localhost.` and `tenant.app.localhost` included, is still rejected — matching the SDK literal for literal keeps the two allow-lists from disagreeing about one URL. The exemption is a literal set rather than `isLoopbackHost` because `core/client/config-parse.ts` is browser-safe and `core/node/hostUrl.ts` imports `node:net`. The field error now names the exemption instead of saying only "must use HTTPS", and the form's hint and description say the same, so a developer pointing the field at a local fixture is told which spellings work. Closes #2305 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB Signed-off-by: cliffhall <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The smoke-testing documentation still contradicts the new loopback HTTP exemption and should be updated.
Pull request overview
Allows plain HTTP CIMD metadata URLs for exact loopback hosts while preserving HTTPS enforcement elsewhere.
Changes:
- Adds
localhost,127.0.0.1, and[::1]exemptions. - Updates UI guidance and test-server documentation.
- Adds unit and integration coverage.
File summaries
| File | Reviewed changes | Review note |
|---|---|---|
docs/test-servers.md |
Updates local CIMD fixture instructions. | Nit (1 vote): Update specification/v2_auth_smoke_testing.md:513, which still describes the exemption as test-only. |
core/client/config-parse.ts |
Implements literal loopback HTTP exemptions. | Nit (1 vote): Update the contradictory smoke-testing guidance at specification/v2_auth_smoke_testing.md:513. |
clients/web/src/test/integration/mcp/oauth-cimd-fixture.test.ts |
Verifies HTTP fixture URL acceptance inline and through client.json. |
No findings. |
clients/web/src/test/core/client/config.test.ts |
Tests accepted loopback URLs and rejected non-loopback and near-miss hosts. | No findings. |
clients/web/src/components/groups/ClientSettingsForm/ClientSettingsForm.tsx |
Updates CIMD URL hints and descriptions. | No findings. |
Review details
Suppressed comments (2)
core/client/config-parse.ts:123
specification/v2_auth_smoke_testing.md:513still says thatensureCimdClientRegistrationpermitshttp://127.0.0.1metadata URLs "in tests only." This change makes those URLs valid through the persisted client-config path and the web settings UI, so the smoke guidance is now contradictory; update that statement (and any affected local-CIMD instructions) along with this policy change.
if (url.protocol !== "https:" && !isCimdHttpExemptHost(url.hostname)) {
docs/test-servers.md:573
- Please update
specification/v2_auth_smoke_testing.md:513as part of this change. It still saysensureCimdClientRegistrationpermitshttp://127.0.0.1metadata URLs “in tests only”; after this validator change those URLs are valid persistedclient.jsonsettings and the documented manual fallback, so that guide now contradicts the new workflow and tells users the exemption is test-only.
well as to the settings form), which is the same exemption the SDK applies to token endpoints and what
the runtime already tolerated for an already-stored `client_id`. Give the URL the host the server is
actually listening on; a host outside those three — `localhost.` and `tenant.app.localhost` included,
even though both resolve to loopback — is still rejected, deliberately, so this allow-list and the
SDK's cannot disagree about one URL.
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…th smoke guide `specification/v2_auth_smoke_testing.md` said `ensureCimdClientRegistration` allows `http://127.0.0.1` metadata URLs "in tests only". That was accurate while the exemption lived only in the runtime's already-stored-`client_id` path; after this PR a loopback `http://` URL is a valid persisted `client.json` setting and a valid entry in the settings form, so the sentence contradicted the workflow the same guide asks a smoke tester to run (Copilot review round 1). The same paragraph's recipe was stale in two other ways it is cheaper to fix here than to leave next to a corrected claim: `cd test-servers && npm run build` names a manifest that does not exist, and `oauth-cimd-only.json` is not a config in this repo. Both now point at the shipped `oauth-cimd-http.json` fixture and the real build command. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB Signed-off-by: cliffhall <[email protected]>
Copilot review round 1 — responseThe round generated 0 inline comments; both findings arrived in the Suppressed comments block, which has no thread to reply into, so this comment is the response to each rather than a rollup alongside inline replies.
The line read: " Two further things in that same paragraph were stale, and I fixed them rather than leave them sitting next to a corrected claim:
I also grepped
|
There was a problem hiding this comment.
🟡 Changes recommended
Address the hostname-alias validation gap and correct the documented smoke-test paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
core/client/config-parse.ts:123
URL.hostnameis WHATWG-canonicalized before this check, so the implementation does not actually restrict HTTP to the three documented input literals. For example,http://127.1:...,http://2130706433:..., andhttp://[0:0:0:0:0:0:0:1]:...become127.0.0.1/[::1]and pass, despite the literal allow-list and its near-miss test. Compare the original authority hostname (or explicitly decide and document these aliases) and add regression cases.
if (url.protocol !== "https:" && !isCimdHttpExemptHost(url.hostname)) {
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Lite
…oke recipe's cwd Copilot review round 2. The exemption compares the WHATWG-canonicalized `URL.hostname`, so it covers alternate spellings of three loopback *addresses* rather than three input strings: `127.1`, `2130706433`, `0x7f.0.0.1`, `[0:0:0:0:0:0:0:1]` and a root-anchored `127.0.0.1.` all pass. The behavior is right — the security argument is about the address the request reaches, and all of these are the loopback interface — but the comment described it as a literal-input match, which it is not. It now states the contract, and six regression cases pin the aliases alongside the existing near-miss cases. This is also still an exact match for the SDK: `assertSecureTokenEndpoint` tests `url.hostname` against the same three values after the same `new URL` canonicalization, so an alias accepted here is one the SDK accepts too. Separately, the smoke guide's fixture recipe left the shell in `clients/web` after the build line, so the repo-root-relative paths on the next line resolved under `clients/web` and the copy-pasted setup failed before the server started. The build now runs in a subshell, and the block notes that the server announces its URL on stderr and walks past a taken port. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB Signed-off-by: cliffhall <[email protected]>
Copilot review round 2 — responseOne inline comment (replied in its thread) and one suppressed finding, which has no thread and is answered here.
|
There was a problem hiding this comment.
🟡 Changes recommended
Documentation and specification guidance need the identified state-reset and URL clarification updates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
docs/test-servers.md:579
- This walkthrough also omits the OAuth-state reset needed for its claimed negative control. The Inspector reuses persisted tokens before prompting for authentication, and disabling CIMD does not clear them, so a prior run can make “CIMD off should fail” appear to pass. Add a clear-state step before the off run and again before enabling CIMD.
⚠️ **Before [#2305](https://github.com/modelcontextprotocol/inspector/issues/2305) there was no
loopback exemption at all**, so driving this flow meant standing up a throwaway self-signed HTTPS
listener to hold the document and setting `NODE_TLS_REJECT_UNAUTHORIZED=0` in the *test server's*
environment so its own fetch of that document would succeed. That workaround is no longer needed — if
you find it in a script or an older note, delete it.
specification/v2_auth_smoke_testing.md:526
- The two outcomes documented here are not deterministic without clearing OAuth state: tokens and client registrations persist independently of the install-wide CIMD toggle, so a previous CIMD run can make the CIMD-off connection reuse stored credentials instead of failing. Add an explicit clear step before the off phase and between the off/on phases, as the other smoke procedures do.
With CIMD off in Client Settings, connect + authenticate should **fail**; with CIMD on and that local metadata URL, it should **succeed**. `docs/test-servers.md` has the full walkthrough, including the `redirect_uris` port trap.
specification/v2_auth_smoke_testing.md:524
- The composable server does not announce a metadata URL:
test-servers/src/server-composable.ts:109prints the MCP endpoint ending in/mcp. This sentence labels/client-metadata.jsonas the announced URL; instruct readers to take the origin (host and port) from the announced MCP URL and append/client-metadata.jsoninstead.
Since [#2305](https://github.com/modelcontextprotocol/inspector/issues/2305) a loopback `http://` metadata URL is a **valid persisted `client.json` setting and a valid entry in the settings form**, not a test-only affordance — `getCimdClientMetadataUrlError` exempts `localhost`, `127.0.0.1` and `[::1]`, the same three literals the SDK exempts for token endpoints. So point `clientMetadataUrl` straight at the URL the fixture announced (`http://127.0.0.1:8092/client-metadata.json` on its configured port) with no HTTPS listener. Before that change the exemption existed only in `ensureCimdClientRegistration`, for an already-stored `client_id`, and driving this by hand needed a self-signed HTTPS listener plus `NODE_TLS_REJECT_UNAUTHORIZED=0`.
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Lite
… claims Copilot review round 4, four findings, all correct. The CIMD-off / CIMD-on pair the smoke guide documents is not a control without clearing OAuth state first: tokens and the registered client persist in oauth.json independently of the install-wide CIMD toggle, and the Inspector reuses valid stored tokens before prompting — so a leftover grant from an earlier CIMD-on run makes the CIMD-off phase connect and the negative control silently proves nothing. Both the spec's pair and the walkthrough in docs/test-servers.md now say to clear state (or isolate MCP_STORAGE_DIR) first. The composable server announces its MCP endpoint, not the metadata document — `server-composable.ts` prints a URL ending in `/mcp`. The guide called the announced URL a metadata URL; it now says to take the origin from that line and append `/client-metadata.json`. Two general statements elsewhere in the same file still defined CIMD as always HTTPS (the glossary row, and the Stytch section's opening), so a reader following them would have rejected the loopback fixture the same file now documents. Both note the exemption; the Stytch examples stay HTTPS, which they are. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB Signed-off-by: cliffhall <[email protected]>
Copilot review round 3 + 4 — responseRound 3 was 🟢 Approval recommended, 0 comments. I requested a fourth round anyway rather than stopping there — a single zero-comment round is not evidence a review is finished — and it produced four findings, all correct. Round 4 is 1 inline comment (replied in its thread) and 3 suppressed, which have no thread and are answered here. All four are fixed in d7f9014. Suppressed —
|
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate issues and one documentation nit remain unresolved.
Review details
Suppressed comments (3)
clients/web/src/components/groups/ClientSettingsForm/ClientSettingsForm.tsx:319
- The new copy is part of the fix's user-facing contract, but
ClientSettingsForm.test.tsxcurrently verifies only the validation error and does not assert the hint or this input description. A future regression could restore an HTTPS-only instruction while the validator remains permissive, putting the documented local-fixture workflow out of reach for users again. Add a CIMD-enabled render assertion for both pieces of copy.
description="HTTPS URL of your OAuth client metadata JSON document (http:// is accepted only on localhost, 127.0.0.1 or [::1])."
core/client/config-parse.ts:105
- This check is broader than the stated three-literal SDK exemption: because
url.hostnameis WHATWG-canonicalized, it accepts plain HTTP for aliases such as127.1,2130706433, expanded::1, and127.0.0.1.. The SDK'sisLoopbackHostuses exacturl.hostnamecomparisons and does not accept those aliases, so the claim that the allow-lists match is false (and a CIMD server can also normalize the alias before comparing the requiredclient_id). Restrict the exemption to the exact SDK spellings, or explicitly revise the requirement and end-to-end contract to use address-based acceptance.
const CIMD_HTTP_EXEMPT_HOSTS = new Set(["localhost", "127.0.0.1", "[::1]"]);
docs/test-servers.md:576
- The preceding sentence correctly notes that the runtime already tolerated an
http://URL when it was an already-storedclient_id, so saying there was “no loopback exemption at all” is inaccurate. The pre-#2305 gap was in the config/form validator; narrow this wording so the docs do not imply that the runtime could never use local CIMD URLs.
⚠️ **Before [#2305](https://github.com/modelcontextprotocol/inspector/issues/2305) there was no
loopback exemption at all**, so driving this flow meant standing up a throwaway self-signed HTTPS
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Lite
…docs Copilot review round 5. Two of three findings taken; the third rests on a false premise about the SDK and is declined with evidence in the PR thread. The hint and the input description are part of this fix's user-facing contract — an HTTPS-only instruction there puts the local-fixture workflow back out of reach even while the validator stays permissive — and nothing asserted them. Two cases now do, plus one asserting a loopback http URL raises no error in the form. Each mutation (restoring either piece of old copy) fails exactly one of them. The docs said there was "no loopback exemption at all" before #2305, which contradicts the sentence above it: the runtime already tolerated an `http://` already-stored `client_id`, and that asymmetry is what the issue is about. The gap was in the config/form validator, and the wording now says so. Also added: a note to use the canonical spelling of the host. `127.1` and `2130706433` are accepted here and by the SDK, since both canonicalize to `127.0.0.1` — but a CIMD `client_id` is string-compared by the authorization server against the URL it dereferenced, so an exotic spelling is a real footgun independent of what either validator allows. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB Signed-off-by: cliffhall <[email protected]>
Copilot review round 5 — responseThree suppressed findings, no inline comments, so this comment is the response to each. Two taken (8baa121), one declined — that one is declined on evidence rather than judgment, detail below. ✅
|
| Mutation | Result |
|---|---|
Restore description="Public HTTPS URL of your OAuth client metadata JSON document." |
1 failed, 29 passed |
Restore the hint's must be served over HTTPS and list this redirect URI |
1 failed, 29 passed |
One failure each, not two — so the cases are detecting and not redundant with each other. The third new case asserts http://localhost:8092/client-metadata.json renders with no error in the form under revealErrors, which covers the validator through the UI rather than only through getCimdClientMetadataUrlError.
✅ docs/test-servers.md:576 — "no loopback exemption at all" is inaccurate. Taken.
You are right, and it contradicted the sentence directly above it in my own text. The runtime did tolerate an http:// already-stored client_id — that asymmetry is the whole of #2305. The gap was in the config/form validator, and there was no way to get such a value past validation into client.json. Reworded to say exactly that.
❌ core/client/config-parse.ts:105 — "The SDK's isLoopbackHost uses exact url.hostname comparisons and does not accept those aliases, so the claim that the allow-lists match is false." Declined: the SDK does accept them.
This is the same finding as round 2, where I documented the aliases at your suggestion. The new claim is that the SDK rejects them, and that is not what it does. I ran it:
SDK ACCEPTS http://127.1:9/token
SDK ACCEPTS http://2130706433:9/token
SDK ACCEPTS http://[0:0:0:0:0:0:0:1]:9/token
SDK ACCEPTS http://127.0.0.1.:9/token
SDK REFUSES http://127.0.0.2:9/token (InsecureTokenEndpointError)
SDK REFUSES http://localhost.:9/token (InsecureTokenEndpointError)
That is assertSecureTokenEndpoint from the installed @modelcontextprotocol/client, called directly. It accepts every alias and refuses exactly the near-misses this PR's tests pin. The mechanism is in its source:
function assertSecureTokenEndpoint(tokenEndpoint) {
const url = new URL(String(tokenEndpoint));
if (url.protocol !== "https:" && !isLoopbackHost(url.hostname)) throw new InsecureTokenEndpointError(url.href);isLoopbackHost does compare exactly — but it compares url.hostname, which new URL has already canonicalized. new URL("http://127.1/").hostname is the string "127.0.0.1", so the exact comparison succeeds. Mine reads url.hostname from a URL built the same way. The two are identical alias for alias, which is what "the allow-lists match" claims. Restricting to the raw input spelling would introduce the divergence this finding says it would remove — the same conclusion as round 2, now with the behavior measured rather than read.
So the implementation and the comment are unchanged. If I have misread your point and you meant the SDK's validateClientMetadataUrl (which does require HTTPS with no exemption), that one is not on this path: ensureCimdClientRegistration pre-registers the client_id so auth() never runs registration — the mechanism core/auth/cimd.ts documents and this PR does not change.
The parenthetical in your finding is a real point, though, and I took it: "a CIMD server can also normalize the alias before comparing the required client_id." A CIMD client_id is string-compared by the authorization server against the URL it dereferenced, so an exotic spelling can fail that comparison on a server that normalizes differently — regardless of what either validator allows. docs/test-servers.md now says to paste the origin the fixture announced rather than an equivalent you typed. That is a genuine footgun and I would not have documented it without this comment.
npm run format and npm run local:gate green on 8baa121.
Review complete — rounds 6 and 7 both 🟢, zero commentsSeven Copilot rounds. The last two are 🟢 Approval recommended with 0 comments and no suppressed findings, which is what I was waiting for rather than the first clean round — round 3 approved with zero comments and round 4 then produced four real findings, so a single quiet round is not evidence a review is finished. Both inline threads are replied to in-thread and resolved. Every suppressed finding is answered in the round comment above it, since those carry no thread to reply into. What the review changed
The one declined finding claimed the SDK's The substance worth flagging to a human reviewer: the round-4 clear-OAuth-state finding was the best one. The CIMD-off/CIMD-on pair the smoke guide documents was not a control, because persisted tokens survive the CIMD toggle and the Inspector reuses them before prompting — so the negative phase could connect and silently prove nothing. That was a latent defect in the procedure, not in this diff. Final stateFive commits, all signed off. One behavior change (~3 lines in
|
Closes #2305
What changed
getCimdClientMetadataUrlError(core/client/config-parse.ts) rejected every non-HTTPS CIMD client metadata URL with no loopback exemption, and the same check runs againstclient.jsonon disk throughrefineCimdMetadataUrl→CimdConfigSchema— so it could not be worked around by hand-editing the file either.Every test server in this repo speaks plain HTTP, so CIMD could not be driven against any local fixture. That is why #2242 shipped verified by unit and integration tests alone, and why reproducing it by hand meant standing up a self-signed HTTPS listener to hold a JSON document plus
NODE_TLS_REJECT_UNAUTHORIZED=0in the test server's environment.This is option 1 from the issue: accept plain
http:on the three literals the SDK itself exempts from its token-endpoint TLS assertion —localhost,127.0.0.1and[::1].core/auth/cimd.tsnotes that an already-storedclient_idmay be anhttp://URL "used by local dev/test metadata servers". The config validation was refusing a value the rest of the stack would happily use.localhost.andtenant.app.localhostincluded, even though both resolve to loopback on every resolver. Matching the SDK literal for literal is what keeps the two allow-lists from disagreeing about the same URL, and there is a test pinning it.isLoopbackHostfromcore/node/hostUrl.ts, becauseconfig-parse.tsis browser-safe andhostUrl.tsimportsnode:net. The comment says so.The field error now names the exemption (
must use HTTPS, except on localhost, 127.0.0.1 or [::1]) instead of saying only "must use HTTPS", and the form's hint and input description say the same — the phrasing lesson from the token-endpoint notice incore/auth/oauthUx.ts: telling someone to "use HTTPS" when a local fixture is the whole point sends them off to build a TLS listener rather than fix their URL.Acceptance
http://CIMD metadata URL is acceptedtest-servers/configs/oauth-cimd-http.jsondriven end to end from the web client with no self-signed HTTPS listener (screenshot below)http://public host is still rejecteddocs/test-servers.md's CIMD section updated to drop the workaroundTests
clients/web/src/test/core/client/config.test.ts— the three exempt literals accepted inline and throughparseClientConfig; a publichttp://host still rejected; the path check still applied on an exempt host; the four near-miss hosts still rejected; andhttp://localhost./…pinned as the invalid-URL error, sinceisAbsoluteHttpUrlrejects its trailing empty label before the protocol check runs.clients/web/src/test/integration/mcp/oauth-cimd-fixture.test.ts— a new case asserting the URL the live fixture actually serves its document from is legal config as-is, both inline and inclient.json. That is the property the fixture's reason for existing rests on, and a re-tightened validator would put the manual repro back out of reach without failing anything else in that file.Screenshots
Captured at 1280×900, full page, driving the real prod
--webbundle against the liveoauth-cimd-http.jsonfixture.Before —
http://localhost:8092/client-metadata.jsonrejected, and the hint claims HTTPS is the only option:After — the same URL accepted, and the hint and description name the exemption:
End to end — Connection Info after a full OAuth round against the fixture, with no HTTPS listener and no
NODE_TLS_REJECT_UNAUTHORIZED.Client registration — Client ID Metadata (CIMD), and the Client ID equal to the metadata URL, which is what CIMD means and what distinguishes it from a DCR-issuedtest_client_…(the fixture hassupportDCR: false, so reaching a connected state is the assertion). The fixture walked to 8093 here because 8092 was taken:Gate
npm run formatthennpm run local:gate— green.SkillsScreendirectory browsing,revocationelapsed-ms bound,skillsVerificationbyte-budget), none of them in files this diff touches. The machine was at a load average of 179 (a Time Machine backup plus other sessions). Each failing test passes on its own, and the run after the load cleared was green end to end.🤖 Generated with Claude Code
https://claude.ai/code/session_01GfHQ8vMm5NBgzbUJ6UwxmB