4

I'm trying to install a private Chrome extension on OS X by modifying Chrome policies. I was able to do this successfully on Windows by editing the relevant HKEY_LOCAL_MACHINE registry, but on OS X I'm having problems.

Using the following commands, the policies show up in chrome://policy but have a "recommended" level instead of "mandatory" on Windows.

defaults write com.google.Chrome ExtensionInstallSources -array "http://install-url.com/*"
defaults write com.google.Chrome ExtensionInstallWhitelist -array "chrome-extension-id"

Whenever I attempt to install the extension, Chrome instead just downloads the file and presents a message that Apps, Scripts, and Extensions cannot be installed from this Website.

Any help would be greatly appreciated!

Tyler
  • 889
  • 1
  • 11
  • 17

2 Answers2

4

This is an old post, but it came up in a google search and there wasn't an answer here.

The answer to this question after some troubleshooting is as follows:

The file that contains policies that are Recommended is

~/Library/Preferences/com.google.Chrome.plist 

The commands you posted would modify this file if run in the user context

In order to have Mandatory you need to have your Mac managed, by say JAMF or Munki. Once your Mac is managed you can use plists in

/Library/Managed Preferences/

&

/Library/Managed Preferences/$user

Effectively this moves com.google.Chrome.plist from the user context to the machine context. HKCU vs HKLM

The documentation here talks about this more under Debugging https://www.chromium.org/administrators/mac-quick-start

vgrsec
  • 41
  • 2
  • It would appear you would have to deploy a system profile with a payload to override Chrome policies locally with the Mandatory status. You don't need to have any configured management software, but be able to generate a .mobileconfig file with the payload and then use /usr/bin/profiles -I -F /path/to/Google Chrome.mobileconfig – James White Nov 30 '20 at 18:17
  • @vgrsec I am trying to force install an extension in Chrome. I edited the property list at /Library/Managed Preferences/username/com.google.Chrome.plist. I added a dictionary under Root –> ExtensionSettings. Unfortunately, I don't see this at chrome://policy. Why not? – Brian Schack Aug 08 '23 at 00:50
0

For Mac, the policies for the extension are given in Configuring Apps and Extensions by Policy.

As stated:

The policies for the extension can be configured via MCX preferences for the com.google.Chrome.extensions.gihmafigllmhbppdfjnfecimiohcljba bundle, or for the org.chromium.Chromium.extensions.gihmafigllmhbppdfjnfecimiohcljba bundle if using Chromium.

The complete configuration procedure can be found in the given documentation.

Teyam
  • 7,686
  • 3
  • 15
  • 22
  • 1
    That's not really relevant. This explains how to configure managed storage for extensions, but not how to configure the global browser policy (which is needed here). – Xan Jul 06 '16 at 13:54