Skip to content

fix: exempt /dashboard-plugins/ from OAuth auth gate (#53066) - #53074

Open
Sahil-SS9 wants to merge 1 commit into
NousResearch:mainfrom
Sahil-SS9:fix/issue-53066-plugin-static-assets-401
Open

Sahil-SS9 wants to merge 1 commit into
NousResearch:mainfrom
Sahil-SS9:fix/issue-53066-plugin-static-assets-401

Conversation

@Sahil-SS9

Copy link
Copy Markdown
Contributor

Fixes #53066

Description

Plugin static assets (JS/CSS) are served at /dashboard-plugins/<name>/<path> and loaded by the SPA via <script src> and <link href> tags — neither of which can attach custom auth headers. The OAuth gated_auth_middleware was returning 401 for these requests because /dashboard-plugins/ was missing from _GATE_PUBLIC_PREFIXES.

The route handler (serve_plugin_asset) already has its own security: path traversal check via resolve().is_relative_to() and a browser-asset suffix allowlist (JS/CSS/JSON/HTML/SVG/PNG/JPG/WOFF/etc.). Adding the prefix to the public list simply lets the request reach the handler.

Verification

  • Added /dashboard-plugins/ to _GATE_PUBLIC_PREFIXES in hermes_cli/dashboard_auth/middleware.py
  • Compile-check passed
  • No secrets, personal refs, or unrelated changes

@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 sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data labels Jun 26, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.
Fix PR for #53066. Related: #24886 (open) also exempts the /dashboard-plugins/ asset route (paired with a write-denylist extension). This PR is the focused one-line public-prefix fix. Flagging the overlap so a maintainer can pick between the focused and broader change — not a duplicate.

@Sahil-SS9

Copy link
Copy Markdown
Contributor Author

Thanks @alt-glitch for the triage context. #24886 is closed and took a different approach (extending the write denylist). This PR is the focused fix for #53066 — gating the /dashboard-plugins/ asset route with a read allowlist.

This branch has not been deployed

No deployments
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) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] v0.17.0: Plugin static assets (index.js/style.css) return 401 behind OAuth gate — plugin did not call register()

3 participants