Skip to content

fix(juice-shop): proxy websocket upgrades through f5 nginx ingress - #111

Merged
mykhailo-bright merged 1 commit into
mainfrom
fix/simple-service-websocket
Nov 24, 2026
Merged

mykhailo-bright merged 1 commit into
mainfrom
fix/simple-service-websocket

Conversation

@mykhailo-bright

Copy link
Copy Markdown
Contributor

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):

GET /socket.io/?EIO=4&transport=polling       -> 200 {"sid":"...","upgrades":["websocket"],...}
GET /socket.io/?EIO=4&transport=websocket
    Connection: Upgrade, Upgrade: websocket   -> 400 {"code":3,"message":"Bad request"}

The 400 comes from socket.io in the app (note Access-Control-Allow-Origin from Juice Shop): the request arrived without the Upgrade headers. socket.io then stays on long-polling, so the page never goes idle. In the engine logs of scan 4op3zQ69syicCd88GyaLki (C35368) every browser step ends with with_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-service 0.5.1: list the release service in nginx.org/websocket-services. The Service name is {{ .Release.Name }}, same as the ingress backend.
  • juiceshop 0.0.10: build on simple-service 0.5.1. It was still on 0.4.0. 0.5.0 only adds an optional global.repeaters list and keeps the repeaterIDs path as before.

The other charts built on simple-service get the annotation the next time they are bumped. The annotation does nothing for apps that never send an upgrade.

Alternatives considered

  • Raise the Juice Shop scan-time expectations: rejected, it would hide a browser stall that also affects real socket.io apps behind this ingress.
  • Set the annotation only in the juice-shop chart: not possible, the Ingress is rendered by simple-service.

Follow-up

After release, rerun C35355 and C35368 on devauto. They should drop back to their 3±3 expectation.

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.
@mykhailo-bright
mykhailo-bright merged commit 25d43df into main Nov 24, 2026
3 checks passed
@mykhailo-bright
mykhailo-bright deleted the fix/simple-service-websocket branch November 24, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant