ExtensionInstallSources in Chrome Extensions for Enterprise Policy

We have a google chrome extension that you must use internally. There are domains there.

Based on the parameters of the enterprise, the easiest approach for us is to place it on some internal web server, and then add the address of this internal site as ExtensionInstallSources for PC users through group policies, but this does not work for me.

I tried changing the registry and local group policy by adding Google Chrome adm \ admx files.

Here is my registry change:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallSources] "1"="http://localhost/*" 

When I check chrome: // policy - it shows that it loaded these settings. But when I open http: //localhost/myextension.crx - Chrome still displays an error that the extension could not be installed there ...

I am using 47.0.2526.106 m (64-bit) under Windows 8.1 Enterprise (x64) What am I doing wrong here?

I have a more complicated option for downloading chrome source \ pdbs, and then try debugging it to see why it doesnโ€™t work, but it can take a lot of time, since Chrome can compile for several hours on Windows first build ... .

+5
source share
1 answer

Looks like this registry change was just missing. After debugging the chrome source, I found why it does not work for me. I missed:

  • The argument MUST be present and must also be included in the whitelist. Therefore, if I open the url for my extension via a direct link, then, since there is no referent, he will not install it. (Oh Chrome, at least you could say with a message about this ...). If I have a webpage that has a link to this extension, and it is also whitelisted, then it will work fine.

  • The second missing point was that the extension identifier MUST be present in ExtensionInstallWhitelist, otherwise Chrome will install it and disable it with a delay of 2-3 seconds. But if you specified it under ExtensionInstallWhitelist, then everything will be fine.

So my final registry change for localhost is:

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Policies \ Google \ Chrome]

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Policies \ Google \ Chrome \ ExtensionInstallSources] "1" = "HTTP: // local / *"

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Policies \ Google \ Chrome \ ExtensionInstallWhitelist] "1" = "fhojekmcngnmkdbcoegjdlojgfngkpak"

I found it after a long debugging in the ExtensionManagement class - https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/extensions/extension_management.cc&q=ExtensionManagement::IsOffstoreInstallAllowed&sq=package:chromium&type=cs = 148

+9
source

Source: https://habr.com/ru/post/1238854/


All Articles