Skip to content
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

Add Brave-specific options to policy templates #16351

Closed
wants to merge 4 commits into from

Conversation

mherrmann
Copy link
Collaborator

@mherrmann mherrmann commented Dec 13, 2022

Previously, only Chromium options were there. Now we also have:

  • TorDisabled
  • IPFSEnabled
  • BraveRewardsDisabled
  • BraveWalletDisabled

Resolves brave/brave-browser#26502.

N.B.: The Group Policy documentation should be updated after merging this issue. It currently says that the above settings are not included in the templates. The change in this PR takes effect as soon as it is merged and a Nightly release is published.

This change should only affect this file on brave-browser-downloads.s3.com. It should not have any functional effects on Brave. It's just that the template file on S3 now contains some additional options.

I'm setting the milestone to 1.46.x because this change takes effect as soon as this PR was merged and a Nightly is published.

Test plan

Check that the above settings can be now be changed via policy_templates.zip. Please see #15440 for steps that can be used to do this.

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on
  • The Group Policy documentation was updated

@mherrmann mherrmann added this to the 1.46.x - Release #5 milestone Dec 13, 2022
@mherrmann mherrmann requested a review from a team as a code owner December 13, 2022 12:15
@mherrmann mherrmann self-assigned this Dec 13, 2022
@mherrmann mherrmann force-pushed the add-brave-policy-options branch 2 times, most recently from d3d0d15 to c935d39 Compare December 13, 2022 15:33
@kjozwiak kjozwiak removed this from the 1.46.x - Release #5 milestone Dec 14, 2022
@kjozwiak
Copy link
Member

Removing the milestone as this still hasn't landed in master. We only apply milestones once work as landed. For example, when the above lands in master, we'll apply the 1.48.x milestone. If it's uplifted, the release team will update the milestones once the uplift lands into a specific milestone. So for example, if the above is uplifted into 1.47.x, we'll change the milestone of brave/brave-browser#26502 to 1.47.x.

@mherrmann mherrmann force-pushed the add-brave-policy-options branch 2 times, most recently from 03f21dd to c3ed156 Compare December 15, 2022 11:00
@mherrmann
Copy link
Collaborator Author

Thank you @kjozwiak. I understand better now that it doesn't have a milestone yet because it's not on master. However, regarding the rest of what you wrote: As I explain in the issue description above, I believe the milestone should be 1.46.x, not 1.46.x. The reason is that the visible change of this PR is the web site, which gets updated as soon as a Nightly with this PR is published.

@mherrmann
Copy link
Collaborator Author

(P.S.: I might be wrong on the milestone, of course. It's just what I'd think, given my limited understanding.)

Previously, only Chromium options were there. Now we also have:

 * TorDisabled
 * IPFSEnabled
 * BraveRewardsDisabled
 * BraveWalletDisabled
@mherrmann mherrmann force-pushed the add-brave-policy-options branch from c3ed156 to 9d7b4d5 Compare December 15, 2022 13:19
@mherrmann
Copy link
Collaborator Author

@brave/patch-reviewers can I ask for your review please?

@goodov goodov mentioned this pull request Dec 20, 2022
25 tasks
+++ b/components/policy/resources/policy_templates.json
@@ -1,4 +1,4 @@
-{
+__import__('policy_source_helper').BravePolicies() + {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it work like this?

__import__('policy_source_helper').BravePolicies() +
{

or

__import__('policy_source_helper').BravePolicies() + \
{

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR will likely have to be re-done in its entirety because upstream just completely changed their implementation. Settings used to be defined in a single .json file. Now it's a set of directories and .yaml files.

'chrome.mac:93-',
'chrome.linux:93-'],
'name':
'TorDisabled',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's merge a workaround for yapf and fix this bad formatting afterwards.
#16424

@bsclifton
Copy link
Member

@mherrmann this is an old one - but a good one 😄

Looking at your comment, it seems it'll have to be reworked as upstream changed how they do things. We have some additional values added since you originally did this:

  • BraveShieldsDisabledForUrls
  • BraveShieldsEnabledForUrls
  • BraveVPNDisabled

https://support.brave.com/hc/en-us/articles/360039248271-Group-Policy

Let me know if I can help on this one 😄 Would be cool to have something which includes these policies going forward

@mherrmann
Copy link
Collaborator Author

@bsclifton yes, upstream changed things in the middle of my work. I haven't forgotten about this. I just haven't had time to get to it because I have been working on other items. You helping could mean implementing it on your own, taking this PR (what's left of it, after upstream's changes, anyways) as a starting point.

'type': 'main',
'schema': {'type': 'boolean'},
'name':
'IPFSEnabled',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're in the process of removing IPFS so this can go away.

@bsclifton
Copy link
Member

I believe this is stale as upstream has redone things. Closing for now - we can always raise a new PR. Thanks!

@bsclifton bsclifton closed this Aug 13, 2024
@bsclifton bsclifton deleted the add-brave-policy-options branch August 13, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Brave-specific options configurable through Windows Group Policy templates
5 participants