toolkit/components/extensions/schemas/privacy.json
author William Durand <wdurand@mozilla.com>
Sat, 23 Oct 2021 15:10:40 +0000
changeset 596797 226ea4af4493332137b513239b5c4506ee14dffe
parent 558726 eb0709aaa89db7c2b00911a495c5edfa54ff35b5
permissions -rw-r--r--
Bug 1736684 - Part 1: Add test coverage for the search-detection built-in add-on (client side). r=rpl This patch adds a new test file containing a test case to cover the two main client side scenarios. Differential Revision: https://phabricator.services.mozilla.com/D129050

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  {
    "namespace": "manifest",
    "types": [
      {
        "$extend": "OptionalPermission",
        "choices": [{
          "type": "string",
          "enum": [
            "privacy"
          ]
        }]
      }
    ]
  },
  {
    "namespace": "privacy",
    "permissions": ["privacy"]
  },
  {
    "namespace": "privacy.network",
    "description": "Use the <code>browser.privacy</code> API to control usage of the features in the browser that can affect a user's privacy.",
    "permissions": ["privacy"],
    "types": [
      {
        "id": "IPHandlingPolicy",
        "type": "string",
        "enum": ["default", "default_public_and_private_interfaces", "default_public_interface_only", "disable_non_proxied_udp", "proxy_only"],
        "description": "The IP handling policy of WebRTC."
      },
      {
        "id": "tlsVersionRestrictionConfig",
        "type": "object",
        "description": "An object which describes TLS minimum and maximum versions.",
        "properties": {
          "minimum": {
            "type": "string",
            "enum": [
              "TLSv1",
              "TLSv1.1",
              "TLSv1.2",
              "TLSv1.3",
              "unknown"
            ],
            "optional": true,
            "description": "The minimum TLS version supported."
          },
          "maximum": {
            "type": "string",
            "enum": [
              "TLSv1",
              "TLSv1.1",
              "TLSv1.2",
              "TLSv1.3",
              "unknown"
            ],
            "optional": true,
            "description": "The maximum TLS version supported."
          }
        }
      },
      {
        "id": "HTTPSOnlyModeOption",
        "type": "string",
        "enum": ["always", "private_browsing", "never"],
        "description": "The mode for https-only mode."
      }
    ],
    "properties": {
      "networkPredictionEnabled": {
        "$ref": "types.Setting",
        "description": "If enabled, the browser attempts to speed up your web browsing experience by pre-resolving DNS entries, prerendering sites (<code>&lt;link rel='prefetch' ...&gt;</code>), and preemptively opening TCP and SSL connections to servers.  This preference's value is a boolean, defaulting to <code>true</code>."
      },
      "peerConnectionEnabled": {
        "$ref": "types.Setting",
        "description": "Allow users to enable and disable RTCPeerConnections (aka WebRTC)."
      },
      "webRTCIPHandlingPolicy": {
        "$ref": "types.Setting",
        "description": "Allow users to specify the media performance/privacy tradeoffs which impacts how WebRTC traffic will be routed and how much local address information is exposed. This preference's value is of type IPHandlingPolicy, defaulting to <code>default</code>."
      },
      "tlsVersionRestriction": {
        "$ref": "types.Setting",
        "description": "This property controls the minimum and maximum TLS versions. This setting's value is an object of $(ref:tlsVersionRestrictionConfig)."
      },
      "httpsOnlyMode": {
        "$ref": "types.Setting",
        "description": "Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption, defaulting to <code>never</code>."
      }
    }
  },
  {
    "namespace": "privacy.services",
    "description": "Use the <code>browser.privacy</code> API to control usage of the features in the browser that can affect a user's privacy.",
    "permissions": ["privacy"],
    "properties": {
      "passwordSavingEnabled": {
        "$ref": "types.Setting",
        "description": "If enabled, the password manager will ask if you want to save passwords. This preference's value is a boolean, defaulting to <code>true</code>."
      }
    }
  },
  {
    "namespace": "privacy.websites",
    "description": "Use the <code>browser.privacy</code> API to control usage of the features in the browser that can affect a user's privacy.",
    "permissions": ["privacy"],
    "types": [
      {
        "id": "TrackingProtectionModeOption",
        "type": "string",
        "enum": ["always", "never", "private_browsing"],
        "description": "The mode for tracking protection."
      },
      {
        "id": "CookieConfig",
        "type": "object",
        "description": "The settings for cookies.",
        "properties": {
          "behavior": {
            "type": "string",
            "optional": true,
            "enum": [
              "allow_all",
              "reject_all",
              "reject_third_party",
              "allow_visited",
              "reject_trackers",
              "reject_trackers_and_partition_foreign"
            ],
            "description": "The type of cookies to allow."
          },
          "nonPersistentCookies": {
            "type": "boolean",
            "optional": true,
            "default": false,
            "description": "Whether to create all cookies as nonPersistent (i.e., session) cookies."
          }
        }
      }
    ],
    "properties": {
      "thirdPartyCookiesAllowed": {
        "$ref": "types.Setting",
        "description": "If disabled, the browser blocks third-party sites from setting cookies. The value of this preference is of type boolean, and the default value is <code>true</code>.",
        "unsupported": true
      },
      "hyperlinkAuditingEnabled": {
        "$ref": "types.Setting",
        "description": "If enabled, the browser sends auditing pings when requested by a website (<code>&lt;a ping&gt;</code>). The value of this preference is of type boolean, and the default value is <code>true</code>."
      },
      "referrersEnabled": {
        "$ref": "types.Setting",
        "description": "If enabled, the browser sends <code>referer</code> headers with your requests. Yes, the name of this preference doesn't match the misspelled header. No, we're not going to change it. The value of this preference is of type boolean, and the default value is <code>true</code>."
      },
      "resistFingerprinting": {
        "$ref": "types.Setting",
        "description": "If enabled, the browser attempts to appear similar to other users by reporting generic information to websites. This can prevent websites from uniquely identifying users. Examples of data that is spoofed include number of CPU cores, precision of JavaScript timers, the local timezone, and disabling features such as GamePad support, and the WebSpeech and Navigator APIs. The value of this preference is of type boolean, and the default value is <code>false</code>."
      },
      "firstPartyIsolate": {
        "$ref": "types.Setting",
        "description": "If enabled, the browser will associate all data (including cookies, HSTS data, cached images, and more) for any third party domains with the domain in the address bar. This prevents third party trackers from using directly stored information to identify you across different websites, but may break websites where you login with a third party account (such as a Facebook or Google login.) The value of this preference is of type boolean, and the default value is <code>false</code>."
      },
      "protectedContentEnabled": {
        "$ref": "types.Setting",
        "description": "<strong>Available on Windows and ChromeOS only</strong>: If enabled, the browser provides a unique ID to plugins in order to run protected content. The value of this preference is of type boolean, and the default value is <code>true</code>.",
        "unsupported": true
      },
      "trackingProtectionMode": {
        "$ref": "types.Setting",
        "description": "Allow users to specify the mode for tracking protection. This setting's value is of type TrackingProtectionModeOption, defaulting to <code>private_browsing_only</code>."
      },
      "cookieConfig": {
        "$ref": "types.Setting",
        "description": "Allow users to specify the default settings for allowing cookies, as well as whether all cookies should be created as non-persistent cookies. This setting's value is of type CookieConfig."
      }
    }
  }
]