Repository navigation
fix(juice-shop): proxy websocket upgrades through f5 nginx ingress - #111
Merged
Merged
Conversation
The testground moved to the F5 NGINX Ingress Controller (f3898ed). Unlike ingress-nginx it forwards WebSocket upgrades only for services listed in nginx.org/websocket-services. Juice Shop's socket.io upgrade request reached the app without the Upgrade headers and got `400 {"code":3,"message":"Bad request"}`, so socket.io stayed on long-polling. The page never went idle, every browser step of a scan waited for its full timeout, and Juice Shop e2e scans took 15-18 min instead of ~3. List the release service in the simple-service ingress (0.5.1) and rebuild juice-shop on it (0.0.10). juice-shop was still on simple-service 0.4.0; 0.5.0 only adds an optional `global.repeaters` list and keeps the `repeaterIDs` path.
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.
Why
The testground moved to the F5 NGINX Ingress Controller (see f3898ed, "migrate Ingress annotations to F5 NGINX Ingress Controller"). Unlike ingress-nginx, it forwards WebSocket upgrades only for the services listed in
nginx.org/websocket-services. No chart sets that annotation.Probe of a live Juice Shop e2e instance (
w27535-35368-1, engine-e2e run 45364627535):The 400 comes from socket.io in the app (note
Access-Control-Allow-Originfrom Juice Shop): the request arrived without theUpgradeheaders. socket.io then stays on long-polling, so the page never goes idle. In the engine logs of scan4op3zQ69syicCd88GyaLki(C35368) every browser step ends withwith_watch: timeout received, and the browser timeout grows with the slow login (85 s -> 140 s). As a result, Juice Shop e2e scans take 15-18 min instead of ~3 (C35355, C35368; also C35346, C35375, C35605 since 11-17).What
simple-service0.5.1: list the release service innginx.org/websocket-services. The Service name is{{ .Release.Name }}, same as the ingress backend.juiceshop0.0.10: build onsimple-service0.5.1. It was still on 0.4.0. 0.5.0 only adds an optionalglobal.repeaterslist and keeps therepeaterIDspath as before.The other charts built on
simple-serviceget the annotation the next time they are bumped. The annotation does nothing for apps that never send an upgrade.Alternatives considered
simple-service.Follow-up
After release, rerun C35355 and C35368 on devauto. They should drop back to their 3±3 expectation.