Skip to content

Commit

Permalink
Add auto generated documentation about atomic policy groups
Browse files Browse the repository at this point in the history
Bug: 962669
Change-Id: Ie6333108a9bbe06c16eeb3895b17df855b705f4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612103
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Commit-Queue: Yann Dago <ydago@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668579}
  • Loading branch information
Yann Dago authored and Commit Bot committed Jun 12, 2019
1 parent bca679c commit 5d3ecdf
Show file tree
Hide file tree
Showing 17 changed files with 420 additions and 33 deletions.
11 changes: 11 additions & 0 deletions components/policy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import("//tools/grit/grit_rule.gni")

assert(!is_ios, "Policy should not be referenced on iOS")

# To generate policy documentation for local use, set this to true for the
# links between pages and subpages to work.
gen_policy_templates_local = false

# To test policy generation for platforms different than your OS, override and
# enable these flags (but don't check that in!).
gen_policy_templates_common = true
Expand Down Expand Up @@ -192,11 +196,16 @@ action("policy_templates") {
chrome_version_path,
] + grit_defines

if (gen_policy_templates_local) {
args += [ "--local" ]
}
if (gen_policy_templates_common) {
outputs += policy_templates_common_outputs
args += [
"--doc",
rebase_path(policy_templates_doc_path, root_build_dir),
"--doc_atomic_groups",
rebase_path(policy_templates_doc_atomic_groups_path, root_build_dir),
]
}
if (gen_policy_templates_android) {
Expand Down Expand Up @@ -453,6 +462,8 @@ if (gen_policy_templates_zip) {
"--add",
rebase_path(policy_templates_doc_path, root_build_dir),
"--add",
rebase_path(policy_templates_doc_atomic_groups_path, root_build_dir),
"--add",
rebase_path(policy_templates_win_reg_path, root_build_dir),
"--add",
rebase_path(policy_templates_win_adm_path, root_build_dir),
Expand Down
3 changes: 3 additions & 0 deletions components/policy/resources/policy_templates.gni
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ policy_templates_android_outputs = [ policy_templates_android_policy_path ]
# Common outputs.
policy_templates_doc_path =
"$policy_templates_base_dir/common/html/\${lang}/chrome_policy_list.html"
policy_templates_doc_atomic_groups_path =
"$policy_templates_base_dir/common/" +
"html/\${lang}/chrome_policy_atomic_groups_list.html"
policy_templates_common_outputs = []
foreach(lang, policy_templates_languages) {
policy_templates_common_outputs += [
Expand Down
57 changes: 53 additions & 4 deletions components/policy/resources/policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -16195,6 +16195,18 @@ These settings don't need to be configured manually! Easy-to-use templates for W

The recommended way to configure policy on Windows is via GPO, although provisioning policy via registry is still supported for Windows instances that are joined to a <ph name="MS_AD_NAME">Microsoft® Active Directory®</ph> domain.'''
},
'doc_group_intro': {
'desc': '''Introduction text for the generated policy atomic group documentation''',
'text': '''Both Chromium and Google Chrome have some groups of policies that depend on each other to provide control over a feature. These sets are represented by the following policy groups. Given that policies can have multiple sources, only values coming from the highest priority source will be applied. Values coming from a lower priority source in the same group will be ignored. The order of priority is defined in <ph name="POLICY_PRIORITY_DOC_URL">https://support.google.com/chrome/a/?p=policy_order<ex>https://support.google.com/chrome/a/?p=policy_order</ex></ph>.'''
},
'doc_policy_in_atomic_group': {
'desc': '''Label notifying that a policy is part of an atomic policy group''',
'text': '''This policy is part of the following atomic group (only policies from the highest priority source present in the group are applied) :'''
},
'doc_policy_atomic_group': {
'desc': '''Caption text of the 'policy atomic group' in the summary chart of a policy in the generated documentation''',
'text': '''Policy atomic group:'''
},
'doc_back_to_top': {
'desc': '''Text of a link in the generated policy documentation, that takes the user to the top of the page''',
'text': '''Back to top'''
Expand Down Expand Up @@ -16442,6 +16454,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 1,
'name': 'Homepage',
'caption': '''Homepage''',
'policies': [
'HomepageLocation',
'HomepageIsNewTabPage',
Expand All @@ -16452,6 +16465,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 2,
'name': 'RemoteAccess',
'caption': '''Remote access''',
'policies': [
'RemoteAccessClientFirewallTraversal',
'RemoteAccessHostClientDomain',
Expand All @@ -16478,6 +16492,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 3,
'name': 'PasswordManager',
'caption': '''Password manager''',
'policies': [
'PasswordManagerEnabled',
'PasswordManagerAllowShowPasswords',
Expand All @@ -16486,6 +16501,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 4,
'name': 'Proxy',
'caption': '''Proxy''',
'policies': [
'ProxyMode',
'ProxyServerMode',
Expand All @@ -16498,6 +16514,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 5,
'name': 'Extensions',
'caption': '''Extensions''',
'policies': [
'ExtensionInstallBlacklist',
'ExtensionInstallWhitelist',
Expand All @@ -16510,7 +16527,8 @@ The recommended way to configure policy on Windows is via GPO, although provisio
},
{
'id': 6,
'name': 'RestoreOnStartupGroup',
'name': 'RestoreOnStartup',
'caption': '''Action on startup''',
'policies': [
'RestoreOnStartup',
'RestoreOnStartupURLs',
Expand All @@ -16519,6 +16537,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 7,
'name': 'DefaultSearchProvider',
'caption': '''Default search provider''',
'policies': [
'DefaultSearchProviderEnabled',
'DefaultSearchProviderName',
Expand All @@ -16541,6 +16560,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 8,
'name': 'ImageSettings',
'caption': '''Image settings''',
'policies': [
'DefaultImagesSetting',
'ImagesAllowedForUrls',
Expand All @@ -16550,6 +16570,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 9,
'name': 'CookiesSettings',
'caption': '''Cookies settings''',
'policies': [
'DefaultCookiesSetting',
'CookiesAllowedForUrls',
Expand All @@ -16560,6 +16581,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 10,
'name': 'JavascriptSettings',
'caption': '''Javascript settings''',
'policies': [
'DefaultJavaScriptSetting',
'JavaScriptAllowedForUrls',
Expand All @@ -16569,6 +16591,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 11,
'name': 'PluginsSettings',
'caption': '''Plugins settings''',
'policies': [
'DefaultPluginsSetting',
'PluginsAllowedForUrls',
Expand All @@ -16578,6 +16601,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 12,
'name': 'PopupsSettings',
'caption': '''Popups settings''',
'policies': [
'DefaultPopupsSetting',
'PopupsAllowedForUrls',
Expand All @@ -16587,6 +16611,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 13,
'name': 'KeygenSettings',
'caption': '''Keygen settings''',
'policies': [
'DefaultKeygenSetting',
'KeygenAllowedForUrls',
Expand All @@ -16596,6 +16621,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 14,
'name': 'NotificationsSettings',
'caption': '''Notification settings''',
'policies': [
'DefaultNotificationsSetting',
'NotificationsAllowedForUrls',
Expand All @@ -16605,6 +16631,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 15,
'name': 'WebUsbSettings',
'caption': '''Web USB settings''',
'policies': [
'DefaultWebUsbGuardSetting',
'DeviceWebUsbAllowDevicesForUrls',
Expand All @@ -16616,6 +16643,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 16,
'name': 'NativeMessaging',
'caption': '''Native messaging''',
'policies': [
'NativeMessagingBlacklist',
'NativeMessagingWhitelist',
Expand All @@ -16625,6 +16653,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 17,
'name': 'Drive',
'caption': '''Drive''',
'policies': [
'DriveDisabled',
'DriveDisabledOverCellular',
Expand All @@ -16633,6 +16662,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 18,
'name': 'Attestation',
'caption': '''Attestation''',
'policies': [
'AttestationEnabledForDevice',
'AttestationEnabledForUser',
Expand All @@ -16643,6 +16673,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 19,
'name': 'ContentPack',
'caption': '''Content pack''',
'policies': [
'ContentPackDefaultFilteringBehavior',
'ContentPackManualBehaviorHosts',
Expand All @@ -16652,6 +16683,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 20,
'name': 'SupervisedUsers',
'caption': '''Supervised users''',
'policies': [
'SupervisedUsersEnabled',
'SupervisedUserCreationEnabled',
Expand All @@ -16661,6 +16693,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 21,
'name': 'GoogleCast',
'caption': '''Google Cast''',
'policies': [
'CastReceiverEnabled',
'CastReceiverName',
Expand All @@ -16669,6 +16702,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 22,
'name': 'QuickUnlock',
'caption': '''Quick unlock''',
'policies': [
'QuickUnlockModeWhitelist',
'QuickUnlockTimeout',
Expand All @@ -16677,6 +16711,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 23,
'name': 'PinUnlock',
'caption': '''Pin unlock''',
'policies': [
'PinUnlockMinimumLength',
'PinUnlockMaximumLength',
Expand All @@ -16686,6 +16721,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 24,
'name': 'SafeBrowsing',
'caption': '''Safe Browsing settings''',
'policies': [
'SafeBrowsingEnabled',
'SafeBrowsingExtendedReportingEnabled',
Expand All @@ -16696,6 +16732,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 25,
'name': 'PasswordProtection',
'caption': '''Password protection''',
'policies': [
'PasswordProtectionWarningTrigger',
'PasswordProtectionLoginURLs',
Expand All @@ -16705,6 +16742,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 26,
'name': 'NetworkFileShares',
'caption': '''Network File Shares settings''',
'policies': [
'NetworkFileSharesAllowed',
'NetBiosShareDiscoveryEnabled',
Expand All @@ -16715,6 +16753,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 27,
'name': 'ChromeReportingExtension',
'caption': '''Chrome Reporting Extension''',
'policies': [
'ReportVersionData',
'ReportPolicyData',
Expand All @@ -16728,6 +16767,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 28,
'name': 'BrowserSwitcher',
'caption': '''Legacy Browser Support''',
'policies': [
'AlternativeBrowserPath',
'AlternativeBrowserParameters',
Expand All @@ -16746,6 +16786,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 29,
'name': 'PluginVm',
'caption': '''PluginVm''',
'policies': [
'PluginVmAllowed',
'PluginVmLicenseKey',
Expand All @@ -16754,15 +16795,17 @@ The recommended way to configure policy on Windows is via GPO, although provisio
},
{
'id': 30,
'name': 'DeviceSAML',
'name': 'SAML',
'caption': '''SAML''',
'policies': [
'DeviceSamlLoginAuthenticationType',
'DeviceTransferSAMLCookies',
],
},
{
'id': 31,
'name': 'DeviceLoginScreenOrigins',
'name': 'LoginScreenOrigins',
'caption': '''Login and screen origins''',
'policies': [
'DeviceLoginScreenIsolateOrigins',
'DeviceLoginScreenSitePerProcess',
Expand All @@ -16771,6 +16814,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 32,
'name': 'UserAndDeviceReporting',
'caption': '''User and device reporting''',
'policies': [
'ReportDeviceVersionInfo',
'ReportDeviceBootMode',
Expand All @@ -16793,7 +16837,8 @@ The recommended way to configure policy on Windows is via GPO, although provisio
},
{
'id': 33,
'name': 'DeviceWiFi',
'name': 'WiFi',
'caption': '''WiFi''',
'policies': [
'DeviceWiFiFastTransitionEnabled',
'DeviceWiFiAllowed'
Expand All @@ -16802,6 +16847,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 34,
'name': 'Kiosk',
'caption': '''Kiosk settings''',
'policies': [
'DeviceLocalAccounts',
'DeviceLocalAccountAutoLoginId',
Expand All @@ -16813,6 +16859,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 35,
'name': 'DateAndTime',
'caption': '''Date and time''',
'policies': [
'SystemTimezone',
'SystemTimezoneAutomaticDetection',
Expand All @@ -16821,6 +16868,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 36,
'name': 'Display',
'caption': '''Display''',
'policies': [
'DeviceDisplayResolution',
'DisplayRotationDefault',
Expand All @@ -16829,6 +16877,7 @@ The recommended way to configure policy on Windows is via GPO, although provisio
{
'id': 37,
'name': 'ActiveDirectoryManagement',
'caption': '''<ph name="MS_AD_NAME">Microsoft® Active Directory®</ph> management settings''',
'policies': [
'DeviceMachinePasswordChangeRate',
'DeviceUserPolicyLoopbackProcessingMode',
Expand Down
Loading

0 comments on commit 5d3ecdf

Please sign in to comment.