diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mail/components/enterprisepolicies/schemas | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
4 files changed, 672 insertions, 0 deletions
diff --git a/comm/mail/components/enterprisepolicies/schemas/configuration.json b/comm/mail/components/enterprisepolicies/schemas/configuration.json new file mode 100644 index 0000000000..8d3e9e43c2 --- /dev/null +++ b/comm/mail/components/enterprisepolicies/schemas/configuration.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "policies": { + "$ref": "policies.json" + } + }, + "required": ["policies"] +} diff --git a/comm/mail/components/enterprisepolicies/schemas/moz.build b/comm/mail/components/enterprisepolicies/schemas/moz.build new file mode 100644 index 0000000000..658f0b1ed7 --- /dev/null +++ b/comm/mail/components/enterprisepolicies/schemas/moz.build @@ -0,0 +1,12 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +with Files("**"): + BUG_COMPONENT = ("Thunderbird", "OS Integration") + +EXTRA_PP_JS_MODULES.policies += [ + "schema.sys.mjs", +] diff --git a/comm/mail/components/enterprisepolicies/schemas/policies-schema.json b/comm/mail/components/enterprisepolicies/schemas/policies-schema.json new file mode 100644 index 0000000000..c49aa5ac16 --- /dev/null +++ b/comm/mail/components/enterprisepolicies/schemas/policies-schema.json @@ -0,0 +1,634 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "3rdparty": { + "type": "object", + "properties": { + "Extensions": { + "type": "object", + "patternProperties": { + "^.*$": { + "type": "JSON" + } + } + } + } + }, + + "AppAutoUpdate": { + "type": "boolean" + }, + + "AppUpdatePin": { + "type": "string" + }, + + "AppUpdateURL": { + "type": "URL" + }, + + "Authentication": { + "type": "object", + "properties": { + "SPNEGO": { + "type": "array", + "items": { + "type": "string" + } + }, + "Delegated": { + "type": "array", + "items": { + "type": "string" + } + }, + "NTLM": { + "type": "array", + "items": { + "type": "string" + } + }, + "AllowNonFQDN": { + "type": "object", + "properties": { + "SPNEGO": { + "type": "boolean" + }, + + "NTLM": { + "type": "boolean" + } + } + }, + "AllowProxies": { + "type": "object", + "properties": { + "SPNEGO": { + "type": "boolean" + }, + + "NTLM": { + "type": "boolean" + } + } + }, + "Locked": { + "type": "boolean" + }, + "PrivateBrowsing": { + "type": "boolean" + } + } + }, + + "BackgroundAppUpdate": { + "type": "boolean" + }, + + "BlockAboutAddons": { + "type": "boolean" + }, + + "BlockAboutConfig": { + "type": "boolean" + }, + + "BlockAboutProfiles": { + "type": "boolean" + }, + + "BlockAboutSupport": { + "type": "boolean" + }, + + "CaptivePortal": { + "type": "boolean" + }, + + "Certificates": { + "type": "object", + "properties": { + "ImportEnterpriseRoots": { + "type": "boolean" + }, + "Install": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + + "Cookies": { + "type": "object", + "properties": { + "Allow": { + "type": "array", + "strict": false, + "items": { + "type": "origin" + } + }, + + "Block": { + "type": "array", + "strict": false, + "items": { + "type": "origin" + } + }, + + "Default": { + "type": "boolean" + }, + + "AcceptThirdParty": { + "type": "string", + "enum": ["always", "never", "from-visited"] + }, + + "ExpireAtSessionEnd": { + "type": "boolean" + }, + + "Locked": { + "type": "boolean" + } + } + }, + + "DefaultDownloadDirectory": { + "type": "string" + }, + + "DisableAppUpdate": { + "type": "boolean" + }, + + "DisableBuiltinPDFViewer": { + "type": "boolean" + }, + + "DisabledCiphers": { + "type": "object", + "properties": { + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": { + "type": "boolean" + }, + "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": { + "type": "boolean" + }, + "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": { + "type": "boolean" + }, + "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": { + "type": "boolean" + }, + "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": { + "type": "boolean" + }, + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": { + "type": "boolean" + }, + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": { + "type": "boolean" + }, + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": { + "type": "boolean" + }, + "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": { + "type": "boolean" + }, + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": { + "type": "boolean" + }, + "TLS_DHE_RSA_WITH_AES_128_CBC_SHA": { + "type": "boolean" + }, + "TLS_DHE_RSA_WITH_AES_256_CBC_SHA": { + "type": "boolean" + }, + "TLS_RSA_WITH_AES_128_GCM_SHA256": { + "type": "boolean" + }, + "TLS_RSA_WITH_AES_256_GCM_SHA384": { + "type": "boolean" + }, + "TLS_RSA_WITH_AES_128_CBC_SHA": { + "type": "boolean" + }, + "TLS_RSA_WITH_AES_256_CBC_SHA": { + "type": "boolean" + }, + "TLS_RSA_WITH_3DES_EDE_CBC_SHA": { + "type": "boolean" + } + } + }, + + "DisableDeveloperTools": { + "type": "boolean" + }, + + "DisableMasterPasswordCreation": { + "type": "boolean" + }, + + "DisablePasswordReveal": { + "type": "boolean" + }, + + "DisableSafeMode": { + "type": "boolean" + }, + + "DisableSecurityBypass": { + "type": "object", + "properties": { + "InvalidCertificate": { + "type": "boolean" + }, + + "SafeBrowsing": { + "type": "boolean" + } + } + }, + + "DisableSystemAddonUpdate": { + "type": "boolean" + }, + + "DisableTelemetry": { + "type": "boolean" + }, + + "DNSOverHTTPS": { + "type": "object", + "properties": { + "Enabled": { + "type": "boolean" + }, + "ProviderURL": { + "type": "URLorEmpty" + }, + "ExcludedDomains": { + "type": "array", + "items": { + "type": "string" + } + }, + "Locked": { + "type": "boolean" + } + } + }, + + "DownloadDirectory": { + "type": "string" + }, + + "Extensions": { + "type": "object", + "properties": { + "Install": { + "type": "array", + "items": { + "type": "string" + } + }, + "Uninstall": { + "type": "array", + "items": { + "type": "string" + } + }, + "Locked": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + + "ExtensionSettings": { + "type": "object", + "properties": { + "*": { + "type": "object", + "properties": { + "installation_mode": { + "type": "string", + "enum": ["allowed", "blocked"] + }, + "allowed_types": { + "type": "array", + "items": { + "type": "string", + "enum": ["extension", "dictionary", "locale", "theme"] + } + }, + "blocked_install_message": { + "type": "string" + }, + "install_sources": { + "type": "array", + "items": { + "type": "string" + } + }, + "restricted_domains": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "patternProperties": { + "^.*$": { + "type": "object", + "properties": { + "installation_mode": { + "type": "string", + "enum": [ + "allowed", + "blocked", + "force_installed", + "normal_installed" + ] + }, + "install_url": { + "type": "string" + }, + "blocked_install_message": { + "type": "string" + }, + "updates_disabled": { + "type": "boolean" + } + } + } + } + }, + + "ExtensionUpdate": { + "type": "boolean" + }, + + "Handlers": { + "type": "object", + "patternProperties": { + "^(mimeTypes|extensions|schemes)$": { + "type": "object", + "patternProperties": { + "^.*$": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": ["saveToDisk", "useHelperApp", "useSystemDefault"] + }, + "ask": { + "type": "boolean" + }, + "handlers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + + "HardwareAcceleration": { + "type": "boolean" + }, + + "InstallAddonsPermission": { + "type": "object", + "properties": { + "Allow": { + "type": "array", + "strict": false, + "items": { + "type": "origin" + } + }, + "Default": { + "type": "boolean" + } + } + }, + + "ManualAppUpdateOnly": { + "type": "boolean" + }, + + "NetworkPrediction": { + "type": "boolean" + }, + + "OfferToSaveLogins": { + "type": "boolean" + }, + + "OfferToSaveLoginsDefault": { + "type": "boolean" + }, + + "PasswordManagerEnabled": { + "type": "boolean" + }, + + "PDFjs": { + "type": "object", + "properties": { + "Enabled": { + "type": "boolean" + }, + "EnablePermissions": { + "type": "boolean" + } + } + }, + + "Preferences": { + "type": "object", + "patternProperties": { + "^.*$": { + "type": ["number", "boolean", "string", "object"], + "properties": { + "Value": { + "type": ["number", "boolean", "string"] + }, + "Status": { + "type": "string", + "enum": ["default", "locked", "user", "clear"] + } + } + } + } + }, + + "PrimaryPassword": { + "type": "boolean" + }, + + "PromptForDownloadLocation": { + "type": "boolean" + }, + + "Proxy": { + "type": "object", + "properties": { + "Mode": { + "type": "string", + "enum": ["none", "system", "manual", "autoDetect", "autoConfig"] + }, + + "Locked": { + "type": "boolean" + }, + + "AutoConfigURL": { + "type": "URLorEmpty" + }, + + "FTPProxy": { + "type": "string" + }, + + "HTTPProxy": { + "type": "string" + }, + + "SSLProxy": { + "type": "string" + }, + + "SOCKSProxy": { + "type": "string" + }, + + "SOCKSVersion": { + "type": "number", + "enum": [4, 5] + }, + + "UseHTTPProxyForAllProtocols": { + "type": "boolean" + }, + + "Passthrough": { + "type": "string" + }, + + "UseProxyForDNS": { + "type": "boolean" + }, + + "AutoLogin": { + "type": "boolean" + } + } + }, + + "RequestedLocales": { + "type": ["string", "array"], + "items": { + "type": "string" + } + }, + + "SearchEngines": { + "enterprise_only": true, + + "type": "object", + "properties": { + "Add": { + "type": "array", + "items": { + "type": "object", + "required": ["Name", "URLTemplate"], + + "properties": { + "Name": { + "type": "string" + }, + "IconURL": { + "type": "URLorEmpty" + }, + "Alias": { + "type": "string" + }, + "Description": { + "type": "string" + }, + "Encoding": { + "type": "string" + }, + "Method": { + "type": "string", + "enum": ["GET", "POST"] + }, + "URLTemplate": { + "type": "string" + }, + "PostData": { + "type": "string" + }, + "SuggestURLTemplate": { + "type": "string" + } + } + } + }, + "Default": { + "type": "string" + }, + "DefaultPrivate": { + "type": "string" + }, + "PreventInstalls": { + "type": "boolean" + }, + "Remove": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + + "SSLVersionMax": { + "type": "string", + "enum": ["tls1", "tls1.1", "tls1.2", "tls1.3"] + }, + + "SSLVersionMin": { + "type": "string", + "enum": ["tls1", "tls1.1", "tls1.2", "tls1.3"] + } + } +} diff --git a/comm/mail/components/enterprisepolicies/schemas/schema.sys.mjs b/comm/mail/components/enterprisepolicies/schemas/schema.sys.mjs new file mode 100644 index 0000000000..671a8cfca1 --- /dev/null +++ b/comm/mail/components/enterprisepolicies/schemas/schema.sys.mjs @@ -0,0 +1,16 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const initialSchema = +#include policies-schema.json + +export let schema = initialSchema; + +export function modifySchemaForTests(customSchema) { + if (customSchema) { + schema = customSchema; + } else { + schema = initialSchema; + } +} |