aboutsummaryrefslogtreecommitdiffstats
path: root/roles/firefox/templates/usr/lib64/firefox/distribution/policies.json.j2
blob: f7d1a22efc7865ad8b871a9e1734475d0f2ad920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
  "policies": {
    "ExtensionSettings": {
      {% for ext in firefox_extensions %}
      {{ ext.id | to_json }}: {
        "install_url": {{ (ext.url if ext.url is defined else 'https://addons.mozilla.org/firefox/downloads/latest/' ~ ext.name ~ '/latest.xpi') | to_json }},
        "installation_mode": {{ ext.mode | default('normal_installed') | to_json }}
      }{% if not loop.last %},{% endif %}

      {% endfor %}
    },
    "3rdparty": {
      "Extensions": {
        {% for ext in firefox_extensions | selectattr('policy', 'defined') %}
        {{ ext.id | to_json }}: {{ ext.policy | to_json }}{% if not loop.last %},{% endif %}

        {% endfor %}
      }
    },
    {% if firefox_disable_user_messaging %}
    "UserMessaging": {
      "WhatsNew": false,
      "ExtensionRecommendations": false,
      "UrlbarInterventions": false,
      "SkipOnboarding": true
    },
    "OverridePostUpdatePage": "",
    "OverrideFirstRunPage": "",
    {% endif %}
    "EnableTrackingProtection": {
      {% for s in ['Value', 'Cryptomining', 'Fingerprinting'] %}
      "{{ s }}": {{ firefox_use_tracking_protection | bool | to_json }},
      {% endfor %}
      "Locked": false
    },
    "Cookies": {
      "Behavior": "{{ firefox_cookie_behavior }}",
      "BehaviorPrivateBrowsing": "{{ firefox_cookie_behavior }}"
    },
    "Authentication": {
      "SPNEGO": {{ firefox_spnego_domains | to_json }},
      "AllowNonFQDN": {
        "SPNEGO": {{ firefox_spnego_allow_non_fqdn | bool | to_json }}
      },
      "AllowProxies": {
        "SPNEGO": {{ firefox_spnego_allow_proxies | bool | to_json }}
      }
    },
    "NoDefaultBookmarks": {{ firefox_disable_default_bookmarks | bool | to_json }},
    "DisablePocket": {{ firefox_disable_pocket | bool | to_json }},
    "DisableAppUpdate": {{ firefox_disable_app_update | to_json }},
    "CaptivePortal": {{ (not firefox_disable_captive_portal) | to_json }},
    "DisableFeedbackCommands": {{ firefox_disable_feedback | bool | to_json }},
    "DisableFirefoxAccounts": {{ firefox_disable_accounts | bool | to_json }},
    "DisableFirefoxStudies": {{ firefox_disable_studies | bool | to_json }},
    "DisableTelemetry": {{ firefox_disable_telemetry | bool | to_json }},
    "DontCheckDefaultBrowser": {{ firefox_disable_default_browser_check | bool | to_json }},
    "OfferToSaveLoginsDefault": {{ firefox_offer_to_save_logins_default | bool | to_json }},
    "DNSOverHTTPS": {
      "Enabled": {{ (not firefox_disable_dns_over_https) | to_json }}
    },
    "SearchSuggestEnabled": {{ (not firefox_disable_search_suggestions) | to_json }},
    "Homepage": {
      "URL": {{ firefox_homepage | to_json }},
      "StartPage": "homepage"
    },
    "FirefoxHome": {
      "Search": true,
      "TopSites": {{ (not firefox_disable_top_sites) | to_json }},
      "SponsoredTopSites": false,
      "Highlights": {{ (not firefox_disable_highlights) | to_json }},
      "Pocket": {{ (not firefox_disable_pocket) | to_json }},
      "SponsoredPocket": {{ (not firefox_disable_pocket) | to_json }},
      "Snippets": {{ (not firefox_disable_snippets) | to_json }}
    },
    {% if firefox_managed_bookmarks %}
    "ManagedBookmarks": [
      {
        "toplevel_name": {{ firefox_managed_bookmarks_top_level_name | to_json }}
      },
      {% for bookmark in firefox_managed_bookmarks %}
      {
        "url": {{ bookmark.url | to_json }},
        "name": {{ bookmark.name | to_json }}
      }{% if not loop.last %},{% endif %}

      {% endfor %}
    ],
    {% endif %}
    "ExtensionUpdate": {{ firefox_update_extensions | bool | to_json }},
    "Preferences": {
      {% for pref in firefox_preferences  %}
      {{ pref.name | to_json }}: {
        "Value": {{ pref.value | to_json }},
        "Status": {{ pref.status | default('default') | to_json }}
      },

      {% endfor %}
      "dom.push.connection.enabled": {
        "Value": {{ (not firefox_disable_push_notifications) | bool | to_json }},
        "Status": "default"
      },
      "privacy.trackingprotection.socialtracking.enabled": {
        "Value": {{ firefox_use_tracking_protection | bool | to_json }},
        "Status": "locked"
      },
      "browser.toolbars.bookmarks.visibility": {
        "Value": "newtab",
        "Status": "default"
      },
      {% for s in ['malware', 'phishing', 'downloads'] %}
      "browser.safebrowsing.{{ s }}.enabled": {
        "Value": {{ (not firefox_disable_safe_browsing) | to_json }},
        "Status": "locked"
      }{% if not loop.last %},{% endif %}

      {% endfor %}
    }
  }
}