-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create group policy options for Shields #25394
Comments
what should actually display in the shields popup when shields is enabled/disabled by policy? How are we displaying to the user that shields is managed and cannot be changed there? This ticket needs more detail for review and QA |
Is this only for Windows, or is this applicable to macOS and Linux as well? Only Windows is mentioned in #25394 (comment). If this is only for Windows, please add If this is applicable for macOS and Linux as well, please add instructions on how to enable on those OSes also. Labelling as |
This is available on macOS and Linux - but I'm not sure offhand how to test actually. Let me dig in on that and then I'll share an update |
Example of how to add the group policy (macOS)You can set via the command line. Here's a general example for EnableSha1ForLocalAnchors in Chrome:
<array>
<string>[*.]twitter.com</string>
<string>https://www.example.com</string>
</array> Example of how to enable shields for a list of origins
Example of how to disable shields for a list of origins
|
Example of how to add the group policy (Linux)You can set the options via Basically, you will make a file with JSON matching the keys/values you'd like to set. Full overview here: Example of how to enable shields for a list of origins
Example of how to disable shields for a list of origins
|
thanks @bsclifton! |
Verification passed on
Verified test plan from the description DISABLE policyVerified Brave is shown as managed in hamburger menu Verified Brave Shields are disabled by default for the disabled page ENABLE policyVerified Brave is shown as managed in hamburger menu Verified Brave Shields are enabled by default for the enabled page ENABLE & DISABLE policy for the same domainVerified the policies have 'OK' status Verified Brave Shields enabled policy takes precedent over disabled policy Wildcard policy |
Verification passed on
Verified test plan from the description DISABLE policyVerified Brave is shown as managed in hamburger menu Verified Brave Shields are disabled by default for the disabled page ENABLE policyVerified Brave is shown as managed in hamburger menu Verified Brave Shields are enabled by default for the enabled page ENABLE & DISABLE policy for the same domainVerified the policies have 'OK' status Verified Brave Shields enabled policy takes precedent over disabled policy Wildcard policy |
Verification
|
Brave | 1.47.136 Chromium: 108.0.5359.128 (Official Build) beta (x86_64) |
---|---|
Revision | 1cd27afdb8e5d057070c0961e04c490d2aca1aa0-refs/branch-heads/5359@{#1185} |
OS | macOS Version 11.7.2 (Build 20G1020) |
NOTE: Ran the following in-between tests, to clean up the keys:
defaults delete com.brave.Browser
Case 1: Disable policy - PASSED
- installed
1.47.136
- ran the following snippets from the commandline/Terminal window:
defaults write com.brave.Browser BraveShieldsDisabledForUrls -array "https://www.example.com/" "https://brave.com"
- launched Brave
- clicked on the
"hamburger"
menu - confirmed
This browser is managed by your organization
message on the bottom - opened
brave://policy
- confirmed
BraveShieldsDisabledForUrls
entry with correct domains - loaded
https://www.example.com
- confirmed Shields were disabled by default
- loaded
brave.com
- confirmed Shields were disabled by default
steps 5 + 7 | step 8+9 | steps 10 + 11 |
---|---|---|
Case 2: Enable policy - PASSED
- installed
1.47.136
- launched Brave
- loaded
https://twitter.com
- disabled Shields via the toggle
- loaded
https://www.example.com
- disabled Shields via the toggle
- quit Brave
- ran the following from the commandline:
defaults write com.brave.Browser BraveShieldsEnabledForUrls -array "https://twitter.com" "https://www.example.com"
- relaunched Brave
- loaded
https://twitter.com
- confirmed Shields were enabled
- loaded
https://www.example.com
- confirmed Shields were enabled
- confirmed entry in
brave://policy
step 4 | step 6 | step 8 | step 11 | step 13 | step 14 |
---|---|---|---|---|---|
Case 3: Enable & disable policy for the same domain - PASSED
- installed
1.47.136
- launched Brave
- ran:
defaults write com.brave.Browser BraveShieldsEnabledForUrls -array "https://twitter.com" "https://www.example.com"
- ran:
defaults write com.brave.Browser BraveShieldsDisabledForUrls -array "https://twitter.com" "https://www.example.com"
- opened
brave://policy
- loaded
https://twitter.com
- confirmed Shields were still set to enabled
- loaded
https://www.example.com
- confirmed Shields were still set to enabled
steps 3-4 | step 6 | step 8 | step 10 |
---|---|---|---|
Case 4: Wildcard policy - FAILED
- installed 1.47.136
- ran:
defaults write com.brave.Browser BraveShieldsDisabledForUrls -array "https://www.example.com/" "[*.]brave.com"
Description
Add group policy support for Shields (up/down). This will support individual URLs and patterns
BraveShieldsDisabledForUrls
to disable shields urlsBraveShieldsEnabledForUrls
to enable shields urlsFor the design, see Figma:
https://www.figma.com/file/3A6F6VrxVahiZFxLr7j7FO/Desktop-Shields?node-id=2695%3A49651
Behavior notes
This is an overview of what the user should expect when the policy is set.
Behavior when DISABLED
When the site being visited matches the URL or the pattern:
Behavior when ENABLED
When the site being visited matches the URL or the pattern:
Example of how to add the group policy (Windows)
regedit.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\
BraveSoftware\Brave\
if they don't already existHow to add the shields DISABLE policy
BraveShieldsDisabledForUrls
inside the root (HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave\
)REG_SZ
(string value) for any sites you wish to mark as disabled.The entries need to created in a numbered fashion. Let's say you want to add two values. You would create:
REG_SZ
value1
set tohttps://www.example.com
REG_SZ
value2
set to[*.]brave.com
This would DISABLE shields on brave.com and all subdomains. It would also DISABLE shields on https://www.example.com - but NOT on other subdomains (or if you leave
www.
out for example).How to add the shields ENABLE policy
BraveShieldsEnabledForUrls
inside the root (HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave\
)REG_SZ
(string value) for any sites you wish to mark as enabled.The entries need to created in a numbered fashion. Let's say you want to add two values. You would create:
REG_SZ
value1
set to[*.]twitter.com
REG_SZ
value2
set tohttps://www.example.com
This would ENABLE shields on brave.com and all subdomains. It would also ENABLE shields on https://www.example.com - but NOT on other subdomains (or if you leave
www.
out for example).Adding using a
.reg
file (also on Windows)shields-policy.reg
shields-policy.reg
fileregedit.exe
to confirm it was addedTest plan
Go through above - download/run the registry key.
Verify that
The text was updated successfully, but these errors were encountered: