Skip to content

fix(dashboard): skip auto-sso for password auth providers - #59491

Closed
Bohac-Petr wants to merge 1 commit into
NousResearch:mainfrom
Bohac-Petr:petr/fix-dashboard-basic-auth-autosso
Closed

fix(dashboard): skip auto-sso for password auth providers#59491
Bohac-Petr wants to merge 1 commit into
NousResearch:mainfrom
Bohac-Petr:petr/fix-dashboard-basic-auth-autosso

Conversation

@Bohac-Petr

Copy link
Copy Markdown

Summary

Dashboard auto-SSO currently auto-starts /auth/login whenever exactly one interactive session provider is registered. That works for OAuth-style providers but breaks password-only deployments using the basic dashboard auth provider: BasicAuthProvider.start_login() intentionally raises NotImplementedError because basic auth should render /login and submit to /auth/password-login.

This change filters password-capable providers out of the auto-SSO candidate list. With only basic auth configured, unauthenticated HTML navigations fall back to the login interstitial instead of attempting an OAuth redirect. OAuth-only single-provider deployments keep the existing auto-SSO behavior.

Verification

  • Added regression: TestAutoSsoRedirect::test_single_password_provider_renders_login_not_auto_sso
  • Observed the regression fail before the fix: /auth/login?provider=basic&next=%2Fsessions
  • PYTHONPATH="$PWD" /home/scoobydoo/.hermes/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_dashboard_auth_401_reauth.py::TestAutoSsoRedirect -q -o addopts= --tb=short
    • 6 passed
  • PYTHONPATH="$PWD" /home/scoobydoo/.hermes/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_dashboard_auth_401_reauth.py tests/plugins/dashboard_auth/test_basic_provider.py tests/hermes_cli/test_web_server.py -q -o addopts= --tb=short
    • 408 passed, 11 warnings
  • /home/scoobydoo/.hermes/hermes-agent/venv/bin/python -m py_compile hermes_cli/dashboard_auth/middleware.py tests/hermes_cli/test_dashboard_auth_401_reauth.py
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 6, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #54887 (earliest open canonical fix) — same code site (_auto_sso_response() in hermes_cli/dashboard_auth/middleware.py) and same mechanism (short-circuit auto-SSO for a sole password-only BasicAuthProvider so the request renders /login instead of 500ing on start_login() NotImplementedError). Open sibling dups in the same cluster: #58905, #57427, #54958. Regression source: merged #54846.

@Bohac-Petr Bohac-Petr closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/dashboard Web dashboard / control panel UI (dashboard/, landing) duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants