Closed Bug 2008554 Opened 8 months ago Closed 14 days ago

[meta] Single source of truth for policy capabilities

Categories

(Enterprise Products :: General, task, P1)

x86_64
Linux

Tracking

(firefox155 fixed)

RESOLVED FIXED
Tracking Status
firefox155 --- fixed

People

(Reporter: gcp, Assigned: bsmth)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

Different Firefox versions might support different policies, and might support different configuration options within those policies, and be or not be able to support un-setting the policy or changing it live (without restarting). We want a single source of truth for these capabilities that the console can pull from to display the proper UI.

This can also include whether the policy is relevant to Firefox for Enterprise (e.g. Firefox Accounts settings).

Target Milestone: --- → MVP
Severity: -- → S2

I have the impression we are converging on having this in data in https://github.com/mozilla-firefox/firefox/blob/main/browser/components/enterprisepolicies/schemas/policies-schema.json

But containing additional members, like:

{
  "DisableTelemetry": {
    "description": "Disables the collection and submission of telemetry data.",
    "x-requires_restart": true,
    "x-compatibility": {
      "firefox": {
        "version_added": "50"
      },
      "firefox_esr": {
        "version_added": "50"
      },
      "firefox_enterprise": {
        "version_added": "70"
      }
    }
  }
}

For validation, it may look like this example I was roughly drafting: https://github.com/bsmth/policy-compat-data/blob/main/data/policy-compat-data.schema.json

Historical context:

  1. Version support info removed in https://github.com/mozilla-firefox/firefox/commit/983c21b678c9b8d2c45b048deb899d5f237efab2
  2. Descriptions moved out into ftl files for translations https://github.com/mozilla-firefox/firefox/commit/4bc09a8e18cd3a797cd5f96fa14ba40ec4dba987

edit:

  • Adding x- prefix for non-standard fields
See Also: → 2012084
Blocks: 2036704

I'm proposing a linter in https://github.com/mozilla/enterprise-firefox/pull/910 to enforce the current shape of policies-schema.json.

See Also: → 2040651
Duplicate of this bug: 2012084
Summary: Single source of truth for policy capabilities → [meta] Single source of truth for policy capabilities
Assignee: nobody → brismith
Attachment #9606524 - Attachment description: Bug 2008554 - Add a linter for policy JSON schema. r?mkaply → Bug 2008554 - Validate enterprise policy schema with xpcshell tests. r?mkaply
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

There's still some work to do on this, so reopening. The tests have now landed, so all new policies must have description, category, and examples. The missing parts are compat and 'restart required' info, they're coming in follow-up patches.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 2059713
Depends on: 2046462
No longer duplicate of this bug: 2012084
Priority: -- → P1

We can close as done now, well done!

Status: REOPENED → RESOLVED
Closed: 1 month ago14 days ago
Resolution: --- → FIXED
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: