I have a corporate extension that needs to be hosted on mozilla addons. So I’m adapting my background script but I’m not able to get the group policies through the extension.
I’m not too familiar with setting group policies, but the sample you shared doesn’t look right to me. First, the “ExtensionID” that appears in the key path should be the ID of the extension you’re trying to manage. Based on the value you provided, it appears that you’re trying to configure uBlock Origin. The ID of that extension is uBlock0@raymondhill.net.
I’m not familiar with policy management on Windows, but according to the Enterprise development documentation, you are strongly encouraged to use ADMX and ADML files to administer windows.
Alternatively, the storage.managed and native manifests documentation indicates that you can configure an extension’s managed storage by setting the following registry key:
Also, the value being set in the registry key looks off. See uBO’s Deploying uBlock Origin docs for more detailed guidance on configuring this specific extension.
Hi @dotproto, I’m going to share here the response from the Mozilla team in the developer center.
They said I need to show the privacy terms and I can use “3rdparty” to automatically accept the terms.
This was their message:
“Please note that as per our policies for Data Disclosure, Collection and Management, we require add-ons to show a valid data collection disclosure and consent experience upon installation. Add-ons installed by Enterprise Policies can grant consent on user’s behalf programatically so as not to have to show the disclosure and consent experience to the end user. This can be achieved by setting a value via the ““3rdparty”” Enterprise Policy (policy-templates | Policy Templates for Firefox) and reading it with storage.managed API. Note that if the value isn’t set, the extension must show a valid disclosure and consent experience to the user.”
It was from the documentation they sent that I arrived at these Windows registry keys. And from this documentation (Enterprise development | Firefox Extension Workshop), I took the code to get information from storage.
But I still have doubts about where I should “configure” in the storage to say that my extension does not need my user’s consent.
Thanks for sharing that context, it helps quite a bit to better understand both what you’re trying to do with the keys and the broader context of how you plan to use managed storage. I’ll do my best to help get you sorted, or at least pointed in the right direction
It’s not clear to me whether or not you can manually set a registry key for the 3rdparty policy via a registry key like you tried to do. I’ve reached out to an engineer for clarification and will follow up when I hear back.
Policies can be set in a few different ways, but the easiest way to test is using a file called policies.json.
On Windows, create a directory called distribution where the EXE is located and place the file there.
…
For our example, policies.json looks like this: