Skip to content

Commit 0dc9970

Browse files
authored
test(ui): cover Control UI auth transports (#118866)
* test(ui): cover control ui auth transports * test(qa): register control ui auth transport scenarios * test(ui): allow loaded control ui startup * test(ui): allow loaded screenshot capture * test(ui): scrub loopback proof URLs * test(ui): keep transport proof assertion-focused * test(ui): capture auth transport proof directly * test(ui): gate auth transport proof media * test(ui): scope auth transport evidence * test(ui): fix auth transport frame typing * test(ui): stabilize auth transport QA * test(ui): separate auth UI navigation readiness
1 parent 778be6f commit 0dc9970

3 files changed

Lines changed: 756 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
title: Control UI allowed origins and explicit gateway URL
2+
3+
scenario:
4+
id: control-ui-allowed-origins-gatewayurl
5+
surface: control-ui
6+
category: control-ui.browser-access-and-trust
7+
coverage:
8+
primary:
9+
- control-ui.allowed-origins-gatewayurl
10+
objective: >-
11+
Prove real Chromium explicitly confirms a gatewayUrl, connects from the
12+
configured browser origin, and receives deterministic visible recovery when
13+
the real Gateway rejects an unlisted origin.
14+
successCriteria:
15+
- The Control UI visibly presents and confirms the explicit gatewayUrl before connecting.
16+
- A browser served from the configured allowed origin reaches the connected shell through the real proxy and Gateway.
17+
- A browser served from a distinct unlisted origin is rejected by Gateway origin enforcement and renders origin-specific recovery without mounting the shell.
18+
- Captured browser Origin headers and Gateway responses or handshake status distinguish UI behavior from server-side enforcement.
19+
- The run always writes redacted transport and process-cleanup evidence; when OPENCLAW_CAPTURE_UI_PROOF=1, it also writes screenshots and video under the configured artifact directory.
20+
docsRefs:
21+
- docs/web/control-ui.md
22+
- docs/web/urls.md
23+
- docs/gateway/trusted-proxy-auth.md
24+
codeRefs:
25+
- ui/src/e2e/control-ui-auth-transports.e2e.test.ts
26+
- ui/src/components/gateway-url-confirmation.ts
27+
- ui/src/components/login-gate.ts
28+
- src/gateway/origin-check.ts
29+
- src/gateway/server/ws-connection/connect-admission.ts
30+
execution:
31+
kind: playwright
32+
path: ui/src/e2e/control-ui-auth-transports.e2e.test.ts
33+
testNamePattern: confirms gatewayUrl, accepts the allowed origin, and rejects an unlisted origin
34+
summary: >-
35+
Real Chromium and Gateway proof for explicit target confirmation,
36+
allowed-origin success, and deterministic rejected-origin recovery.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
title: Control UI trusted-proxy authentication
2+
3+
scenario:
4+
id: control-ui-trusted-proxy-auth
5+
surface: control-ui
6+
category: control-ui.browser-access-and-trust
7+
coverage:
8+
primary:
9+
- control-ui.trusted-proxy-auth
10+
objective: >-
11+
Prove real Chromium connects through a task-owned reverse proxy whose
12+
trusted path supplies the configured identity, while the same proxy's
13+
untrusted path is rejected by the real Gateway with visible recovery.
14+
successCriteria:
15+
- A task-owned real Gateway runs with temporary home, state, and trusted-proxy configuration.
16+
- Real Chromium reaches the connected Control UI shell through the proxy path that injects the configured identity and required header.
17+
- The proxy path that omits proxy-owned auth headers receives a Gateway unauthorized rejection with the exact required-header reason captured from the protocol frame.
18+
- Captured browser connect frames and Gateway responses distinguish UI behavior from server-side enforcement.
19+
- The run always writes redacted transport and process-cleanup evidence; when OPENCLAW_CAPTURE_UI_PROOF=1, it also writes screenshots and video under the configured artifact directory.
20+
docsRefs:
21+
- docs/gateway/trusted-proxy-auth.md
22+
- docs/web/control-ui.md
23+
codeRefs:
24+
- ui/src/e2e/control-ui-auth-transports.e2e.test.ts
25+
- src/gateway/auth.ts
26+
- src/gateway/server/ws-connection/connect-admission.ts
27+
execution:
28+
kind: playwright
29+
path: ui/src/e2e/control-ui-auth-transports.e2e.test.ts
30+
testNamePattern: connects through the trusted path and rejects the untrusted proxy path
31+
summary: >-
32+
Real Chromium, reverse-proxy, and Gateway proof for successful
33+
trusted-proxy identity admission and required-header rejection.

0 commit comments

Comments
 (0)