fleet/ee/fleetd-chrome
Robbie 52a8a9650c
Add Tunnelmole as an open source tunnelling option in addition to ngrok (#15426)
Add docs for [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client) as a tunnelling option when testing ChromeOS enrollment locally.
2024-01-11 10:14:04 -05:00
..
src fleetd-chrome unit tests (#15918) 2024-01-04 21:41:24 -06:00
.gitignore ChromeOS support for Fleet dashboard (#11953) 2023-05-26 14:32:01 -04:00
jest.config.ts ChromeOS Tables: Integration test for 3 tables (#12844) 2023-08-02 11:31:22 -04:00
jest.setup.ts Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
jsdomwithfetch.ts Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
package-lock.json Bump semver from 5.7.1 to 5.7.2 in /ee/fleetd-chrome (#12724) 2023-11-01 14:00:14 -05:00
package.json ChromeOS support for Fleet dashboard (#11953) 2023-05-26 14:32:01 -04:00
README.md Add Tunnelmole as an open source tunnelling option in addition to ngrok (#15426) 2024-01-11 10:14:04 -05:00
server.go Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
tsconfig.json Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
updates.xml Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
webpack.common.js ChromeOS support for Fleet dashboard (#11953) 2023-05-26 14:32:01 -04:00
webpack.dev.js Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00
webpack.prod.js Fleetd for Chrome (#10281) 2023-03-16 09:01:10 -03:00

Fleetd Chrome Extension

Packaging the extension

Generate a .pem file to be the key for the chrome extension.

(In parent dir) Run the following command to generate an extension.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=./fleetd-chrome --pack-extension-key=path/to/chrome.pem

Adding Chrome to Fleet

To learn how to package and add hosts to Fleet, visit: https://fleetdm.com/docs/using-fleet/enroll-hosts#enroll-chromebooks.

Debugging

Service worker

View service worker logs in chrome://serviceworker-internals/?devtools (in production), or in chrome://extensions (only during development).

Manual Enroll

Steps 1 and 2 can be performed on your workstation. Step 3 and 4 are to be executed on the target Chromebook.

  1. Create your .env file:

IMPORTANT: The address in FLEET_URL must have a valid TLS certificate.

echo 'FLEET_URL="https://your-fleet-server.example.com"' >> .env
echo 'FLEET_ENROLL_SECRET="<your enroll secret>"' >> .env

To test with your local Fleet server, you can use Tunnelmole or ngrok.

Tunnelmole:

tmole 8080

ngrok:

ngrok http https://localhost:8080
  1. Build the "unpacked extension":
npm install && npm run build

The above command will generate an unpacked extension in ./dist.

  1. Send the ./dist folder to the target Chromebook.

  2. In the target Chromebook, go to chrome://settings, toggle Developer mode and click on Load unpacked and select the dist folder.