Skip to content

fix(dashboard): prevent auto-SSO redirect for basic auth provider - #58905

Closed
frannnnk wants to merge 1 commit into
NousResearch:mainfrom
frannnnk:fix/basic-auth-auto-redirect
Closed

fix(dashboard): prevent auto-SSO redirect for basic auth provider#58905
frannnnk wants to merge 1 commit into
NousResearch:mainfrom
frannnnk:fix/basic-auth-auto-redirect

Conversation

@frannnnk

@frannnnk frannnnk commented Jul 5, 2026

Copy link
Copy Markdown

When only the Basic Auth (password) provider is registered, the middleware incorrectly attempts to auto-initiate an OAuth redirect flow, leading to a NotImplementedError. This patch skips the auto-SSO logic if the single registered provider is 'basic'.

@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 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #54887 (earliest open canonical fix) -- same supports_password / skip-auto-SSO-for-password-only guard in hermes_cli/dashboard_auth/middleware.py fixing the NotImplementedError 500 when the sole registered provider is basic. Sibling PRs #57427/#56627 and issues #55130/#58237/#57220/#57868 are the same cluster; #55130 is the earliest open issue anchor.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused dashboard-auth fix. This is an automated hermes-sweeper review; the requested behavior is already implemented on current main.

  • Commit 3e24b16f566045399012bc1185fe0cdb6e1a1be9 added the capability-based guard at hermes_cli/dashboard_auth/middleware.py:212: a sole provider with supports_password=True falls through to /login rather than auto-starting OAuth.
  • The same change hardens direct requests at hermes_cli/dashboard_auth/routes.py:195, redirecting password providers to /login before start_login() could raise.
  • Current regression coverage at tests/hermes_cli/test_dashboard_auth_password_login.py:201 verifies the password-provider redirect and form rendering.

The existing implementation is broader than this PR's provider.name == "basic" check because it covers all password-capable providers.

@teknium1 teknium1 closed this Jul 15, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 15, 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 sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants