brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.57k stars 2.28k forks source link

Create an admin policy for disabling Browser-AI related functionality #31461

Closed bbondy closed 7 months ago

bbondy commented 1 year ago

We should have a way for admins to disable all functionality related to Browser-AI

bbondy commented 12 months ago

As a workaround until we implement this feature. Network admins can disable HTTPS access to ai-chat.bsg.brave.com for the time being to effectively break the feature.

petemill commented 11 months ago

Can admins force any feature flag to disabled?

bbondy commented 11 months ago

I don't think so

LaurenWags commented 6 months ago

Verified with

Brave | 1.64.97 Chromium: 122.0.6261.111 (Official Build) beta (x86_64)
-- | --
Revision | f7c8f13563bfe1063db456650cb43207e1c960c0
OS | macOS Version 13.6.4 (Build 22G513)

Verified test plan for macOS from https://github.com/brave/brave-core/pull/21718#issue-2097114410:

  1. In /Library/Managed\ Preferences/<username>/, created com.brave.Browser.beta.plist with the content from above test plan:
1
  1. Launched a fresh profile with 1.64.97 Chromium: 122.0.6261.111
  2. Navigated to brave://policy:
3
  1. Confirmed no Brave Leo available on sidebar:
4
  1. Navigate to brave://settings.
  2. Confirmed that there is no Leo item in the left navigation menu
6
  1. Confirmed searching for Leo has no result
7
  1. Typed a search term in the tab's omnibox and confirmed there is no Leo autocomplete entry
8
  1. Navigate to any page, highlight some text and then open context menu
  2. Confirmed there is no "Leo tools->Summarize" entry
10
  1. Closed the browser.
  2. Followed directions to clear policy from https://github.com/brave/brave-core/pull/21718#issue-2097114410
12
  1. Relaunched the browser
  2. Confirmed policy cleared and Leo entries are available as expected:
    • on sidebar
    • in brave://settings
    • when searching via omnibox
    • on context menu
a b c
  1. Confirmed policy is no longer listed under brave://policy
15
hffvld commented 6 months ago

Hi @darkdh does this apply for Android, if so, can you provide a test plan, please?

darkdh commented 6 months ago

No, any group policies we added never get tested on Android. Setting up the cloud test server is complex https://www.chromium.org/developers/how-tos/enterprise/running-the-cloud-policy-test-server/

stephendonner commented 6 months ago

Verified PASSED using

Brave | 1.64.98 Chromium: 122.0.6261.111 (Official Build) beta (64-bit)
-- | --
Revision | a262f3c44a8960fee49fbf0bd6f5740634f32be7
OS | Windows 10 Version 22H2 (Build 19045.4123)

Steps:

  1. opened regedit on Windows
  2. created a BraveSoftware\Brave key entry in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies
  3. installed 1.64.98
  4. launched Brave
  5. opened brave://policy
  6. noted BraveAIChatEnabled is set to false
  7. confirmed there's no Leo menu-item entry in brave://settings
  8. confirmed no context-click Leo AI tools > menu-item with text selection
  9. confirmed no Leo autocomplete in the URL bar
example example example example example example
image image image image image image

Reversed/cleared admin policy

Steps:

  1. deleted the BraveSoftware top-level key under .../policies via regedit
  2. restarted Brave
  3. confirmed no policies set via brave://policy
  4. confirmed the return of Leo menu-item entry in brave://settings
  5. confirmed return of Leo URL-bar autocomplete/suggest Ask Leo {searchTerm}
  6. confirmed context-menu item Brave AI tools > on text-selection
  7. confirmed Explain functionality from flyout menu
example example
image image
example example example example example
image image image image image
stephendonner commented 6 months ago

Verified PASSED using

Brave   1.64.104 Chromium: 123.0.6312.46 (Official Build) (64-bit) 
Revision    0ca3d372cf8aab96fafdd75f5c5c8d2012bc0cc6
OS  Linux

Steps:

  1. created a file named test_policy.json in /etc/brave/policies/managed (using sudo) with "BraveAIChatEnabled": false
  2. installed 1.64.104
  3. launched Brave
  4. opened brave://policy
  5. confirmed BraveAIChatEnabled is false
  6. opened brave://settings and confirmed no Leo section
  7. turned on sidebar and confirmed no Leo in sidebar
  8. loaded a webpage
  9. context-clicked text
  10. confirmed no Leo AI tools > context-menu item
  11. undid the policy change by removing test_policy.json
  12. relaunched Brave

Confirmed Leo returned

Leo admin-disabled

example example example example example example
Screen Shot 2024-03-14 at 4 05 08 PM Screen Shot 2024-03-14 at 4 02 55 PM Screen Shot 2024-03-14 at 4 03 09 PM Screen Shot 2024-03-14 at 4 03 25 PM Screen Shot 2024-03-14 at 4 03 37 PM Screen Shot 2024-03-14 at 4 03 54 PM

Leo returned

example example example example
Screen Shot 2024-03-14 at 4 19 19 PM Screen Shot 2024-03-14 at 4 19 50 PM Screen Shot 2024-03-14 at 4 19 55 PM Screen Shot 2024-03-14 at 4 20 09 PM