Policy files seem to have no effect (Brave on Linux)

Description of the issue: I am attempting to setup blocklist/allowlist entries on brave for linux, but cannot get the policies to “stick”.

I created the attached policy file by browsing to brave://policy/, clicking , and adding the keys in question (see https://support.google.com/chrome/a/answer/7532419?hl=en).

Following https://github.com/brave/brave-browser/issues/12137, I have tried putting the resulting file (renamed with “.json” extension) in /etc/brave/policies/managed.

When I restart the browser, I expected to only be able to access the allowed sites, but observed no changes.

Following the older instructions at [Solved] Brave for Linux - policy issue), I tried putting the file at /etc/chromium/policies/managed.
Still no results.

policy-full.txt (364 Bytes)

How can this issue be reproduced?

  1. Save the attached file in /etc/brave/policies/managed.
  2. Change the .txt extension to .json.
  3. Restart the browser.

Expected result: Only the “allowed” sites should be available to the user.

Brave Version( check About Brave): Version 1.18.77 Chromium: 87.0.4280.101 (Official Build) (64-bit)

Additional Information:

Help? Please? Anyone?

@simonhong: Since you worked on the linked issue, could you comment on what I should be doing differently? Thank you!

@dbaJohnny: It seems you tested with 1.18.x. But, this fix is available from 1.19.x.
Can you test with current beta (1.19.x) or you can wait releasing 1.19.x as a stable in next week.
Thanks you.

1 Like

Thank you! I’d missed the fact that your fix was not yet released. I notice that the ubuntu repository is still on 1.18.x … I’ll post an update once I can test on 1.19.x.


I’ve rerun my tests on the latest stable build - the about window says Version 1.19.86 Chromium: 88.0.4324.96 (Official Build) (64-bit).

I put my policies.json file into etc/brave/policies/managed:

$ls /etc/brave/policies/managed/

I exited Brave and went back into it.

There is no message anywhere about Brave being managed - and no website blocking is in effect.

Following the advice on https://support.google.com/chrome/a/thread/68626385?hl=en, I tried replacing URLBlockList with URLBlacklist and URLAllowList with URLWhiteList, but nothing changed.

I tried switching to a regular user account (I had been making the changes in a privileged account), but still no changes.

Are you able to spot what I am doing wrong?

Thank you in advance!

Hmm, it’s strange. When I put below to /etc/brave/policies/managed/00_tor.json, I can see Your browser is managed by your organization from brave://settings.

    "TorDisabled": false

I’m also using 1.19.86.

Thanks, Simon - I have verified that limiting the file to that one policy does make my browser show up as managed. So I’m doing something wrong in the json. Working on it.

1 Like

Ok, I have the browser showing Your browser is managed by your organization after setting the URLBlockList policy to “*” – block everything.

However, the brave://policy window shows an error “Unknown policy”.

The same thing happens when I delete that policy and use the deprecated URLBlacklist policy.

Could you link in the appropriate resource to comment on whether Brave plans to support either of these (and the corresponding URLAllowList or URLWhiteList) policies?

Absent that, I guess I’m going to have to use Chrome :face_vomiting:

I’m fine with below json. (/etc/brave/policies/managed/01_url_block_list.json) and it blocks specified urls. Can you check again? According to your above comment, you’re use URLBlockList. but it’s URLBlocklist.

        "URLBlocklist": [ "https://www.brave.com/" ]

ah… sorry. you’re trying to use URLBlacklist
I think URLBlacklist seems not supported anymore.
Anyway, URLBlocklist works fine for me.

I assume you’re seeing “Unknown policy” because URLBlockList is used.

Thank you, Simon! Of course capitalization makes a difference - once that was right even brave://policy is blocked, and the only sites I can get to are the ones in URLAllowlist. Thanks again for your very thorough support!!

@dbaJohnny My pleasure!
Hope you enjoy with Brave :slight_smile: