uBlock Origin Trusted

jpappr
New Contributor II

Hello there, I'm trying to add custom trusted sites to uBlock on Chrome and JAMF is throwing an error saying the PLIST format is incorrect.  I'm wondering if any of you have a template for whitelisting domains in uBlock that you'd be able to share.  Below is what I'm trying to use that is not working.

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>trustedSiteDirectives</key>
    <string>"trustedSiteDirectives":{"microsoft.com", "adobe.com", "office.com"}</string>
  </dict>
</plist>

Thank you in advance
6 REPLIES 6

jpappr
New Contributor II

Here are screenshots of my JAMF Pro cloud configuration.  

 

jpappr_0-1690205405607.png

 

jpappr_1-1690205416646.png

 

Bol
Valued Contributor

@jpappr You can setup uBlock then export to a settings file. Paste the json contents into the url below, then hit the first arrows down;
http://raymondhill.net/ublock/adminSetting.html

Copy the output of json plain string value to use under the adminSettings key below;
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin

Preference Domain:
com.google.Chrome.extensions.cjpalhdlnbpafiamejdnhcphjbkeiagm

PLIST:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>adminSettings</key>

<string>                            </string>
</dict>
</plist>

Here's my template where you can edit the entry's using double quotes around your whitelist item, separated by a comma.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>adminSettings</key>

<string>{"userSettings":{"importedLists":[],"popupPanelSections":15},"selectedFilterLists":["ublock-quick-fixes","user-filters","assets.json","public_suffix_list.dat","ublock-badlists","ublock-filters","ublock-badware","ublock-privacy","ublock-abuse","ublock-unbreak","easylist","easyprivacy","urlhaus-1","plowe-0"],"hiddenSettings":{},"whitelist":["about-scheme","chrome-extension-scheme","chrome-scheme","edge-scheme","login.microsoftonline.com","moz-extension-scheme","office.com","opera-scheme","sharepoint.com","vivaldi-scheme","wyciwyg-scheme"],"dynamicFilteringString":"behind-the-scene * * noop\nbehind-the-scene * inline-script noop\nbehind-the-scene * 1p-script noop\nbehind-the-scene * 3p-script noop\nbehind-the-scene * 3p-frame noop\nbehind-the-scene * image noop\nbehind-the-scene * 3p noop","urlFilteringString":"","hostnameSwitchesString":"no-large-media: behind-the-scene false","userFilters":""}</string>
</dict>
</plist>

 

Bol_0-1690388430078.png

 

 

jpappr
New Contributor II

I appreciate the response.  My fix was creating a Configuration Profile as follows.

jamfublock1.pngjamfublock2.png

jpappr
New Contributor II

Here's the content should anybody need it.  To add another domain, just add another line with <string>domain.com</string>.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> 
<dict>
<key>toAdd</key>
<dict>
<key>trustedSiteDirectives</key>
<array>
<string>bing.com</string>
<string>drive.google.com</string>
</array>
</dict>
</dict>
</plist>

JuanMC
New Contributor

I have tried applying this config to Edge (changing the domain to com.Microsoft.Edge.extensions.odfafepnkmbhccpbejgmiehpchacaeak) but it doesnt seems to work. Any ideas?

Bol
Valued Contributor

Thanks, seems much easier to maintain in the long run, just the initial setup that will take a few minutes. I will test and see, kudos to you!