Commit 51fd470
authored
fix: remove flags blocking enterprise extension loading (#133)
## Summary
- Removes `--disable-background-networking` from the default
`CHROMIUM_FLAGS` in the headless wrapper
- **Removes `--disable-extensions-except` flag usage** - this flag was
preventing Chrome from creating external providers (including the policy
loader), blocking enterprise extension installation
- Chrome's `ExtensionInstallForcelist` enterprise policy requires
background networking to fetch `update.xml` and `.crx` files from the
extension server
## Root Cause
Two issues were preventing enterprise extensions from loading:
1. `--disable-background-networking` prevented Chrome from making HTTP
requests to fetch extensions
2. `--disable-extensions-except` caused Chrome to set
`extensions_enabled_` to `false`, which prevents external providers
(including the policy loader) from being created in
`extension_service.cc`
## Changes
### Flag Changes
- Remove `--disable-background-networking` from headless wrapper
defaults
- Remove `--disable-extensions-except` from:
- `wrapper.sh` proxy extension setup
- `chromium.go` API flag generation
- `chromiumflags.go` MergeExtensionPath function
- Keep `--load-extension` for loading extensions via command line
### Test Changes
- Add `TestEnterpriseExtensionInstallation` e2e test
- Test uploads a kernel-like extension first (mirrors production
behavior)
- Then uploads enterprise extension and verifies it loads via policy
## Test plan
- [x] Add new e2e test `TestEnterpriseExtensionInstallation`
- [x] Test verifies Chrome fetches update.xml and .crx
- [x] Test verifies extension appears in chrome://extensions
- [ ] Run existing e2e tests to ensure no regressions
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Allows enterprise policy (`ExtensionInstallForcelist`) extensions to
install correctly.
>
> - Removes `--disable-background-networking` from headless `wrapper.sh`
defaults
> - Eliminates use/emission of `--disable-extensions-except`;
`chromiumflags.MergeFlags` now folds its paths into `--load-extension`
and never re-emits it; adds `MergeExtensionPath`
> - `server/cmd/api/api/chromium.go` no longer writes
`--disable-extensions-except` when building flags; only uses
`--load-extension` for non-policy extensions with clear inline rationale
> - Adds e2e `TestEnterpriseExtensionInstallation` (headless/headful)
plus minimal enterprise test extension assets and pack script; verifies
policy config, update.xml/.crx fetch, logs, and presence in
`chrome://extensions`
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1472fd8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 12b2f28 commit 51fd470
File tree
11 files changed
+799
-50
lines changed- images/chromium-headless/image
- server
- cmd/api/api
- e2e
- test-extension-enterprise
- lib/chromiumflags
11 files changed
+799
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
263 | 268 | | |
264 | 269 | | |
265 | 270 | | |
266 | | - | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
0 commit comments