Conversation
… login) When dashboard.basic_auth is the sole registered provider and the dashboard is bound to a non-loopback host, every HTML navigation to a protected path 500s and the login form never renders. _auto_sso_response() fires whenever exactly one interactive provider is registered and unconditionally 302s to /auth/login?provider=basic. That route calls provider.start_login(), but BasicAuthProvider.start_login() raises NotImplementedError (it is password-only, no OAuth redirect). The NotImplementedError is not a ProviderError, so it escapes uncaught -> 500. Auto-SSO is only meaningful for redirect-based (OAuth) providers. Skip it when the sole provider is password-based so the /login interstitial renders its credential form instead. Adds a regression test asserting a single supports_password provider lands on /login rather than /auth/login.
This was referenced Jul 2, 2026
fix(dashboard): basic-auth password-only provider 500s on first load (auto-SSO assumes OAuth)
#57989
Closed
Collaborator
|
Thanks for the focused reproduction and regression test. This is already implemented on current
|
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.
Problem
With
dashboard.basic_authconfigured as the only auth provider and the dashboard bound to a non-loopback host (--host 0.0.0.0), every HTML navigation to a protected path returns500 Internal Server Errorand the login form never renders.Fixes #57211.
Root cause
_auto_sso_responseinhermes_cli/dashboard_auth/middleware.pyfires whenever exactly one interactive provider is registered, and unconditionally 302-redirects to/auth/login?provider=basic. That route (routes.py) callsprovider.start_login(), butBasicAuthProvider.start_login()(plugins/dashboard_auth/basic/__init__.py) raisesNotImplementedError— it is password-only and has no OAuth redirect flow.NotImplementedErroris not aProviderError, so it escapes uncaught → 500.Auto-SSO is documented as being for "the portal OAuth redirect", so it should never target a password provider.
Fix
Skip auto-SSO when the sole provider is password-based (
supports_password), so the/logininterstitial renders its credential form instead:After this, an unauthenticated HTML load lands on
/login(200, credential form) instead of 500ing.Test
Adds
test_single_password_provider_renders_login_not_auto_ssotoTestAutoSsoRedirect, asserting a singlesupports_passwordprovider redirects to/loginrather than/auth/login. Full file passes:Reproduction (before fix)
dashboard.basic_auth(username + password_hash) as the only provider.hermes dashboard --host 0.0.0.0 --port 9119curl -sL http://localhost:9119/→Internal Server Error(500).