Managed Web browser activity #63
No reviewers
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
albert/shepherd-launcher!63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "u/albert/10/web-browser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #10
Running the gated real-Chrome test (after installing com.google.Chrome) falsified the design's policy-path assumption: the Flathub Chrome wrapper ignores the per-user config dir and reads managed policy only from the machine-wide, root-owned /etc/opt/chrome/policies/. Writing there would need root and hijack Chrome for every user on the box. Fix: inject our policy into the *sandbox's own* /etc (ephemeral, per-launch, per-user) instead of the host's. Launch Chrome through a shim: flatpak run --command=bash --env=SHEPHERD_POLICY=<file> com.google.Chrome \ -c 'ln -sf "$SHEPHERD_POLICY" /etc/opt/chrome/policies/managed/shepherd.json; exec /app/bin/chrome "$@"' bash <chrome flags> No root, host /etc untouched, policy scoped to that launch. Verified end to end against real Chrome (allow renders, block hits the enterprise interstitial, host /etc/opt/chrome stays absent, profile created + wiped) in 1.12s. - browser.rs: write_policy_file (now under config/shepherd-policies/), chrome_flatpak_argv (the shim), is_supported_browser_flatpak. Support is flatpak Chrome only; the process-kind generalization is dropped (non-flatpak Chromium has the same root-/etc problem and was never functional). - adapter.rs: browser block rebuilds the argv via chrome_flatpak_argv; other kinds warn + ignore. - tests: unit tests for the argv builder + gate; e2e now uses a stub flatpak to assert the full wiring with no real Chrome; gated test drives the real injection. Two real-Chrome gotchas handled in the test: a single-threaded marker server wedged on Chrome preconnect sockets (now thread-per-conn + read timeout), and DeveloperToolsAvailability=2 breaks --dump-dom because headless drives Chrome over DevTools (omitted in the headless probe only; correct for the real kiosk window). - README updated. cargo test --workspace / clippy / fmt all clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Chrome's URL-filter format needs allowlist entries to be scheme-qualified ("https://host/..."); a bare "host"/"host:port" isn't reliably matched and gets caught by the authoritative catch-all block (confirmed against real Chrome). Note this in config.example.toml and the shepherd-config README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.