55 lines
2.8 KiB
Markdown
55 lines
2.8 KiB
Markdown
# Isolated local browser integration — no VM execution
|
|
|
|
`run_pending.py` uses existing test bootstrap helpers to enroll a real mTLS device
|
|
fixture on the local dev backend, never a forged database agent identity. It sends
|
|
a ClientHello advertising `run_script` only to exercise plan validation; it does
|
|
not implement an executor, ask for a permit, authorize or report an execution.
|
|
The browser sends a durable pending request via the actual UI. The fixture is
|
|
revoked afterwards; its pending request and enrollment history are retained.
|
|
An artifact-count guard checks that jobs/outbox/grants did not increase.
|
|
|
|
Requirements: initialized/running dev Docker backend on loopback 18443, built UI
|
|
served from `web/dist`, public CA `devstate/pki/ca.pem`, private existing browser
|
|
login `devstate/browser-login.json` (owned, mode 0600). Credential values are never
|
|
CLI arguments, printed or copied into source. No VM credentials are used.
|
|
|
|
Project-local tools (commands for reproducing setup; actual execution occurred in
|
|
the implementation session):
|
|
|
|
```sh
|
|
cd web
|
|
npm ci --ignore-scripts
|
|
PLAYWRIGHT_BROWSERS_PATH="$PWD/node_modules/.cache/playwright-browsers" npx playwright install chromium
|
|
mkdir -p node_modules/.cache/nss-tools
|
|
cd node_modules/.cache/nss-tools
|
|
apt-get download libnss3-tools
|
|
dpkg-deb -x libnss3-tools*.deb root
|
|
```
|
|
|
|
No package installed globally. The runner uses installed `certutil` if available,
|
|
otherwise the locally extracted binary. It imports the **public** CA into isolated
|
|
`web/node_modules/.cache/browser-home/.pki/nssdb`, with browser HOME restricted to
|
|
that directory. Existing global browser/user trust and hosts files are untouched.
|
|
DNS overrides map only fixed test names to 127.0.0.1; TLS/SNI still verifies the
|
|
original DNS name. No certificate bypass flag or ignoreHTTPS option exists.
|
|
|
|
From repository root:
|
|
|
|
```sh
|
|
python3 deploy/browser/run_pending.py
|
|
```
|
|
|
|
Real Playwright tests verify normal trusted HTTPS plus rejection of wrong DNS name
|
|
and an untrusted CA. The positive UI case only plans/submits and never clicks
|
|
approval. CSRF is tested by deleting the token from an actual logout UI request;
|
|
403 and continued session visibility are required, followed by valid logout.
|
|
No direct API/DB approval path is used. Reporter suppresses raw errors, action logs,
|
|
stdout/stderr; traces/screenshots/video are off. Failure artifacts remain private
|
|
and must not be published. Sanitized evidence records booleans/statuses only, no
|
|
hostnames/keys/passwords. Bounded retries are not automatic: a failing run fails;
|
|
a separate rerun must reauthenticate and creates a new explicit pending plan.
|
|
|
|
`RMM_E2E_MODE=execute` is an additional separate opt-in for the prepared positive
|
|
approval/result test, to use only after a real authorized agent path is ready.
|
|
This pending-only run is neither native VM evidence nor positive approval proof.
|