Changed
- Outbound OAuth flows now send the RFC 8707
resourceparameter on both the authorization request and the token request, for backends and for themuster agentlogin. The value is theresourcefield of the target’s RFC 9728 metadata, sent exactly as declared; when that metadata omits the field, orspec.auth.authorizationServeropts out of discovery, it is derived from the configured URL by dropping the query and the fragment and changing nothing else, which is the value mcp-go derives for the refresh request. A token muster obtains for one backend is no longer accepted at another backend that trusts the same issuer, provided the authorization server honors the parameter. An authorization server that rejects an unknownresourcewill fail the login. - Authorization server metadata is now rejected when its
issuerdoes not identify the server the document was fetched from (RFC 8414 §3.3, trailing slash ignored), and when it carries noissuerat all. Deployments whose authorization server reports an issuer other than the URL muster fetches it from must correct the configured issuer. - RFC 9728 protected resource metadata advertised by a backend is now bound to that backend. A
resource_metadata=pointer in aWWW-Authenticateheader is followed only when it is on the backend’s own scheme and host, and aresourcethe document declares is used only when it is on that same origin (the path may differ, so a backend serving at<base>/mcpmay declare<base>). A pointer to another origin is ignored and discovery falls through to the well-known path; a foreign declared resource is dropped and the indicator is derived from the backend URL. Without these checks a backend could name a document that binds muster’s token to a resource the backend does not own. - Breaking (Go API):
pkg/oauth.Client.BuildAuthorizationURLtakes anAuthorizationRequeststruct instead of six positional arguments, andpkg/oauth.Client.ExchangeCodetakes a trailingresourceargument. Callers pass the same values through the new shapes; an emptyResourceomits the parameter. - OAuth callbacks are now validated per RFC 9207 before anything else on the response is acted on. A present
issmust equal the issuer the authorization server publishes in its own metadata (simple string comparison, no normalization), and an absentissis refused when that server advertisesauthorization_response_iss_parameter_supported. When the metadata is unreachable the comparison falls back to the issuer recorded with the flow and then ignores a trailing slash on either side, because that value is operator-configured rather than published by the server. A response that fails the check is rejected whole: itserroranderror_descriptionare neither acted on nor displayed. An error response that carries no valid state now renders “missing required parameters” instead of the OAuth denial page.