fix: harden /ws_debug exposure (origin allowlist + gate route on enableDebugger)#602
Merged
Merged
Conversation
… enableDebugger) Companion to windmill-labs/windmill#9829. The chart already defaults requireSignedDebugRequests=true, but the debugger WebSocket was still reachable unauthenticated via the program-mode launch bypass (fixed in the OSS PR) and the handshake had no Origin check. - Add windmillExtra.debugAllowedOrigins -> DEBUG_ALLOWED_ORIGINS env (opt-in cross-origin/CSWSH allowlist; only emitted when set). - Gate the /ws_debug/ ingress and httproute paths on enableDebugger so the route is not published when the debugger is disabled. Default (enableDebugger=true) behavior is unchanged. - Strengthen the requireSignedDebugRequests doc to warn against disabling it on internet-reachable deployments. - Bump chart version 4.0.174 -> 4.0.175 and regenerate README values. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Companion to windmill-labs/windmill#9829 (the OSS fix for the unauthenticated DAP debugger).
The chart already defaults
requireSignedDebugRequests: true, so the reported exposure on Windmill-hosted subdomains was not a missing-signing misconfig — it worked despite signing being on, via the program-mode launch bypass fixed in the OSS PR (aprogram: <path>launch skipped JWT verification entirely and read+executed an arbitrary server-side file). The debugger WS handshake also performed no Origin check (CSWSH).This PR adds the chart-side hardening that pairs with the OSS change.
Changes
debugAllowedOriginsvalue →DEBUG_ALLOWED_ORIGINSenv on thewindmill-extracontainer. Opt-in cross-origin (CSWSH) allowlist; the env var is only emitted when the value is non-empty, so default behavior is unchanged./ws_debug/ingress and httproute paths onenableDebugger. Previously the route was published to the gateway wheneverextraReplicas > 0, even with the debugger disabled (where it could only 502). Now the path is only routed when the debugger is actually running — strictly less attack surface, no functional change for the default (enableDebugger: true).requireSignedDebugRequestsdoc comment to warn against disabling it on internet-reachable deployments.version4.0.174 → 4.0.175; regenerate README values block + table.The debugger remains enabled by default —
enableDebugger: trueis unchanged. This PR only stops publishing the/ws_debug/route when the debugger is off.Test plan
helm lint charts/windmillpasses.extraReplicas=1):/ws_debug/route present (debugger on, unchanged).enableDebugger=false:/ws_debug/route absent in both ingress and httproute.DEBUG_ALLOWED_ORIGINSenv absent whendebugAllowedOriginsunset; present with the configured value when set.debugAllowedOrigins(left empty = signed-token verification only, per OSS default).