Hello,
I was able to configure Privacy Badger on Firefox using the information from here, but I can't seem to find anything on configuring for Chrome or Edge, just Chrome OS. I tried creating a REG_SZ called adminSettings with the JSON string configuration below under the keys Software\Policies\Microsoft\Edge\3rdparty\Extensions\mkejgcgkdlddbggjhhflekkondicpnop\policy (Edge) and Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy (Chrome), similar to the way uBlock is configured by GPO, but that didn't seem to do anything. Going to chrome://policy reveals that there are configurable settings, so I must just be pushing the JSON to the wrong location. Does anyone know the exact registry configuration required to get policy working for Privacy Badger in Chrome/Edge? If I am pushing to the right location, does the JSON look correct? I'd love to see an example from someone who's already got this in-place. Thank you!
Here's the current JSON that's being pushed (flattened into a string using this tool):
{
"disabledSites": {
"Value": [
"example.com"
]
},
"showIntroPage": {
"Value": false
}
}
Hello! I'm glad you reached out! Once we get this working for you, we'll update our admin configuration guide with tips for Windows.
Your registry location looks good to me at first glance.
Have you reviewed Google's Configuring Apps and Extensions by Policy doc? They have an example registry set there.
I think adminSettings/flattening an object into a string is particular to uBlock Origin.
Going off the example extension settings in the Google doc, it looks like you're going to want something like:
[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy]
"showIntroPage"="false"
I am not at all clear on how to store arrays of strings in the registry. Maybe:
[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy\disabledSites\1]
"example.com"
I would try different reasonable permutations of registry entries (restarting Privacy Badger after each attempt) until something worked. Let me know please if you get this working or if you get stuck, either way.
hi alexi,,
i just got this .. thanks i fell last weekend and have pretty severe amnesia .. this is denis english (Denise611)... i’m starting to get things back together and sent a message to my son ...thanks for contacting me ... i’ll be back
denis english , phd
Get Outlook for iOShttps://aka.ms/o0ukef
From: Alexei @.>
Sent: Friday, May 21, 2021 5:18:34 PM
To: EFForg/privacybadger *@.>
Cc: Subscribed @.**>
Subject: Re: [EFForg/privacybadger] Difficulties Configuring Privacy Badger on Chrome/Edge with group policy (#2770)
Hello! I'm glad you reached out! Once we get this working for you, we'll update our admin configuration guidehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FEFForg%2Fprivacybadger%2Fblob%2Fmaster%2Fdoc%2Fadmin-deployment.md&data=04%7C01%7C%7C89ee4bab57f34835431808d91ca66052%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637572323170975306%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LKMVpZtUuwi%2FWyxXYt4%2FTIUHAe1GnBtXC4ivtFA11PM%3D&reserved=0 with tips for Windows.
Your registry location looks good to me at first glance.
Have you reviewed Google's Configuring Apps and Extensions by Policy dochttps://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.chromium.org%2Fadministrators%2Fconfiguring-policy-for-extensions&data=04%7C01%7C%7C89ee4bab57f34835431808d91ca66052%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637572323170985302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WWVqjgegjxiII6LbkXlZx5b6QiUAcdHVXKprmNr%2FLF0%3D&reserved=0? They have an example registry set there.
I think adminSettings and flattening an object into a string is particular to uBlock Origin.
Going off the example extension settings in the Google doc, it looks like you're going to want something like:
[HKEY_LOCAL_MACHINESoftware\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy]
"showIntroPage"="false"
I am not at all clear on how to store arrays of strings in the registry. Maybe just?
[HKEY_LOCAL_MACHINESoftware\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy\disabledSites\1]
"example.com"
I would try different reasonable permutations of registry entries (restarting Privacy Badger after each attempt) until something worked. Let me know please if you get this working or if you get stuck, either way.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FEFForg%2Fprivacybadger%2Fissues%2F2770%23issuecomment-846290079&data=04%7C01%7C%7C89ee4bab57f34835431808d91ca66052%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637572323170985302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mVqTtgKnl%2BDU44VUjnIjMxxEqnq4qsN88Yq3EK49efU%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASZPRBKWQ6ED2XULGYRWTDLTO3L3VANCNFSM45JMRLNQ&data=04%7C01%7C%7C89ee4bab57f34835431808d91ca66052%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637572323170995296%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1Vox0K4356owyB34ztWBkwAJrjAT%2B3H%2FoPKyIa3Joy0%3D&reserved=0.
So I gave these a shot, but didn't appear to work. I think pushing a JSON containing the necessary parameter changes is the way to store arrays of strings in the registry, so that might be the way to go. I just don't know where it needs to be pushed to.
Sorry - didn't mean to close the issue.
Hey Alexei,
Still at a standstill with this issue. Can't seem to figure out the right Reg key to push to, or if it's expecting some kind of JSON configuration. I've tried both pushing a flattened JSON and pointing a registry key to a file containing an unflattened JSON, but neither worked. Any other ideas would be really helpful.
Thank you
Hi again. The thing that I am sure of is that "adminSettings" is something unique to uBlock Origin. The same goes for flattening a JSON into a string: that is a uBlock Origin-specific approach.
Privacy Badger does not use "adminSettings", and Privacy Badger does not unpack JSON from a string. Instead of "adminSettings", Privacy Badger expects individual keys and values.
Having said that, I suggest trying to override just showIntroPage to start with.
Does the following location/key/value set look good to you? Does it successfully disable the new user welcome page (after updating the registry and launching a new browser profile with a force-installed copy of Privacy Badger)? Does it show up in chrome://policy?
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy
showIntroPagefalseNote that showIntroPage is a boolean, not a string. (We probably don't want quotes around the value.)
Here is a related Stack Overflow answer. There should be more examples of registry-based managed policies for extensions out there we could find.
Okay, so I just tried the following with no success:
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy with a REG_SZ called showIntroPage and value false (tried with and without quotes around "false")HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy\showIntroPage with a default value false (tried with and without quotes around "false")showIntroPage with a value of false under the key HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgpI checked chrome://policy after every registry change, but the value showIntroPage did not update/populate. It's also worth noting that checking chrome://policy does not provide any clues as to what registry location Chrome is checking. @ghostwords Do you have any other suggestions?
How about using a REG_DWORD instead of REG_SZ? Called showIntroPage with a value of 10 at the "policy" location:
HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy
How about using a
REG_DWORDinstead ofREG_SZ? CalledshowIntroPagewith a value of1at the "policy" location:HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome\3rdparty\extensions\pkehgijcmpdhfbdbbnkijodmdjhbjlgp\policy
Aha! That did it for Chrome, but needed to use the DWORD with a value of 0 to disable the intro page. Doesn't look like it worked for Edge Chromium, though. Should the process be the same? Currently pushing the key HKLM\Software\Policies\Microsoft\Edge\3rdparty\Extensions\mkejgcgkdlddbggjhhflekkondicpnop\policy with a DWORD set to 0, but doesn't seem to be doing anything. Also edge://policy doesn't show any indication that Privacy Badger can be controlled, while chrome://policy clearly showed a section for Privacy Badger. Any ideas?
[EDIT] Wait, scratch that... chrome://policy shows that the value for showIntroPage has been set to false, but installing the extension still shows the intro page. So I guess it didn't really work after all...
Could you inspect Privacy Badger background page and then run the following two pieces of code in the console? Let me know what the output shows for each.
chrome.storage.managed.get(null, r=>console.log(r))
badger.storage.settings_map.getItem('showIntroPage')
Okay, so the first command returned the following:
{showIntroPage: false}
showIntroPage: false
__proto__: Object
The second command just returned true.
This tells me managed storage indeed got updated (our registry entry is being read and processed correctly by Chrome, hooray!), but Privacy Badger hasn't applied the managed storage override to its own settings.
Privacy Badger applies managed storage on startup. If you restart Privacy Badger, you should see badger.storage.settings_map.getItem('showIntroPage') return false.
Any ideas why Privacy Badger failed to apply the managed storage override when you installed Privacy Badger in Chrome? Could it be that the managed storage wasn't yet available for some reason?
Any ideas why Privacy Badger failed to apply the managed storage override when you installed Privacy Badger in Chrome? Could it be that the managed storage wasn't yet available for some reason?
I really have no idea why it would be acting this way. I'm not very familiar with writing extensions, or how they access managed storage.
Do you see badger.storage.settings_map.getItem('showIntroPage') return false if you restart Privacy Badger (such as by restarting Chrome)?
How are you installing Privacy Badger? Could you try reinstalling Privacy Badger to see if the intro page will get disabled at this point?
Restarted Chrome, badger.storage.settings_map.getItem('showIntroPage') now returns false! Removing and reinstalling no longer shows the intro page! I guess it needed time to update the managed storage override?
I'm installing Privacy Badger manually during testing, but plan to have it push via GPO when this is all ironed out. Any ideas on getting Edge working?
Great! I'll update our documentation with an example config for Chrome on Windows in a minute.
Edge: As far as I can tell, Edge works just like Chrome, except for "Microsoft\Edge" instead of "Google\Chrome" in the registry path.
Edge: As far as I can tell, Edge works just like Chrome, except for "Microsoft\Edge" instead of "Google\Chrome" in the registry path.
I tried the same method, but with the reg path HKLM\Software\Policies\Microsoft\Edge\3rdparty\Extensions\mkejgcgkdlddbggjhhflekkondicpnop\policy, and it didn't seem to do anything. edge://policy doesn't show any configurable settings, in contrast to chrome://policy, which did show a Privacy Badger section.
Have you tried restarting Edge? https://docs.microsoft.com/en-us/deployedge/configure-microsoft-edge#3-test-your-policies says "[y]ou may need to close and reopen Microsoft Edge if it was open while you were configuring policy settings".
I updated the admin guide just now. Let me know if you have any suggestions or I can help with anything else.