blob: 144f134a0b3c638c49f71880895fe796ac9cf951 [file] [log] [blame] [view]
Owen Min326f43e2019-11-13 16:08:301# Policy Settings in Chrome
2
Owen Minf2127ad02019-12-17 19:59:493## Summary
Owen Min326f43e2019-11-13 16:08:304
Owen Minf2127ad02019-12-17 19:59:495Chrome exposes a different set of configurations to administrators. These
6configurations are called policy and they give administrators more advanced
7controls than the normal users. With different device management tools,
Jana Grill5fb69562020-03-09 15:01:118an administrator can deliver these polices to many users. Here is the
Owen Minf2127ad02019-12-17 19:59:499[help center article](https://support.google.com/chrome/a/answer/9037717?hl=en)
10that talks about Chrome policy and its deployment.
Owen Min326f43e2019-11-13 16:08:3011
Owen Minf2127ad02019-12-17 19:59:4912## Do I need a policy
Owen Min326f43e2019-11-13 16:08:3013
Owen Minf2127ad02019-12-17 19:59:4914Usually you need a policy when
15
16- Launching a new feature. Create a policy so that the admin can disable or
17 enable the feature for all users.
18
Jana Grill5fb69562020-03-09 15:01:1119- Deprecating an old feature. Create a policy to give enterprise users more
20 time to migrate away from the feature.
Owen Minf2127ad02019-12-17 19:59:4921
22## Adding a new policy
Owen Min326f43e2019-11-13 16:08:3023
241. Think carefully about the name and the desired semantics of the new policy:
Jana Grill5fb69562020-03-09 15:01:1125 - Choose a name that is consistent with the existing naming scheme. Prefer
Owen Min326f43e2019-11-13 16:08:3026 "XXXEnabled" over "EnableXXX" because the former is more glanceable and
27 sorts better.
28 - Consider the foreseeable future and try to avoid conflicts with possible
29 future extensions or use cases.
30 - Negative policies (*Disable*, *Disallow*) are verboten because setting
31 something to "true" to disable it confuses people.
Owen Minf2127ad02019-12-17 19:59:49322. Declare the policy in the
33 [policy_templates.json](https://cs.chromium.org/chromium/src/components/policy/resources/policy_templates.json)
34 - This file contains meta-level descriptions of all policies and is used
Jana Grill5fb69562020-03-09 15:01:1135 to generate code, policy templates (ADM/ADMX for Windows and the
36 application manifest for Mac), as well as documentation. Please make
37 sure you get the version and feature flags (such as dynamic_refresh and
Owen Minf2127ad02019-12-17 19:59:4938 supported_on) right.
39 - Here are the most used attributes. Please note that, all attributes
Owen Min5d685ceb2020-06-22 23:31:4340 below other than `supported_on`, `future_on' and
41 `default_for_enterprise_users` do not change the code behavior.
42 - `supported_on` and `future_on`: They control the platforms that the
43 policy supports. `supported_on` is used for released platforms with
44 milestone range while `future_on` is used for unreleased platforms.
45 See **Launch a policy** below for more information.
Victor-Gabriel Savu42dcd422020-05-05 12:26:2146 - `default_for_enterprise_users`: Its value is applied as a mandatory
47 policy for managed users on Chrome OS unless a different setting is
48 explicitly set.
Jana Grill5fb69562020-03-09 15:01:1149 - `dynamic_refresh`: It tells the admin whether the policy value can
50 be changed and take effect without re-launching Chrome.
51 - `per_profile`: It tells the admin whether different policy values
52 can be assigned to different profiles.
53 - `can_be_recommended`: It tells the admin whether they can mark the
54 policy as recommended and allow the user to override it in the UI,
55 using a command line switch or an extension.
Owen Minf2127ad02019-12-17 19:59:4956 - The complete list of attributes and their expected values can be found in
57 the
58 [policy_templates.json](https://cs.chromium.org/chromium/src/components/policy/resources/policy_templates.json).
59 - The textual policy description should include the following:
Owen Min326f43e2019-11-13 16:08:3060 - What features of Chrome are affected.
61 - Which behavior and/or UI/UX changes the policy triggers.
62 - How the policy behaves if it's left unset or set to invalid/default
63 values. This may seem obvious to you, and it probably is. However,
64 this information seems to be provided for Windows Group Policy
65 traditionally, and we've seen requests from organizations to
66 explicitly spell out the behavior for all possible values and for
67 when the policy is unset.
Johann48fbca92021-07-16 18:29:4168 - See [description_guidelines.md](description_guidelines.md)
Chris Sharp0f7626d2020-07-27 21:48:1669 for additional guidelines when creating a description, including how
70 various products should be referenced.
Owen Minf2127ad02019-12-17 19:59:49713. Create a preference and map the policy value to it.
72 - All policy values need to be mapped into a prefs value before being used
73 unless the policy is needed before PrefService initialization.
74 - To map the policy:
75 1. Create a prefs and register the prefs in **Local State** or
76 **Profile Prefs**. Please note that, this must match the
77 `per_profile` attribute in the `policy_templates.json`. We also
78 strongly encourage developers to register the prefs with **Profile
Jana Grill5fb69562020-03-09 15:01:1179 Prefs** if possible, because this gives admin more flexibility of
Owen Minf2127ad02019-12-17 19:59:4980 policy setup.
Jana Grill5fb69562020-03-09 15:01:1181 2. Most policies can be mapped to prefs with `kSimplePolicyMap` in
Owen Minf2127ad02019-12-17 19:59:4982 [configuration_policy_handler_list_factory.cc](https://cs.chromium.org/chromium/src/chrome/browser/policy/configuration_policy_handler_list_factory.cc?type=cs&q=kSimplePolicyMap&g=0&l=150).
83 If the policy needs additional verification or processing, please
84 implement a `ConfigurationPolicyHandler` to do so.
85 3. Test the mapping by adding policy to
Alexander Hendrich22dd3f232021-06-22 20:01:1086 [policy_test_cases.json](https://cs.chromium.org/chromium/src/chrome/test/data/policy/policy_test_cases.json?q=policy_test_case) (see [instructions](https://cs.chromium.org/chromium/src/docs/enterprise/policy_pref_mapping_test.md)).
Owen Min90926fc2020-04-23 15:12:0487 4. iOS platform has its own
John Palmer046f9872021-05-24 01:24:5688 [configuration_policy_handler_list_factory.mm](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/policy/configuration_policy_handler_list_factory.mm)
Owen Min90926fc2020-04-23 15:12:0489 and
John Palmer046f9872021-05-24 01:24:5690 [policy_test_cases.json](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/data/policy/policy_test_cases.json)
Owen Min90926fc2020-04-23 15:12:0491 file.
Owen Minf2127ad02019-12-17 19:59:49924. Disable the user setting UI when the policy is applied.
93 - If your feature can be controlled by GUI in `chrome://settings`, the
94 associated option should be disabled when the policy controlling it is
95 managed.
96 - `PrefService:Preference::IsManaged` reveals whether a prefs value
97 comes from policy or not.
98 - The setting needs an
99 [indicator](https://cs.chromium.org/chromium/src/ui/webui/resources/images/business.svg)
100 to tell users that the setting is enforced by the administrator.
1015. Support `dynamic_refresh` if possible.
102 - We strongly encourage developers to make their policies support this
Jana Grill5fb69562020-03-09 15:01:11103 attribute. It means the admin can change the policy value and Chrome
104 will honor the change at run-time without requiring a restart of the
105 browser. Chrome OS does not always support non-dynamic profile policies.
106 Please verify with a Chrome OS policy owner if your profile policy does
107 not support dynamic refresh on Chrome OS.
108 - Most of the time, this requires a
Owen Minf2127ad02019-12-17 19:59:49109 [PrefChangeRegistrar](https://cs.chromium.org/chromium/src/components/prefs/pref_change_registrar.h)
Jana Grill5fb69562020-03-09 15:01:11110 to listen to the preference change notification and update UI or
111 browser behavior right away.
Owen Minf2127ad02019-12-17 19:59:491126. Adding a device policy for Chrome OS.
Jana Grill5fb69562020-03-09 15:01:11113 - Most policies that are used by the browser can be shared between desktop
114 and Chrome OS. However, you need a few additional steps for a device
115 policy on Chrome OS.
Owen Minf2127ad02019-12-17 19:59:49116 - Add a message for your policy in
117 `components/policy/proto/chrome_device_policy.proto`. Please note
118 that all proto fields are optional.
119 - Update
Yeunjoo Choi42f18f82021-07-26 02:18:10120 `chrome/browser/ash/policy/core/device_policy_decoder.{h,cc}`
Owen Minf2127ad02019-12-17 19:59:49121 for the new policy.
1227. Test the policy.
123 - Add a test to verify the policy. You can add a test in
124 `chrome/browser/policy/<area>_policy_browsertest.cc` or with the policy
125 implementation. For example, a network policy test can be put into
126 `chrome/browser/net`. Ideally, your test would set the policy, fire up
127 the browser, and interact with the browser just as a user would do to
128 check whether the policy takes effect.
1298. Manually testing your policy.
Owen Min326f43e2019-11-13 16:08:30130 - Windows: The simplest way to test is to write the registry keys manually
131 to `Software\Policies\Chromium` (for Chromium builds) or
132 `Software\Policies\Google\Chrome` (for Google Chrome branded builds). If
133 you want to test policy refresh, you need to use group policy tools and
134 gpupdate; see
135 [Windows Quick Start](https://www.chromium.org/administrators/windows-quick-start).
136 - Mac: See
137 [Mac Quick Start](https://www.chromium.org/administrators/mac-quick-start)
138 (section "Debugging")
139 - Linux: See
140 [Linux Quick Start](https://www.chromium.org/administrators/linux-quick-start)
141 (section "Set Up Policies")
142 - Chrome OS and Android are more complex to test, as a full end-to-end
143 test requires network transactions to the policy test server.
Jana Grill5fb69562020-03-09 15:01:11144 Instructions on how to set up the policy test server and have the
Owen Min326f43e2019-11-13 16:08:30145 browser talk to it are here:
146 [Running the cloud policy test server](https://www.chromium.org/developers/how-tos/enterprise/running-the-cloud-policy-test-server).
147 If you'd just like to do a quick test for Chrome OS, the Linux code is
148 also functional on CrOS, see
149 [Linux Quick Start](https://www.chromium.org/administrators/linux-quick-start).
Owen Minf2127ad02019-12-17 19:59:491509. If you are adding a new policy that supersedes an older one, verify that the
Owen Min326f43e2019-11-13 16:08:30151 new policy works as expected even if the old policy is set (allowing us to
152 set both during the transition time when Chrome versions honoring the old
153 and the new policies coexist).
Owen Minf2127ad02019-12-17 19:59:4915410. If your policy has interactions with other policies, make sure to document,
Owen Min326f43e2019-11-13 16:08:30155 test and cover these by automated tests.
156
Owen Min5d685ceb2020-06-22 23:31:43157## Launch a policy
1581. When adding a new policy, put the platforms it will be supported in the
159 `future_on` list.
160 - The policy is hidden from any auto-generated template or documentation on
161 those platforms.
162 - The policy will also be unavailable on Beta and Stable channel unless it's
163 enabled specifically by
164 [EnableExperimentalPolicies](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=EnableExperimentalPolicies)
165 policy.
1662. Implement the policy, get launch approval if necessary.
1673. If the policy needs to be tested with small set of users first, keep the
168 platforms in the `future_on` list and running the tester program with the
169 [EnableExperimentalPolicies](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=EnableExperimentalPolicies)
170 policy.
1714. Move the launched platforms from `future_on` to `supported_on` and set the
172 'since_version' of those platforms to the milestone for which the launch
173 approval was granted.
1745. If the 'since_version' is set to a earlier milestone, you need to merge
175 back all necessary commits.
176
177**Do not use finch to control policy launch process.**
178
179Policies are inherently switches that admins will turn on if they need. Getting
180inconsistent behavior based on factors outside of their control only causes
181confusion and is source for support requests. Use the step 3 above if the policy
182needs external testers before being officially announced.
183
Chris Sharp4a429b02020-08-04 15:57:22184## Deprecating a policy
185
186A policy is deprecated when admins should stop using it. This is often because
187a new policy was been released that should be used instead.
188
189When marking a policy as deprecated, it still needs to work the same as before
190in Chrome. If you wish to remove the functionality, you'll need to changed the
191supported_on field. See "Removing support for a policy" below for more details.
192
193### Steps
1941. Update policy_templates.json, marking the policy as deprecated and updating
195 the description to describe when and why the policy as deprecated and what
196 admins should be doing instead.
1971. Update the policy handling code. This is generally ensuring that if the old
198 policy is set, the values are propagated to the new policies if they were
199 unset.
2001. Notify [email protected] to ensure this deprecation is
201 mentioned in the enterprise release notes.
202
203## Removing support for a policy
204
205Generally speaking, policies shouldn't be removed from Chrome. Although they can
206be deprecated fairly easily, removing support for a policy is a much bigger
207issue, because admins might be relying on that functionality.
208
209The two main reasons for removing support for a policy are:
2101. It was a policy that was always documented as having a limited lifespan,
211 such as an escape hatch policy.
2121. The feature this policy impacts was removed from Chrome.
213
214If the policy was never launched, it can also be deleted from
215policy_templates.json instead of just being marked as no longer supported.
216In this case, please remember to add the deleted id to deleted_policy_ids.
217
Owen Minf18a1ae2021-07-06 20:30:17218If you want to remove support for another reason, please reach out to someone in
219[ENTERPRISE_POLICY_OWNERS](https://cs.chromium.org/chromium/src/components/policy/resources/ENTERPRISE_POLICY_OWNERS)
Chris Sharp4a429b02020-08-04 15:57:22220to ensure this is okay. The general preference is to leave policies as
221deprecated, but still supported.
222
223When removing support for a policy, update `supported_on` to correctly list the
224last milestone the policy is supported on. Please also set 'deprecated' to True
225if the policy skipped past the deprecation state.
226
227### Steps
2281. Update policy_templates.json, marking the policy as no longer supported.
229 Also marking as deprecated if not previously done.
Owen Minf18a1ae2021-07-06 20:30:172301. Update the related test in the `policy_test_cases.json`.
231 - If the policy is going to be removed in the current milestone, remove the
232 the test at the same time.
233 - If the policy is going to be removed in the future milestone, remove the
234 test **after** policy support ended.
Chris Sharp4a429b02020-08-04 15:57:222351. Remove the policy handling code.
2361. Notify [email protected] to ensure this removal of support is
237 mentioned in the enterprise release notes.
238
Owen Min326f43e2019-11-13 16:08:30239## Examples
240
Jana Grill5fb69562020-03-09 15:01:11241Here is an example based on the instructions above. It's a good, simple place to
Owen Minf2127ad02019-12-17 19:59:49242get started:
243[https://chromium-review.googlesource.com/c/chromium/src/+/1742209](https://chromium-review.googlesource.com/c/chromium/src/+/1742209)
244
Owen Min326f43e2019-11-13 16:08:30245
246## Modifying existing policies
247
248If you are planning to modify an existing policy, please send out a one-pager to
249client- and server-side stakeholders explaining the planned change.
250
251There are a few noteworthy pitfalls that you should be aware of when updating
Jana Grill5fb69562020-03-09 15:01:11252the code that handles existing policy settings, in particular:
Owen Min326f43e2019-11-13 16:08:30253
Jana Grill5fb69562020-03-09 15:01:11254- Make sure the policy metadata is up-to-date, in particular `supported_on`, and
Owen Min326f43e2019-11-13 16:08:30255the feature flags.
Owen Minf2127ad02019-12-17 19:59:49256- In general, don't change policy semantics in a way that is incompatible
Owen Min326f43e2019-11-13 16:08:30257(as determined by user/admin-visible behavior) with previous semantics. **In
258particular, consider that existing policy deployments may affect both old and
259new browser versions, and both should behave according to the admin's
260intentions**.
261- **An important pitfall is that adding an additional allowed
262value to an enum policy may cause compatibility issues.** Specifically, an
263administrator may use the new policy value, which makes older Chrome versions
Jana Grill5fb69562020-03-09 15:01:11264that may still be deployed (and don't understand the new value) fall back to
Owen Min326f43e2019-11-13 16:08:30265the default behavior. Carefully consider if this is OK in your case. Usually,
266it is preferred to create a new policy with the additional value and deprecate
267the old one.
268- Don't rely on the cloud policy server for policy migrations because
269this has been proven to be error prone. To the extent possible, all
270compatibility and migration code should be contained in the client.
271- It is OK to expand semantics of policy values as long as the previous policy
272description is compatible with the new behavior (see the "extending enum"
273pitfall above however).
274- It is OK to update feature implementations and the policy
275description when Chrome changes as long as the intended effect of the policy
276remains intact.
277- The process for removing policies is to deprecate them first,
278wait a few releases (if possible) and then drop support for them. Make sure you
279put the deprecated flag if you deprecate a policy.
280
Tien Maiad5a9ab2019-11-28 16:02:35281### Presubmit Checks when Modifying Existing Policies
282
283To enforce the above rules concerning policy modification and ensure no
Jana Grill5fb69562020-03-09 15:01:11284backwards incompatible changes are introduced, presubmit checks
285will be performed on every change to
Owen Minf2127ad02019-12-17 19:59:49286[policy_templates.json](https://cs.chromium.org/chromium/src/components/policy/resources/policy_templates.json).
Tien Maiad5a9ab2019-11-28 16:02:35287
288The presubmit checks perform the following verifications:
289
Jana Grill5fb69562020-03-09 15:01:112901. It verifies whether a policy is considered **unreleased** before allowing a
291 change. A policy is considered unreleased if **any** of the following
Tien Maiad5a9ab2019-11-28 16:02:35292 conditions are true:
293
Jana Grill5fb69562020-03-09 15:01:11294 1. It is an unchanged policy marked as `future: true`.
Owen Minf2127ad02019-12-17 19:59:49295 2. All the `supported_versions` of the policy satisfy **any** of the
Tien Maiad5a9ab2019-11-28 16:02:35296 following conditions
297 1. The unchanged supported major version is >= the current major
298 version stored in the VERSION file at tip of tree. This covers the
Jana Grill5fb69562020-03-09 15:01:11299 case of a policy that has just recently been added, but has not yet
Tien Maiad5a9ab2019-11-28 16:02:35300 been released to a stable branch.
301 2. The changed supported version == unchanged supported version + 1 and
302 the changed supported version is equal to the version stored in the
303 VERSION file at tip of tree. This check covers the case of
Jana Grill5fb69562020-03-09 15:01:11304 "unreleasing" a policy after a new stable branch has been cut, but
Tien Maiad5a9ab2019-11-28 16:02:35305 before a new stable release has rolled out. Normally such a change
306 should eventually be merged into the stable branch before the
307 release.
Owen Min5d685ceb2020-06-22 23:31:43308 3. `supported_on` list is empty.
Tien Maiad5a9ab2019-11-28 16:02:35309
Jana Grill5fb69562020-03-09 15:01:113102. If the policy is considered **unreleased**, all changes to it are allowed.
Tien Maiad5a9ab2019-11-28 16:02:35311
Jana Grill5fb69562020-03-09 15:01:113123. However if the policy is released then the following verifications
Tien Maiad5a9ab2019-11-28 16:02:35313 are performed on the delta between the original policy and the changed
314 policy.
315
316 1. Released policies cannot be removed.
Owen Minf2127ad02019-12-17 19:59:49317 2. Released policies cannot have their type changed (e.g. from bool to
Tien Maiad5a9ab2019-11-28 16:02:35318 Enum).
Owen Minf2127ad02019-12-17 19:59:49319 3. Released policies cannot have the `future: true` flag added to it. This
Tien Maiad5a9ab2019-11-28 16:02:35320 flag can only be set on a new policy.
Owen Minf2127ad02019-12-17 19:59:49321 4. Released policies can only add additional `supported_on` versions. They
Tien Maiad5a9ab2019-11-28 16:02:35322 cannot remove or modify existing values for this field except for the
323 special case above for determining if a policy is released. Policy
Owen Minf2127ad02019-12-17 19:59:49324 support end version (adding "-xx" ) can however be added to the
Tien Maiad5a9ab2019-11-28 16:02:35325 supported_on version to specify that a policy will no longer be
Owen Minf2127ad02019-12-17 19:59:49326 supported going forward (as long as the initial `supported_on` version
327 is not changed).
Tien Maiad5a9ab2019-11-28 16:02:35328 5. Released policies cannot be renamed (this is the equivalent of a
Owen Minf2127ad02019-12-17 19:59:49329 delete + add).
330 6. Released policies cannot change their `device_only` flag. This flag can
Tien Maiad5a9ab2019-11-28 16:02:35331 only be set on a new policy.
332 7. Released policies with non dict types cannot have their schema changed.
333 1. For enum types this means values cannot be renamed or removed (these
334 should be marked as deprecated instead).
335 2. For int types, we will allow making the minimum and maximum values
336 less restrictive than the existing values.
Owen Minf2127ad02019-12-17 19:59:49337 3. For string types, we will allow the removal of the "pattern"
Tien Maiad5a9ab2019-11-28 16:02:35338 property to allow the validation to be less restrictive.
339 4. We will allow addition to any list type values only at the end of
340 the list of values and not in the middle or at the beginning (this
341 restriction will cover the list of valid enum values as well).
342 5. These same restrictions will apply recursively to all property
343 schema definitions listed in a dictionary type policy.
Jana Grill5fb69562020-03-09 15:01:11344 8. Released dict policies cannot remove or modify any existing keys in
Tien Maiad5a9ab2019-11-28 16:02:35345 their schema. They can only add new keys to the schema.
Owen Minf2127ad02019-12-17 19:59:49346 1. Dictionary policies can have some of their "required" fields removed
Tien Maiad5a9ab2019-11-28 16:02:35347 in order to be less restrictive.
348
Owen Min5d685ceb2020-06-22 23:31:433494. A policy is **partially released** if both `supported_on` and
350 `future_on` list are not empty.
351
3525. The **partially released** policy is considered as a **released** policy
353 and only the `future_on` list can be modified freely. However, any
354 platform in the `supported_on` list cannot be moved back to the `future_on`
355 list.
356
357
Owen Mine6533d72019-12-19 03:55:21358## Cloud Policy
359
Jana Grill5fb69562020-03-09 15:01:11360**For Googlers only**: The Cloud Policy will be maintained by the Admin console
361team.
362[See instructions here](https://docs.google.com/document/d/1QgDTWISgOE8DVwQSSz8x5oKrI3O_qAvOmPryE5DQPcw/edit?usp=sharing)
363on how to update the Cloud Policy.
Owen Mine6533d72019-12-19 03:55:21364
Owen Minf2127ad02019-12-17 19:59:49365## Post policy update
Owen Min326f43e2019-11-13 16:08:30366
Jana Grill5fb69562020-03-09 15:01:11367Once the policy is added or modified, nothing else needs to be taken
368care of by the Chromium developers. However, there are a few things that will be
369updated based on the json file. Please note that there is no ETA for
Owen Minf2127ad02019-12-17 19:59:49370everything listed below.
Owen Min326f43e2019-11-13 16:08:30371
Owen Minf2127ad02019-12-17 19:59:49372* [Policy templates](https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip)
373 will be updated automatically.
374* [Policy documentation](https://cloud.google.com/docs/chrome-enterprise/policies/)
375 will be updated automatically.
Owen Min326f43e2019-11-13 16:08:30376
Victor-Gabriel Savu42dcd422020-05-05 12:26:21377## Targeting features at commercial users
378
379The recommended method to target commercial users is to create a policy to
380control the behavior of a feature. You can for example create a feature only
381for consumer users by setting `default_for_enterprise_users` to false; however,
382it should only be used when the default enterprise behavior should be different
383than regular consumer behavior.
384
Owen Minf2127ad02019-12-17 19:59:49385------
Owen Min326f43e2019-11-13 16:08:30386
Owen Minf2127ad02019-12-17 19:59:49387### Additional Notes
Owen Min326f43e2019-11-13 16:08:30388
Owen Min5d685ceb2020-06-22 23:31:433891. policy_templates.json is actually a Python dictionary even though the file
390 name contains *json*.
3912. The `future_on` flag can disable policy on Beta of Stable channel only if the
392 policy value is copied to `PrefService` in Step 3 of **Adding a new policy**.