You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c55df65
Browse filesBrowse the repository at this point in the historyBrowse files
ws_tunnel_status_through_edge_proxy returned early, and so reported
success, whenever it could not set up its own preconditions. It could
not in any lane that starts its own gateway, so it never exercised the
WebSocket tunnel:
- It looked for the gateway URL on a `gateway info` line that mentions
"endpoint" or "gateway", but the URL is printed on the `Server:` line.
- It required a plaintext endpoint, but the CLI only tunnels over
https://, and those lanes register an mTLS gateway at an https://
endpoint.
Read the endpoint from the registered gateway metadata instead of
scraping `gateway info`. For a gateway with a registered CA, trust it by
pointing the CLI at it with SSL_CERT_FILE, since the tunnel client uses
the system trust store; otherwise use the system store. Fail, instead of
returning early, when the gateway is unhealthy or not https://, and
require the CLI's debug log to show the completed WebSocket handshake so
a status that bypassed the tunnel cannot pass.
The test needs a gateway with the WebSocket tunnel enabled, so move it
behind a new e2e-edge-tunnel feature that the docker and podman lanes
enable. The Kubernetes and VM lanes cannot exercise it and no longer
compile it.
Contributes to NVIDIA#3712
Signed-off-by: politerealism <[email protected]>
"Skipping ws_tunnel test: could not extract gateway endpoint from:\n{info_clean}"
179
-
);
180
-
return;
181
-
};
182
-
183
-
// For the WS tunnel test, we need the endpoint to be HTTP (plaintext).
184
-
// If it's HTTPS, the WS tunnel test requires TLS negotiation which
185
-
// complicates things. Skip if the gateway isn't plaintext.
186
-
if !endpoint.starts_with("http://"){
187
-
eprintln!(
188
-
"Skipping ws_tunnel test: gateway endpoint is not plaintext HTTP: {endpoint}\n\
189
-
Use a plaintext local gateway such as `mise run gateway:docker` for this test."
190
-
);
191
-
return;
192
-
}
255
+
// The CLI only routes through the tunnel for https:// gateways.
"ws_tunnel test needs an https:// gateway with the WebSocket tunnel enabled, got: {endpoint}\n\
259
+
A plaintext gateway, such as one reused through OPENSHELL_GATEWAY_ENDPOINT endpoint mode, \
260
+
cannot exercise the tunnel. Use a lane-started gateway."
261
+
);
262
+
263
+
// A gateway with a lane-local CA is not trusted by the system store, and
264
+
// the tunnel client uses the system store, so point it at that CA. With no
265
+
// registered CA, rely on the system store.
266
+
let tmpdir = tempfile::tempdir().expect("create temp config dir");
193
267
194
268
// Seed a temporary config directory with edge auth metadata pointing at
195
269
// the live gateway. The dummy token triggers the WS tunnel codepath
196
270
// without requiring real edge auth middleware.
197
-
let tmpdir = tempfile::tempdir().expect("create temp config dir");
0 commit comments