Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,26 @@ See my example:
<Code code={policy} lang="json" title="policies.json" />
```

### Policy examples

Each reference page shows a copy & paste-ready JSON example under `## Examples`.
The examples come from the upstream policy schema, which is fetched to `schema/policies-schema.json`.
This can be refreshed from upstream using `npm run schema:sync`.

To add the example to a policy page, import the `PolicyExample` component and pass the policy name as `policy="policy-name"`:

```mdx
---
title: "Some page"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

## Examples

<PolicyExample policy="MyCoolPolicy" />
```

## Starlight documentation

See [Starlight's docs](https://starlight.astro.build/), or read [the Astro documentation](https://docs.astro.build).
21 changes: 21 additions & 0 deletions src/components/PolicyExample.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
import { Code } from "@astrojs/starlight/components";
import schema from "../../schema/policies-schema.json";

interface Props {
/** Match a key under `properties` in policies-schema.json. */
policy: string;
}

const { policy } = Astro.props;

const entry = (schema.properties as Record<string, { examples?: unknown[] }>)[policy];
const examples = Array.isArray(entry?.examples) ? entry.examples : [];

// Wrap each in `{ policies: { policyname:`, so it's copy-paste ready.
const blocks = examples.map((example) =>
JSON.stringify({ policies: { [policy]: example } }, null, 2),
);
---

{blocks.map((code) => <Code code={code} lang="json" title="policies.json" />)}
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/3rdparty.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Allow WebExtensions to configure policy."
category: "Security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Allow WebExtensions to configure policies.
For more information, see [Adding policy support to your extension](https://extensionworkshop.com/documentation/enterprise/enterprise-development/#how-to-add-policy).
For GPO and Intune, the extension developer should provide an ADMX file.
Expand All @@ -12,6 +14,10 @@ For GPO and Intune, the extension developer should provide an ADMX file.
**CCK2 Equivalent:** N/A\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="3rdparty" />

## macOS

```xml
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AIChatbot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Configure the AI chatbot sidebar."
category: "Content settings"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Configure the AI chatbot sidebar, including which built-in providers are available and the ability to add custom providers.
For more information, see [Access AI chatbots in Firefox](https://support.mozilla.org/en-US/kb/ai-chatbot) on support.mozilla.org.

Expand All @@ -14,6 +16,10 @@ For more information, see [Access AI chatbots in Firefox](https://support.mozill
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `browser.ml.chat.enabled`, `browser.ml.chat.provider`, `browser.ml.chat.providers`, `browser.ml.chat.shortcuts`, `browser.ml.chat.prompts.0`, `browser.ml.chat.prompts.1`, `browser.ml.chat.prompts.2`, `browser.ml.chat.prompts.3`

## Examples

<PolicyExample policy="AIChatbot" />

## Values

- `Providers`: Configures the available AI chatbot providers.
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AIControls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ description: "Configure AI controls."
category: "Miscellaneous"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Configure AI controls.
For more information, see [Block generative AI features with Firefox AI controls](https://support.mozilla.org/en-US/kb/firefox-ai-controls) on support.mozilla.org.

**Compatibility:** Firefox Enterprise 149.0.0\
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `browser.ml.chat.enabled`, `browser.ml.chat.page`, `browser.ai.control.sidebarChatbot`, `browser.translations.enable`, `browser.ai.control.translations`, `pdfjs.enableAltText`, `browser.ai.control.pdfjsAltText`, `browser.ml.linkPreview.enabled`, `browser.ai.control.linkPreviewKeyPoints`, `browser.tabs.groups.smart.userEnabled`, `browser.ai.control.smartTabGroups`, `browser.ai.control.smartWindow`

## Examples

<PolicyExample policy="AIControls" />

## Values

Each key controls the availability of a specific AI feature.
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AccessConnector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Configure an Access Connector for proxying web traffic."
category: "Network security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Configure an Access Connector for proxying web traffic.
When this policy is set, Firefox traffic matching the specified URL patterns is routed through the configured proxy.

Expand All @@ -14,6 +16,10 @@ When this policy is set, Firefox traffic matching the specified URL patterns is
**CCK2 Equivalent:** N/A\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="AccessConnector" />

## Values

- `Host`: A string that defines the hostname or IP address of the proxy server to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ description: "Enable or disable file selection dialogs."
category: "Browser UI"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Enable or disable file selection dialogs.

**Compatibility:** Firefox 124\
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `widget.disable_file_pickers`

## Examples

<PolicyExample policy="AllowFileSelectionDialogs" />

## Windows (GPO)

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Define domains allowed to access Google Workspace."
category: "Network security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Define domains allowed to access Google Workspace.
This policy is based on the [Chrome policy](https://chromeenterprise.google/policies/#AllowedDomainsForApps) of the same name.
If this policy is enabled, users can only access Google Workspace using accounts from the specified domains. If you want to allow Gmail, you can add `consumer_accounts` to the list.
Expand All @@ -12,6 +14,10 @@ If this policy is enabled, users can only access Google Workspace using accounts
**CCK2 Equivalent:** N/A\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="AllowedDomainsForApps" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AppAutoUpdate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Enable or disable **automatic** application update."
category: "Device update settings"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Enable or disable **automatic** application update.

If set to `true`, application updates are installed without user approval within Firefox. The operating system might still require approval.
Expand All @@ -16,6 +18,10 @@ If you have disabled updates via [`DisableAppUpdate`](/reference/policies/disabl
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `app.update.auto`

## Examples

<PolicyExample policy="AppAutoUpdate" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AppUpdatePin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Prevent Firefox from being updated beyond the specified version."
category: "Device update settings"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Prevent Firefox from being updated beyond the specified pinned version.

The format for versioning is [semver](https://semver.org/), which uses `MAJOR.MINOR.PATCH` format.
Expand All @@ -22,6 +24,10 @@ If you specify a version that doesn't exist, Firefox will update beyond that ver
**CCK2 Equivalent:** N/A\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="AppUpdatePin" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/AppUpdateURL.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ description: "Change the URL for application update if you are providing Firefox
category: "Device update settings"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Change the URL for application update if you are providing Firefox updates from a custom update server.

**Compatibility:** Firefox 62, Firefox ESR 60.2\
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `app.update.url`

## Examples

<PolicyExample policy="AppUpdateURL" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/Authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Configure sites that support integrated authentication."
category: "Authentication"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Configure sites that support integrated authentication.
See [Integrated authentication](https://htmlpreview.github.io/?https://github.com/mdn/archived-content/blob/main/files/en-us/mozilla/integrated_authentication/raw.html) for more information.

Expand All @@ -13,6 +15,10 @@ The `PrivateBrowsing` member enables integrated authentication in private browsi
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `network.negotiate-auth.trusted-uris`,`network.negotiate-auth.delegation-uris`,`network.automatic-ntlm-auth.trusted-uris`,`network.automatic-ntlm-auth.allow-non-fqdn`,`network.negotiate-auth.allow-non-fqdn`,`network.automatic-ntlm-auth.allow-proxies`,`network.negotiate-auth.allow-proxies`,`network.auth.private-browsing-sso`

## Examples

<PolicyExample policy="Authentication" />

## Windows (GPO)

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Define a list of external protocols that can be used from listed o
category: "Network security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Define a list of external protocols that can be used from listed origins without prompting the user. The origin is the scheme plus the hostname.

The syntax of this policy is exactly the same as the [Chrome AutoLaunchProtocolsFromOrigins policy](https://chromeenterprise.google/policies/#AutoLaunchProtocolsFromOrigins) except that you can only use valid origins (not just hostnames).
Expand Down Expand Up @@ -36,6 +38,10 @@ The schema is:
**CCK2 Equivalent:** N/A\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="AutoLaunchProtocolsFromOrigins" />

## Windows (GPO)

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Enables or disables autofill for addresses."
category: "Password manager"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Enables or disables autofill for addresses.

This only applies when address autofill is enabled for a particular Firefox version or region.
Expand All @@ -13,6 +15,10 @@ See [Automatically fill in your address on web forms](https://support.mozilla.or
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `extensions.formautofill.addresses.enabled`

## Examples

<PolicyExample policy="AutofillAddressEnabled" />

## Windows (GPO)

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Enables or disables autofill for payment methods."
category: "Password manager"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Enables or disables autofill for payment methods.

This only applies when payment method autofill is enabled for a particular Firefox version or region. See [Automatically fill in credit card data](https://support.mozilla.org/kb/credit-card-autofill) for more information.
Expand All @@ -12,6 +14,10 @@ This only applies when payment method autofill is enabled for a particular Firef
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `extensions.formautofill.creditCards.enabled`

## Examples

<PolicyExample policy="AutofillCreditCardEnabled" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/BackgroundAppUpdate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: "Enable or disable automatic application update in the background,
category: "Device update settings"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Enable or disable automatic application update **in the background**, when the application is not running.

If set to `true`, application updates may be installed (without explicit user approval) in the background, even when the application is not running.
Expand All @@ -20,6 +22,10 @@ If you are having trouble getting the background task to run, verify your config
**CCK2 Equivalent:** N/A\
**Preferences Affected:** `app.update.background.enabled`

## Examples

<PolicyExample policy="BackgroundAppUpdate" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/BlockAboutAddons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ description: "Block access to the Add-ons Manager ('about:addons')."
category: "Extensions"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Block access to the Add-ons Manager (`about:addons`).

**Compatibility:** Firefox 60, Firefox ESR 60\
**CCK2 Equivalent:** `disableAddonsManager`\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="BlockAboutAddons" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/BlockAboutConfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ description: "Block access to 'about:config'."
category: "Security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Block access to `about:config`.

**Compatibility:** Firefox 60, Firefox ESR 60\
**CCK2 Equivalent:** `disableAboutConfig`\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="BlockAboutConfig" />

## Windows (GPO)

```
Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/reference/policies/BlockAboutProfiles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ description: "Block access to About Profiles ('about:profiles')."
category: "Security"
---

import PolicyExample from "../../../../components/PolicyExample.astro";

Block access to About Profiles (`about:profiles`).

**Compatibility:** Firefox 60, Firefox ESR 60\
**CCK2 Equivalent:** `disableAboutProfiles`\
**Preferences Affected:** N/A

## Examples

<PolicyExample policy="BlockAboutProfiles" />

## Windows (GPO)

```
Expand Down
Loading