lablup / lablup/backend.ai-webui

feat(WebUI Smoke CLI): bundle Chromium and add air-gap + insecure-tls support

Open
#7,385 0 comments 0 reactions 0 assignees View on GitHub
phase-2
Dominant language
TypeScript
Stars
133
Forks
81
Avg merge
1d 11h
Merged PRs (30d)
344

Description

## Parent

- Epic: [FR-2871](https://lablup.atlassian.net/browse/FR-2871)
- Spec Task: [FR-2872](https://lablup.atlassian.net/browse/FR-2872)
- Spec: `.specs/FR-2871-webui-smoke-cli/spec.md` § FR-G

## Goal

Make the CLI operable on hosts with no outbound internet: ship Chromium inside the release artifact, point Playwright at the bundled path, allow-list only the customer endpoint at runtime, and add a `--insecure-tls` flag for self-signed certificates.

## Acceptance criteria

- [ ] Build artifact ships a `browsers/` directory with the platform-matched Playwright Chromium.
- [ ] At runtime, the CLI sets `PLAYWRIGHT_BROWSERS_PATH` to that bundled path before launching Playwright.
- [ ] `--insecure-tls` flag (default `false`) maps to Playwright `ignoreHTTPSErrors: true`.
- [ ] All external-origin requests (CDNs, Google Fonts) are blocked via `context.route('**/*', …)` allow-list during spec execution.
- [ ] No `npx playwright install` is invoked at runtime.
- [ ] On a host with outbound traffic blocked (verified via firewall rules), the CLI completes a smoke run successfully against an in-network endpoint.

## In scope

- `packages/backend.ai-webui-smoke-cli/scripts/bundle-browsers.{sh,ts`}
- `packages/backend.ai-webui-smoke-cli/src/runtime/browsers.ts`
- `packages/backend.ai-webui-smoke-cli/src/runtime/network-allowlist.ts`
- `playwright.smoke.config.ts` adjustments for `ignoreHTTPSErrors`

## Out of scope

- Binary packaging (FR-H consumes the bundled `browsers/`)
- Operator README (FR-I)

## Test plan

- On a host with outbound firewall blocking everything except the endpoint, the smoke run completes; trying to reach `fonts.googleapis.com` from a test page fails fast.
- Smoke run against an endpoint with a self-signed cert succeeds with `--insecure-tls` and fails without it.

JIRA Issue: FR-2881

[FR-2871]: https://lablup.atlassian.net/browse/FR-2871?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[FR-2872]: https://lablup.atlassian.net/browse/FR-2872?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.