Repository navigation
Register the client dynamically when none is set - #3
Merged
Merged
Conversation
- Add RFC 7591 dynamic client registration: without a configured clientID mcpurl registers a public client for its loopback redirect URI and keeps it in ~/.config/mcpurl/clients, keyed by endpoint and redirect URI - Register once across concurrent processes under a file lock - Drop the registration and its token and register anew when refresh answers invalid_client or the authorization server has changed - Refuse confidential clients, foreign redirect URIs and servers without a registration endpoint with an actionable error - Let logout work without a clientID and drop the registration too; uninstall and logout --all clean registrations up, show prints them - Point the login timeout at logout when the browser reports an unknown client, and let logout drop an unreadable registration - Update README for setups without --client-id
- Bump the go directive from 1.26.7, which CI installs verbatim via setup-go's go-version-file, so govulncheck reported nine standard library vulnerabilities fixed in 1.26.9 (net/http, net/textproto, crypto/tls) and failed the security job - No source change: the advisories are in the toolchain, not in mcpurl, and govulncheck is clean on 1.26.9
- Fix a second bridge opening a browser on a dead client_id: when the server forgot a shared registration and one process re-registered, the other, waiting on the same token lock, logged in with the old client instead of picking up the new one - Cover more registration answers: a plain http endpoint, no client_id, non-JSON, an error page, a token quoted in error_description, and the lenient 200 / no-echo answers - Cover every unreadable registration shape, the redirect URI default, the login-timeout hint, and the registration drop by logout, logout --all and uninstall
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.
--client-id; a configured clientID still wins~/.config/mcpurl/clients, keyed by endpoint and redirect URI: the callback port is part of what the server registered, andconfig.tomlstays untouched, so bare-URL runs work tooinvalid_clientor discovery finds another authorization serverredirect_urisand servers without a registration endpoint with an actionable error, the server's own error text includedlogoutwork without a clientID and drop the registration too, an unreadable one included;uninstallandlogout --allclean registrations up,showprints themmcpurl logoutwhen the browser reports an unknown client: a server that forgot the client fails its authorization page, out of mcpurl's sightinvalid_client, unreadable registrations, and show / logout / logout --all / uninstall--client-id