Repository navigation
feat(oauth): HTTP endpoints for browser login (Spec 132 PR-1e) - #2017
Merged
Merged
Conversation
…ec 132 PR-1a) Related #1971
…132 PR-1a) Related #1971
… 132 PR-1b) Related #1971
…mic (Spec 132 PR-1b) Related #1971
…132 PR-1c) Related #1971
…132 PR-1a) Related #1971
…(Spec 132 PR-1c) Related #1971
…ts (Spec 132 PR-1c) Related #1971
…into feat/client-oauth-login-storage
…Spec 132 PR-1d) Related #1971
… 132 PR-1d) Related #1971
…on (Spec 132 PR-1d) Related #1971
…back (Spec 132 PR-1d) Related #1971
…PR-1e) Public OAuth endpoints behind the three-state gate (metadata, register, authorize, token), the /mcp/oauth[/<client>] resource chain that authenticates mcp_oat_ tokens on every request, the mcp_oat_ refusal on the classic MCP routes, admin REST for sign-in requests, per-login and API-key revoke, credentials[] on client payloads, and the oauth credential kind on activity rows. Related #1971
…Spec 132 PR-1e) Register takes exactly one JSON object as application/json; mcp_oat_ is refused on classic MCP routes whatever the bearer whitespace and on the REST API with the client-credential 403; once used every client row carries credentials and browser_login_disabled (install-wide); open requests and SSE streams end with their login (revoke, forget, switch-off, rotation, expiry); cross-origin and cross-site posts to register and token are refused; an unreadable ever-used marker reads as used; OAuth routes answer 404 behind a proxy header. Related #1971
… (Spec 132 PR-1e) Cancelling a tracked request also sets immediate read and write deadlines so a handler blocked in a write or a body read ends; the watcher is stopped and joined at shutdown (also in StopServer). A monotonic switch-off epoch makes a quick off then on still end requests authenticated before it. Tests cover blocked write, stalled upload, shutdown, quick off/on, and client revoke, client forget and refresh-token replay ending only the affected stream. Related #1971
…2 PR-1e) The switch-off epoch is counted when the disabled configuration is published, so a request that authenticated under the enabled one is always older than it. Stream tracking has a stopping flag checked under the mutex that creates the registry, and a fresh lifecycle per server run; a refused request is answered 503 without invoking the MCP handler. Related #1971
… server run (Spec 132 PR-1e) A switch-off whose publish fails no longer ends live streams: the epoch is counted only after a successful publish while the lifecycle lock is always released. A request captures a server-run generation before authenticating and is refused (503, handler not invoked) if it registers in another run. Related #1971
…32 PR-1d) Storage validates expiry against the real clock, so a fixed fixture date started failing once it passed. Related #1971
Windows reports 0666 for any writable file. Related #1971
…132) The client record's position among random token hashes was left to 30 tries on one store, which fails in a few percent of runs. A store that leaves the client first or last is now rebuilt. Related #1971
Deploying mcpproxy-docs with
|
| Latest commit: |
bc5ae6f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://af10a6fc.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://feat-client-oauth-login-http.mcpproxy-docs.pages.dev |
…pec 132 PR-1e) After StopServer and a new StartServer in one process, the context watcher of the stopped run called StopServer once more and its exit path cleared the running state; either could land on the new run and leave it stopped. The watcher's stop and the exit cleanup are now bound to their own run. Found through TestOAuthStreams_StopThenStartTracksAgain failing in CI. Related #1971
…c 132 PR-1e) StopServer captured the HTTP server at entry but cancelled and unmarked whatever run was current at its end. It now cancels the context of the run it began stopping and clears state only while that run is current. Related #1971
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 45239720806 --repo smart-mcp-proxy/mcpproxy-go
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary
Fifth slice of Spec 132 (opt-in browser login for MCP clients; earlier slices #1997, #2010, #2012, #2013). This one serves the feature over HTTP. It is still off by default (
mcp_oauth_enabled), and while off and never used every existing answer is unchanged.POST /oauth/register,GET /oauth/authorize,POST /oauth/token, and the MCP endpoints/mcp/oauthand/mcp/oauth/<client-id>./api/v1/oauth/authorizations/…) and logins on clients. No consent page yet (next slice):GET /oauth/authorizeredirects to/ui/authorize?request=<id>.oauth.Review
Cross-reviewed with opencode
github-copilot/gpt-6.1-sol(five rounds, clean) and an Opus security review.Testing
go test -race ./internal/server/... ./internal/httpapi/... -run 'OAuth|Oauth'(and with-tags server).Related #1971