Skip to main content

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

Here are screenshots of my JAMF Pro cloud configuration.  

 

 

 


@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>

 

 

 


@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>

 

 

 


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


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>

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!


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>

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?


Reply