Policy API 概念

本文件說明 Cloud Identity Policy API 的概念和策略。

減少

如要列出及取得政策,請參閱「設定 Policy API」和「列出及取得政策」。

術語

  • 設定值:政策中提供的設定值

  • 縮減設定值:套用至目標 (例如使用者、機構單位或群組) 的最終設定值

  • 縮減:將政策的設定值縮減為目標 (例如使用者、機構單位或群組) 的單一設定值

  • 縮減器:這類規則會決定如何將政策設定值簡化為單一使用者設定

  • 管理員政策:管理員在管理控制台中建立的政策

  • 系統政策:Google Workspace 提供的政策

減少程序

如要降低特定使用者的特定設定,請按照下列步驟操作:

  1. 篩除不適用於使用者的所有政策。

    1. 篩除不含該設定的政策。

    2. 篩除不適用於目標使用者所屬機構單位的政策。

    3. 篩除套用至目標使用者不在的群組的政策。

    4. 篩除適用於目標使用者沒有的授權的政策。如要進一步瞭解授權,請參閱「授權」一節。

  2. 套用指定設定的 Reducer

    • 最大值:針對縮減設定中的每個欄位,最大值縮減器會從 sortOrder 最大的政策中選擇值。

    • 合併:針對縮減設定中的每個欄位,合併縮減器會從具有該欄位值的政策中,選擇 sortOrder 值最大的政策。如果欄位是陣列,合併縮減器會改為串連所有政策的值。

    • MaxMap:MaxMap 縮減器適用於陣列項目具有做為主鍵的欄位設定。MaxMap 縮減器不會串連具有相同主鍵的陣列項目。而是會使用 Max reducer,更新陣列項目中與相同主鍵共用的其他欄位。

    • MergeMap:MergeMap 縮減器用於陣列項目具有做為主鍵的欄位時。MergeMap 縮減器不會串連具有相同主鍵的陣列項目。而是使用 Merge reducer,更新陣列項目中具有相同主鍵的其他欄位。

    • 清單:這些設定不會減少為單一設定。而是會保留整個設定序列,並以清單形式套用。

設定的 Reducer

設定名稱 Reducer
drive_and_docs.external_sharing Max
drive_and_docs.general_access_default Max
drive_and_docs.shared_drive_creation Max
drive_and_docs.file_security_update Max
drive_and_docs.drive_sdk 合併
drive_and_docs.drive_for_desktop Max
gmail.confidential_mode Max
gmail.enhanced_smime_encryption Max
gmail.enhanced_pre_delivery_message_scanning Max
gmail.email_spam_filter_ip_allowlist Max
gmail.spoofing_and_authentication Max
gmail.links_and_external_images Max
gmail.email_attachment_safety Max
gmail.email_address_lists MaxMap
gmail.blocked_sender_lists MaxMap
gmail.spam_override_lists MaxMap
gmail.content_compliance MaxMap
gmail.objectionable_content MaxMap
gmail.attachment_compliance MaxMap
gmail.comprehensive_mail_storage Max
gmail.rule_states MaxMap
gmail.user_email_uploads Max
gmail.pop_access Max
gmail.imap_access 合併
gmail.workspace_sync_for_outlook Max
gmail.auto_forwarding Max
gmail.name_format 合併
gmail.per_user_outbound_gateway Max
gmail.email_image_proxy_bypass 合併
gmail.mail_delegation 合併
chat.chat_history 合併
chat.chat_file_sharing Max
chat.space_history Max
chat.external_chat_restriction 合併
chat.chat_apps_access Max
sites.sites_creation_and_modification Max
groups_for_business.groups_sharing 合併
cloud_sharing_options.cloud_data_sharing Max
classroom.teacher_permissions Max
classroom.guardian_access Max
classroom.class_membership Max
classroom.api_data_access Max
classroom.originality_reports Max
classroom.roster_import Max
classroom.student_unenrollment Max
calendar.appointment_schedules Max
calendar.external_invitations Max
calendar.interoperability 合併
calendar.primary_calendar_max_allowed_external_sharing 合併
calendar.secondary_calendar_max_allowed_external_sharing 合併
meet.safety_domain Max
meet.safety_access Max
meet.safety_host_management Max
meet.video_recording Max
meet.safety_external_participants Max
security.super_admin_account_recovery 合併
security.user_account_recovery 合併
security.password Max
security.session_controls Max
security.less_secure_apps 合併
security.login_challenges Max
security.advanced_protection_program Max
security.two_step_verification_enrollment Max
security.two_step_verification_enforcement Max
security.two_step_verification_grace_period Max
security.two_step_verification_device_trust Max
security.two_step_verification_enforcement_factor Max
security.two_step_verification_sign_in_code Max
user_takeout Max
workspace_marketplace.apps_access_options 合併
workspace_marketplace.apps_allowlist MergeMap (主鍵為:application_id)
SERVICE_STATUS_APP_NAME.service_status Max
rule.dlp List
rule.system_defined_alerts List
detector.regular_expression List
detector.word_list List

授權

系統會根據使用者的 Workspace 授權,套用適用的政策。授權條件請參閱 PolicyQuery

如需所有 Workspace 產品和 SKU ID 的完整清單,請參閱「Google 產品和 SKU ID」。

以下範例說明如何根據使用者授權,對特定使用者群組套用政策。

範例 1:僅限一般條款

entity.licenses.exists(license, license in ['/product/Google-Apps/sku/1010020027'])

如果使用者擁有清單中至少一個 SKU 的授權,這項政策就會套用至該使用者。

範例 2:一般子句和反向子句

entity.licenses.exists(license, license in ['/product/Google-Apps/sku/1010020027']) && !entity.licenses.exists(license, license in ['/product/Google-Apps/sku/1010060005'])

如果使用者擁有第一條款中至少一個 SKU 的授權,這項政策就適用於該使用者。不過,如果使用者擁有第二條款中任一 SKU 的授權,這項政策就不適用於該使用者。

範例 3:僅限倒裝子句

!entity.licenses.exists(license, license in ['/product/Google-Apps/sku/1010060005'])

如果使用者沒有清單中任何 SKU 的授權,這項政策就會套用至該使用者。

預設欄位值

如果「減少設定」中沒有某個欄位,則預設值如下:

設定名稱 欄位 預設欄位值
chat.chat_history enable_chat_history false
history_on_by_default false
allow_user_modification true
chat.external_chat_restriction allow_external_chat false
external_chat_restriction NO_RESTRICTION
chat.chat_apps_access enable_apps true,非教育機構 SKU 則為 false。教育版 SKU:
  • /product/Google-Apps/sku/Google-Apps-For-Education
  • /product/Google-Apps/sku/1010310002
  • /product/Google-Apps/sku/1010310003
  • /product/Google-Apps/sku/1010310005
  • /product/Google-Apps/sku/1010310006
  • /product/Google-Apps/sku/1010310007
  • /product/Google-Apps/sku/1010310008
  • /product/Google-Apps/sku/1010310009
  • /product/Google-Apps/sku/1010310010
  • /product/Google-Apps/sku/1010460001
  • /product/Google-Apps/sku/1010460002
enable_webhooks true,非教育機構 SKU 則為 false。教育版 SKU:
  • /product/Google-Apps/sku/Google-Apps-For-Education
  • /product/Google-Apps/sku/1010310002
  • /product/Google-Apps/sku/1010310003
  • /product/Google-Apps/sku/1010310005
  • /product/Google-Apps/sku/1010310006
  • /product/Google-Apps/sku/1010310007
  • /product/Google-Apps/sku/1010310008
  • /product/Google-Apps/sku/1010310009
  • /product/Google-Apps/sku/1010310010
  • /product/Google-Apps/sku/1010460001
  • /product/Google-Apps/sku/1010460002
gmail.user_email_uploads enable_mail_and_contacts_import false
gmail.email_image_proxy_bypass image_proxy_bypass_pattern [] 空清單
enable_image_proxy true
gmail.workspace_sync_for_outlook enable_google_workspace_sync_for_microsoft_outlook true
gmail.email_spam_filter_ip_allowlist allowed_ip_addresses [] 空清單
gmail.links_and_external_images apply_future_settings_automatically true
enable_aggressive_warnings_on_untrusted_links false
gmail.spoofing_and_authentication apply_future_settings_automatically true
gmail.auto_forwarding enable_auto_forwarding true
drive_and_docs.external_sharing external_sharing_mode ALLOWED
allow_receiving_external_files true
warn_for_sharing_outside_allowlisted_domains true
allow_non_google_invites_in_allowlisted_domains false
allow_receiving_files_outside_allowlisted_domains true
warn_for_external_sharing true
allow_non_google_invites true
allow_publishing_files true
access_checker_suggestions RECIPIENTS_OR_AUDIENCE_OR_PUBLIC
allowed_parties_for_distributing_content ALL_ELIGIBLE_USERS
drive_and_docs.drive_sdk enable_drive_sdk_api_access true
drive_and_docs.general_access_default default_file_access LINK_SHARING_PRIVATE
security.user_account_recovery enable_account_recovery false
security.super_admin_account_recovery enable_account_recovery false
security.less_secure_apps allow_less_secure_apps false
security.two_sv_enrollment allow_enrollment true
security.two_sv_device_trust allow_trusting_device true
security.two_sv_enforcement_factor allowed_sign_in_factor_set ALL
workspace_marketplace.apps_access_options access_level 幼兒園到高中客戶:ALLOW_NONE 其他客戶:ALLOW_ALL
allow_all_internal_apps false
workspace_marketplace.apps_allowlist 應用程式 [] 空清單
groups_for_business.groups_sharing collaboration_capability DOMAIN_USERS_ONLY
create_groups_access_level USERS_IN_DOMAIN
view_topics_default_access_level DOMAIN_USERS
owners_can_allow_external_members false
owners_can_allow_incoming_mail_from_public true
owners_can_hide_groups false
new_groups_are_hidden false
calendar.external_invitations warn_on_invite true
calendar.primary_calendar_max_allowed_external_sharing max_allowed_external_sharing EXTERNAL_FREE_BUSY_ONLY
calendar.secondary_calendar_max_allowed_external_sharing max_allowed_external_sharing EXTERNAL_ALL_INFO_READ_ONLY

系統群組

系統政策可連結的 Google 系統群組,不會顯示在 Directory API 中。

GroupId 說明
WORKSPACE_ALL_ADMIN_GROUP Google 系統政策群組,可對所有管理員強制執行兩步驟驗證。