Conversation
Contributor
|
23 tasks
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
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.
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 OAuthgated_auth_middlewarewas 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 viaresolve().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
/dashboard-plugins/to_GATE_PUBLIC_PREFIXESinhermes_cli/dashboard_auth/middleware.py