Repository navigation
Register read and write for a dynamic registration that names no scope - #3319
Merged
Merged
Conversation
A client metadata document that names no scope is provisioned with read and write, so the consent screen offers both and the person picks. Dynamic registration gave the same client read alone: an MCP client that registers before it knows what it will ask for, then authorizes with the "read write" its server's challenge names, was refused invalid_scope. A registration naming no scope (offline_access names none) now gets both, as a metadata document does. One naming only scopes Fizzy doesn't issue still gets read.
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues were identified for the OAuth scope-default update.
No open issues 🎉
What changed in this PR
Aligns OAuth dynamic client registration with client metadata documents: clients that name no scope receive read write, allowing users to choose either access level on the consent screen.
Changes:
- Defaults absent, blank, empty-list, and
offline_access-only scopes toread write. - Preserves the
readdefault for registrations naming only unsupported scopes. - Adds integration coverage for registration defaults and consent-screen choices.
Existing registrations remain unchanged.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| test/integration/oauth_flow_test.rb | Tests scope defaults and consent-screen options. |
| app/controllers/oauth/clients_controller.rb | Uses metadata-document defaults when no scope is requested. |
Review effort: Balanced
hermes-handy
added a commit
to handy-la/fizzy
that referenced
this pull request
Nov 22, 2026
Trae de upstream: - Fija fizzy-mcp-server v0.2.6 y después v0.2.7 en el despliegue SaaS (basecamp#3316, basecamp#3322). - Termina la vista previa de connected apps en producción (basecamp#3296). - Un registro dinámico de OAuth sin scope registra read y write; uno que nombra sólo scopes desconocidos registra read (basecamp#3319). - La pantalla de consentimiento OAuth se carga completa, para que Authorize pueda redirigir a la app después de iniciar sesión (basecamp#3321). - Ruby 4.0.10 en .ruby-version, Dockerfiles y CI (basecamp#3320). - El modo SaaS registra la ubicación de visitante de Cloudflare como client.geo (basecamp#3324). - Puma permite GC de marcado completo durante las peticiones (basecamp#3327). - Dependabot: aws-sdk-s3 1.242.0, surfguard bcce49e, acciones de GitHub, mittens 0.3.5, bootsnap 1.26.1, tzinfo-data 1.2026.6 y solid_queue 1.7.2. Conflicto sólo en Gemfile.lock: se conservan las gemas de Handy (faraday y sus dependencias, de ruby_llm) y la plataforma ruby de ffi de upstream. `bundle lock` con Ruby 4.0.10 no cambia el archivo. No toca personalizaciones de Handy.
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.
A client metadata document that names no scope is provisioned with
read write(document.rb), so the consent screen offers both levels and the person picks. Dynamic registration gave the same clientreadalone, throughOauth.canonical_scope("").The hosted MCP server's 401 challenge names
scope="read write". A client that registered with no scope and then authorized with that scope was refusedinvalid_scope(validate_scope→Client#allows_scope?), before the person saw the consent screen.Oauth::ClientsController#validated_scopes: a registration that names no scope, countingoffline_accessas none (asOauth.requested_scopesalready does), registersread write, the same default as a metadata document.read, as before.offline_accessonly, empty list) registersread writeand its consent screen offers both levels withread writepreselected; the first fails onmainwithExpected: "read write" Actual: "read". A second pins the unknown-scopes case.Clients already registered with no scope keep
read. They can't be told apart from clients that asked forread, so they aren't widened. One refused this way never reached consent, so the unauthorized-registration sweep removes it within a day, and the client registers again.