From d8b91ae30441499617e35cc4864ed035d5071d45 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 11 Nov 2026 18:19:51 +0000 Subject: [PATCH] feat: improvements to permissions, cookies examples --- .../docs/reference/policies/Cookies.mdx | 28 ++++++++++- .../docs/reference/policies/Permissions.mdx | 50 +++++++++++++++++++ 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/src/content/docs/reference/policies/Cookies.mdx b/src/content/docs/reference/policies/Cookies.mdx index d66fb27..effde96 100644 --- a/src/content/docs/reference/policies/Cookies.mdx +++ b/src/content/docs/reference/policies/Cookies.mdx @@ -25,8 +25,8 @@ With `Locked`, users can't change these settings in Firefox. - `reject-foreign`: Reject third party cookies. - `reject`: Reject all cookies. - `limit-foreign`: Reject third party cookies for sites you haven't visited. - - `reject-tracker`: Reject cookies for known trackers (default). - - `partition-foreign`: Reject cookies for known trackers and partition third-party cookies, also known as Total Cookie Protection (default for private browsing). + - `reject-tracker`: Reject cookies for known trackers. + - `partition-foreign`: Reject cookies for known trackers and partition third-party cookies, also known as Total Cookie Protection (default). - `reject-tracker-and-partition-foreign`: (_Deprecated_. Renamed to `partition-foreign`. Update existing configurations to use `partition-foreign`.) - `BehaviorPrivateBrowsing` sets the default behavior for cookies in private browsing. Accepts the same values as `Behavior`. @@ -40,6 +40,30 @@ With `Locked`, users can't change these settings in Firefox. +### Allowing and blocking cookies for specific sites + +Firefox's default, `partition-foreign`, keeps third-party cookies separate for each site the user visits. +Locking it stops users from choosing a weaker setting. + +Sites in `Allow` can always use their cookies, including when they're embedded in other sites. +This helps single sign-on providers that need the same cookies on every site that uses them. +Sites in `Block` can't set cookies, and Firefox deletes their existing cookies at startup. +Both lists also apply to subdomains: + +```json +{ + "policies": { + "Cookies": { + "Behavior": "partition-foreign", + "BehaviorPrivateBrowsing": "partition-foreign", + "Allow": ["https://login.example.com"], + "Block": ["https://ads.example.net"], + "Locked": true + } + } +} +``` + ## Windows (GPO) ``` diff --git a/src/content/docs/reference/policies/Permissions.mdx b/src/content/docs/reference/policies/Permissions.mdx index 0c2275a..3428094 100644 --- a/src/content/docs/reference/policies/Permissions.mdx +++ b/src/content/docs/reference/policies/Permissions.mdx @@ -20,6 +20,56 @@ This explicitly means that it is not possible to add wildcards. See examples bel +### Allowing the camera and microphone on certain sites + +This example blocks all sites from asking to use the camera or microphone. +[Origins](https://developer.mozilla.org/en-US/docs/Glossary/Origin) in `Allow` can still use them, and Firefox doesn't prompt the user on those origins. +Firefox matches each entry, so you must list each origin the service uses, including subdomains. + +Setting `Locked` stops users from disabling this via the **Block new requests** setting: + +```json +{ + "policies": { + "Permissions": { + "Camera": { + "Allow": ["https://meet.example.com"], + "BlockNewRequests": true, + "Locked": true + }, + "Microphone": { + "Allow": ["https://meet.example.com"], + "BlockNewRequests": true, + "Locked": true + } + } + } +} +``` + +To allow screen sharing, add a `ScreenShare` entry. + +### Blocking autoplay for audio and video + +By default, Firefox allows sites to autoplay video without sound (`block-audio`). +The `block-audio-video` permission stops sites from automatically playing media until the user interacts with the page, and `Allow` lets you exempt sites. + +`Locked` stops users from changing the autoplay settings, and only takes effect when `Default` is also set: + +```json +{ + "policies": { + "Permissions": { + "Autoplay": { + "Allow": ["https://video.example.com"], + "Default": "block-audio-video", + "Locked": true + } + } + } +} +``` + ## Windows (GPO) ```