Question: Where are Brave policies located in Flatpak?

Hi, Googled and tried following some posted suggestions for Chromium policies in Linux, but when I test with below json I can’t get it to work with /etc/opt/brave/policies/managed

{
“BraveShieldsDisabledForUrls”: [
https://malwaretips.com
]
}

I tried looking in
/home/kees/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser and
/var/lib/flatpak/app/com.brave.Browser

But have no idea where policies are stored

The folder /etc is not readable inside the Flatpak sandbox, so the file won’t be read.

Also, Chromium (and Brave) policies are designed to set settings for many deployments of an app, often in an enterprise setting.

If you only wish to disable Shields for a page on your personal computer, you can use the UI of the browser:

No, I don’t wat to disable shields for a website. Figured out this was the easiest way to check whether these policies are active :slight_smile:

Well, if you only want to check them, according to https://support.brave.com/hc/en-us/articles/360039248271-Group-Policy:

Additionally, the brave://policy page is a great place to see what policies are in effect, so you know that they are being enforced.

Yes I know that, but when Brave runs in Flatpak these policies are located elsewhere because Brave is sandboxed. I want to know the policy json location for Brave running in Flatpak sandbox.

Well, seems I misunderstood you a bit then.

I have looked a bit at this again, and it seems I have a few corrections to make.

The proper solution would be to have a extension point for policies. As an example, the Chromium Flatpak offers an extension point. A extension containing the policy can be created and installed. This would be picked up by Chromium then.

However, Brave currently does not provide a extension point.

But, as it turns out, the launch script links the policy folder from the host /etc at startup, so it can actually read the policies in /etc/brave/policies/. This is possible as Brave sets the filesystem=host-etc permission, which gives it read access to the /etc folder.

I will Brave flatpack read access to /etc/brave/policies/ with flatseal and try it again. Will report back whether that worked. Thanks for your time