-
Notifications
You must be signed in to change notification settings - Fork 149
Issue 2680 #2757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 2680 #2757
Conversation
Add clear, actionable error messages when OAuth providers do not support
Dynamic Client Registration (DCR), helping users understand why authentication
fails and how to configure client credentials manually.
Changes:
- Detect missing registration_endpoint in OIDC discovery document
- Recognize HTTP status codes indicating DCR is unavailable (404, 405, 501)
- Provide actionable guidance directing users to --remote-auth-client-id and --remote-auth-client-secret flags
- Add comprehensive test coverage for all DCR unsupported scenarios
Error message improvements:
- Before: "dynamic client registration failed with status 404: {...}"
- After: "this provider does not support Dynamic Client Registration (DCR) - HTTP 404. Please configure OAuth client credentials using --remote-auth-client-id and --remote-auth-client-secret flags, or register a client manually with the provider"
Fixes stacklok#2680
Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
|
@ChrisJBurns Hi Chris, please help review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2757 +/- ##
==========================================
+ Coverage 56.07% 56.09% +0.01%
==========================================
Files 319 319
Lines 30697 30708 +11
==========================================
+ Hits 17214 17226 +12
+ Misses 12002 12001 -1
Partials 1481 1481 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
From the logs point of view this looks good, and it won’t notify the user as this will log in the detach proxy. However, I was hoping for a more interactive way to let the user know. Maybe we need to set a state that the UI can use to prompt the user to choose another authentication method. In CI, the user can see this state via thv list. |
yes, let's have this at this time and I will keep working and improve this. |
|
Thanks, @4t8dd! I’ve merged this PR and left the issue open. I’ll discuss the proper approach with the team and share the details here once we have a direction. If you’re interested in implementing it, you’re more than welcome to jump in. In the meantime, here’s a collection of good first issues you might enjoy exploring: https://github.com/stacklok/toolhive/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22 Thanks again! |
|
Good stuff, thanks @4t8dd for the contribution!! 🚀 |
yes, definitly. I would like to figiure this out so that I can deploy this in our env for the test. |
fix of issue #2680