Can we deploy a Chrome extension through local http server through GPO settings? - google-chrome-extension

I have a Windows system that is a part of a domain. I've imported the domain GPO chrome .admx file and then created the Chrome GPO policy for 'ExtensionInstallForceList' property by using http://dev.chromium.org/administrators/policy-list-3#ExtensionInstallForcelist as the reference.
Here I've specified the ID for the extension that gets generated when it was loaded in unpacked format. Also, I used the local HTTP server as the place to download. A pseudo value of the property that I used:
eelojgpfkmaaabbbccneneemcahoehjo;http://<some.ip.address>/crx
See attached snapshot for reference:
I've created an IIS server and enabled Directory browsing and then chose the root path of the server to point to the parent folder of 'crx'. I am able to access an xml file present inside crx using this above URL.
However my extension is still not installed. But I also have the extension in the Chrome Webstore and if I use the Webstore URL, the extension is deployed successfully.
As per comments from Xan below and further trials that I performed, I'll add the snapshots for each of the following:
1.
2. Tried FQDN instead of IP address but still couldn't install
3. Changed the GPO to point to the folder that contains the crx file instead of the update URL. Still not installed
4. I had already packed the extension using the link you mentioned. I dragged-n-dropped this packed crx file and found out the new ID. I then used this ID in my updates.xml file as well as in my Chrome GPO policies. However, extension is still not installed on the domain endpoint.
Can someone please help me point out exactly what is missing?
Is there some issue in the way I configured my IIS server? or
Could it be because I used an IP address instead of an FQDN? or
Is it because of some other possible configuration error?

You don't specify this well in your question, but I spot a few problems/omissions:
CRXs and IDs
Here I've specified the ID for the extension that gets generated when it was loaded in unpacked format.
This will not work; that ID is just a temporary one based on the hash of the path to the extension.
Chrome needs to generate a keypair and sign the CRX for it to be useable in enterprise deployment.
You need to package it as CRX through chrome://extensions's Developer Mode.
It will generate a private key .pem that you need to save for any future updates (otherwise the ID will change again and you won't be able to use it as an update).
Then, install the CRX on the same machine by dragging it onto chrome://extensions to get its final, signed ID.
As an alternative to this step, you can use OpenSSL to generate the key from the .pem obtained from the previous steps.
What are you actually hosting?
The URL that you point to in the GPO policy is the Update URL, not the actual CRX file!
See this documentation on Update manifests. Here's an example:
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='eelojgpfkmaaabbbccneneemcahoehjo'>
<updatecheck codebase='http://<some.ip.address>/actual_extension.crx' version='1.0' />
</app>
</gupdate>
Modify the updatecheck.version as needed when updating. Don't touch any of the gupdate properties.
How are you serving files?
There may be a minor issue with content-types your server is sending.
I could not find bulletproof information on what should be the content type for the files, but a good guess is:
application/xml for the update manifest
application/octet-stream for the CRX file
Still not working?
Perhaps you're on to something with IP vs FDQN. It should be possible for you to create a local DNS entry for the update server - try and see if it helps.

Here's an Alternative Extension Distribution Options documentation for the possible ways on how to distribute Chrome extensions.
All Chrome extensions must be distributed either directly from the Chrome Web Store, using inline installation, or using the mechanisms described below. Failure to comply with one of these distribution methods constitutes a violation of the Chrome extension policy and may result in the extension and/or the software distributing it to be flagged as unwanted software.
You may also check this support page if you want to force install Chrome extensions on corporate-managed Windows devices via machine and OS-user policies.

Related

Is there a way to copy an extension from a browser to another?

Is there a way to copy an extension from a browser to another browser (both chromium based)?
In windows 10 I know the browser reads its data from this folder:
C:\Users<account_name\AppData\Local<browser>\User Data\Default
in Default there are several folders, among many:
"Extensions" and "Local Extension Settings"
which have as many folders inside as there are extensions installed and each of these folders has the extension id as its name.
So I tried copying Extensions\<id_ext> and "Local Extension Settings"\<id_ext> to their respective folders of another browser, but that wasn't enough.
Do I forget something (some other folder and\or registry key) or i's not possible to do this operation (without breaking the browser of course)?
EDIT
my goal is to have an old version of an extension fully installed in the browser (make the browser believe that it comes from the CWS) but in which I have disabled future updates (by modifying the update_url field in the manifest.json file with a fictitious address)
EDIT # 2
I will try to add two lines to better explain my purposes.
I've read something on SO and beyond, but nothing that can enlighten me about it.
My aim is to install an old version of an extension created by me
(I have the extension public key but I no longer have the private key), to block the update for a certain time and then update when I want by resetting the update_url field in the manifest.
Thanks

PhpStorm browser button custom url

Is it possible to change the url that the browser buttons in PhpStorm to go to a different url?
Currently these all take me to localhost:63342/[project name]/
I would like to direct these to a different address, [projectname].serveraddress:1111/ for example.
Currently my workaround is to use a PHP Web Page configuration but this required me to pick a browser at configuration level rather than being able to pick and choose.
I have a server config setup to automatically upload the files on change already.
Sure, just set up the Deployment entry and mark it as Default for this project.
When you are using "Open in Browser" or similar functionality, IDE looks for your default deployment entry and builds the URL based on those rules (web server URL + mappings).
If no default deployment entry is found then IDE builds URL for the built-in simple web server that uses localhost:63342/[project name]/path/file.ext URLs.
P.S. If it's a local server (files served directly from the original location) and no actual deployment is needed then use "In-place" type of config.

Kentico v7 - Disable 'GetAzureFile' Permanent url

I'm working in a site on Kentico v7 but i have a problem with the images that were stored in media folder; because i was trying to get on CMS the direct URL link of the image in the folder, but the link that CMS displayed is using the page "GetAzureFile.aspx" to get the image; I was validated in SiteManager -> Content -> Media -> General that the option "Use Permanent URL" is disabled but the problem appeared again.
Any insights would be greatly appreciated!
The Azure projects always use blob storage to store newly uploaded files. This is because technically the only files available physically in file system are the ones that were deployed with the project, and when any Azure instance restarts, it looses its local file system and only deployment package is restored on new instances.
As media library content may change on-the-fly, Kentico uses GetAzureFile links for all files to be able to serve them regardless of their storage.
You can however use hardcoded links directly to file system to the files that were part of the deployment package, e.g. ones that you use for site design.

Making a Windows Installer communicate with a Chrome extension without NPAPI

I have a windows application which installs a Chrome extension via the windows registry. I wish for this application to generate some one-time information for Chrome to read based on information typed in by the user during the installation process.
Assuming I am not using NPAPI in the Chrome extension, is there anywhere the installer can place information such that the extension will see it?
Edit: I also wish to launching chrome at the end of the installation.
Another way you can pass information to an installed extension from outside of Chrome is to have a page with your extension that you then open Chrome too and pass the info in the hash...such as....
chrome.exe "chrome-extension://emcggffhhapbbkcodabdliakappfibcf/showHash.html#info"
Problem with this method is your installing the extension using the simple registry method (Im guessing) and not using the Policy method. With the Policy method you can force an install and it will happen even if Chrome is allready open (where as according to the docs the simple method happens the next time Chrome is opened). Downside to this is you will have to make an uninstaller yourself as you cant uninstall an extension from Chrome that is installed with this method. Im also not sure how quick/often it will be before the extension is installed (couldnt find it in the docs and too lazy to try it ;)) and youd need to make your installer wait a bit for it to be installed....
http://www.chromium.org/developers/how-tos/adding-new-policies
http://dev.chromium.org/administrators/policy-list-3#ExtensionInstallForcelist
http://dev.chromium.org/administrators/policy-templates (says where in the registry to add them)
Another possible method could be to pack the extension at install time and add a file with the info that the extension could read. Problem with this method is that the extensions ID would change (might not be a problem for you?) or youll have to include the PEM in your installer which you probably dont want to do....
chrome.exe --pack-extension="C:\simple-example" --no-message-box
Many people wish there were an event firing on extension installing.
There's a workaround, not elegant way to send info to the browser from outside: launch chrome asking to open an url.
I use it with a local html file. My application execute a command line like:
"pathToChrome\Chrome.exe" "file://pathToHtmlFile/myFile.html?param1=value1&param2=value2"
The info I pass are the page's parameters.
The catch is that this page is read by the extensions in one of many ways:
You can write a content script this page will fire
You can put some javascript on this page to write down the parameters as cookies, for the extension to read in the future (without calling the extension at this time)
It hasn't to be a local page. If your page is on a server, it can save the parameters in the server, ir it worthy.
It hasn't to be even your page. You can call any page on Internet, but beeing sure it will fire your content script extension, and it will read your "customized" parameters.
Instead of communicating through the windows registry, you can create a WebSQL from the installer and from the extension read the data from there.
You will need to a bit of research about how to this, but this is possible. the steps should be:
The installer will create the database and register to chrome (maybe with the Databases.db)
The extension will use openDatabase to create a connection to the database
The extension will do a transaction and read the needed file.
Another option is to add file to the crx for example "installer_info.json" and do an AJAX request from the extension to the "installer_info.json" file.
There is no formal way for doing this things, little research and you will have a way.

Win32: HtmlHelp doesn't work from a network share. What's the alternative?

Since 2005, when Microsoft prevented HtmlHelp functioning off a network share, e.g.:
\\appserver\tos\PointScanner.exe
\\appserver\tos\PointScanner.chm
What are we supposed to do instead?
(Given that the application is not installed locally.)
To rephrase: What is Microsoft's intended, supported, out-of-the-box, help solution?
You can allow access via the Registry setting described here:
http://support.microsoft.com/kb/896054/
If you don't want to open any security vulnerabilities by modifying Registry settings your application could also create a local copy of the .chm file, e.g. in the users temp folder (%TMP%) and open the help from there. You can remove the file again when your application exits (in case you don't want to leave anything behind on the user's workstation)
I started with the registry change mentioned by divo. Eventually I moved from network folder based chm files to actual "html help". This was easy for me since I use RoboHelp which can generate either format from the same source code.

Resources