Zack McCauley - WardsParadox

Hi, I’m a macadmin for a school district in Montana. Never stop learning.

uBlock Origin Admin Settings Deployment


As our district has made the decision to push out uBlock, we had to include a whitelist. The documentation on uBlock's github wiki was not clear enough for me on how to deploy settings. On the macOS side of things, pushing out the configuration profile was easy enough, but the ChromeOS configuration was a bit trickier.

Our configuration for our macs is:

        <string>uBlock settings</string>

Per the documentation: Now, the value for adminSettings must itself be a plain string, and this means we need to encode the above text into a string, using JSON.stringify. Here is a small utility to help you deal with this step:

We need to set the admin settings to a string value. For some reason this just really didn't sit with my brain when converting back to a JSON value for the Chrome config. I could see that there was a key caled adminSettings and that it needed a value that was a stringifyied dictionary of the settings. What I didn't realize is that for the ChromeOS json file is that it needed a key called Value and that it's value was the stringified dictionary.

Here is our ChromeOS configuration. Hopefully this helps.

    "adminSettings": {
        "Value": "{\"selectedFilterLists\":[\"plowe-0\",\"malware-1\",\"malware-0\",\"easyprivacy\",\"easylist\",\"ublock-unbreak\",\"ublock-abuse\",\"ublock-privacy\",\"ublock-badware\",\"ublock-filters\",\"user-filters\"],\"netWhitelist\":\"about-scheme\\nchrome-extension-scheme\\nchrome-scheme\\\\\\\\\\nmoz-extension-scheme\\nopera-scheme\\\\nvivaldi-scheme\\\\\\\\nwyciwyg-scheme\\\"}"

To update and modify the values, I'd recommend using the adminSetting tool to un-stringify the JSON, make the change to the section you need, then re-stringify the edits.