在 Exchange 2013 中開發 DLP 原則範本檔案

適用於:Exchange Server 2013

此概觀說明資料遺失防護 (DLP) 原則範本檔案之 XML 架構定義的元件,並提供 XML 格式的範例原則檔案。 開始之前,瞭解整體 DLP 架構和規則開發程式會很有説明。 如需詳細資訊,請 參閱數據外泄防護定義您自己的 DLP 範本和資訊類型

為了使資料遺失防護解決方案更容易採用與管理,Microsoft Exchange Server 2013 會推出稱為 DLP 原則的概念模型與原則範本。 DLP 原則範本為您預期的 DLP 員則提供一個初步設計。 為了提高價值,DLP 原則範本必須概括所有必要的指示詞與資料物件,以符合特定的原則目標,如法規或商業需求。 範本不是環境特定的。 它只是原則的定義或模型,可在產品設定中提供,或由獨立軟體發行者和合作夥伴提供。 DLP 原則對另一方面而言,是專用於部署環境之範本的執行時間實例化。 現有的訊息原則架構可透過使用傳輸規則結合 DLP 原則。 傳輸規則提供了相當大的彈性,適應並表現 DLP 解決方案的豐富性。

原則範本來源與架構

DLP 原則範本通常會受到多個來源的影響,例如以伺服器為基礎的處理指示詞、用戶端電腦原則,或其他如下圖所示的原則建構:

影響原則範本的因素。

簡單的管理作業可透過 Exchange 管理命令介面和以因特網為基礎的介面,例如 Exchange 系統管理中心,以供 DLP 原則範本使用,包括匯入、匯出、刪除和查詢功能。 DLP 原則藉由參照作為建立程序一部分的 DLP 原則範本而建立。 這些參照的 DLP 原則範本可能是安裝在系統中的參照,其儲存在 Active Directory 網域服務中,或是直接從外部提供的原則提供為輸入。

DLP 原則範本會以 XML 文件呈現。 單一 XML 架構會用於 Exchange 中提供的原則,外部也是如此。 XML 文件的概念架構會在下表呈現,其顯示主要元素。 這組原則元件定義可協助您達成特定的原則目標,例如法規或商務需求。

結構化元素 意義與範例
Publisher Microsoft 或協力廠商
版本 15.0.1.0
原則名稱 PCI-DSS
說明 PCI-DSS DLP 原則可協助偵測受限於PCI資料安全性標準 (PCI DSS) 的資訊,包括信用卡或轉帳卡號碼等資訊。 使用此原則並無法確保符合任何法規。 測試完成之後,請在 Exchange 中進行必要的設定變更,讓資訊傳輸符合您組織的原則。 範例包括設定具有已知商務合作夥伴的 TLS,或新增更嚴格的傳輸規則動作,例如將許可權保護新增至包含這種數據類型的訊息。
中繼資料 描述當地法規、國家或地區、關鍵字等等的標籤。
原則建構集合 傳輸規則定義,如條件與動作。
透過互動式通知控制用戶端體驗的電子郵件用戶端行為定義。
組態會選擇性地參照需要配合用戶端特定環境的設定。
資料分類集合 指定分類實體或相似性。
實體有計數與信賴等級;相似性只有信賴等級。
隨附其自己的一套屬性與分類架構。

原則範本格式定義

原則範本是以遵循以下架構的 XML 文件呈現。 請注意,XML 區分大小寫。 例如, dlpPolicyTemplates 會運作,但 DlpPolicyTemplates 無法運作。

<?xml version="1.0" encoding="UTF-8"?>
<dlpPolicyTemplates>
  <dlpPolicyTemplate id="F7C29AEC-A52D-4502-9670-141424A83FAB" mode="Audit" state="Enabled" version="15.0.2.0">
    <contentVersion>4</contentVersion>
    <publisherName>Microsoft</publisherName>
    <name>
      <localizedString lang="en">PCI-DSS</localizedString>
    </name>
    <description>
      <localizedString lang="en">Detects the presence of information subject to Payment Card Industry Data Security Standard (PCI-DSS) compliance requirements.</localizedString>
    </description>
    <keywords></keywords>
    <ruleParameters></ruleParameters>
    <ruleParameters/>
    <policyCommands>
      <!-- The contents below are applied/executed as rules directly in PS - -->
      <commandBlock>
        <![CDATA[ new-transportRule "PCI-DSS: Monitor Payment Card Information Sent To Outside" -DlpPolicy "%%DlpPolicyName%%" -SentToScope NotInOrganization -SetAuditSeverity High -MessageContainsDataClassifications @{Name="Credit Card Number"; MinCount="1" } -Comments "Monitors payment card information sent to outside the organization as part of the PCI-DSS DLP Policy."]]>
      </commandBlock>
      <commandBlock>
        <![CDATA[ new-transportRule "PCI-DSS: Monitor Payment Card Information Sent To Within" -DlpPolicy "%%DlpPolicyName%%" -Comments "Monitors payment card information sent inside the organization as part of the PCI-DSS DLP Policy." -SentToScope InOrganization -SetAuditSeverity Low -MessageContainsDataClassifications @{Name="Credit Card Number"; MinCount="1" } ]]>
      </commandBlock>
    </policyCommands>
    <policyCommandsResources></policyCommandsResources>
  </dlpPolicyTemplate>
</dlpPolicyTemplates>

如果您針對任何元素加入 XML 檔案中的參數含有空格,必須以雙引號包覆該參數,否則會無法正常運作。 在下列範例中,下列 -SentToScope 參數是可接受的,而且不包含雙引號,因為它是一個沒有空格的連續字串。 不過,為 提供的 參數不會 Comments 出現在 Exchange 系統管理中心,因為沒有雙引號,而且其中包含空格。

<CommandBlock><![CDATA[ new-transportRule "PCI-DSS: Monitor Payment Card Information Sent To Within" -DlpPolicy "PCI-DSS" -Comments Monitors payment card information sent inside the organization -SentToScope InOrganization -SetAuditSeverity Low -MessageContainsDataClassifications @{Name="Credit Card Number"; MinCount="1" } ]]> </CommandBlock>

localizedString 元素

範本格式提供在範本中當地語系化字串的功能,可能會呈現給使用者,例如選取要安裝哪些 DLP 原則範本的一部分。 localizedString 元素可用於為「名稱」與「描述」欄位提供多個定義。

ruleParameters 節點

這是建立 DLP 原則以對應至部署特定物件時,必須在範本具現化階段提供的選擇性參數集。 例如,部署中可用的實際通訊群組。

dlpPolicyTemplate 元素

這是 DLP 原則範本的根元素,而且每一個範本皆需要該元素。 下表提供可用屬性:

屬性名稱 必要? 說明
版本 DLP 原則範本文件中使用的版本號碼。
狀態 原則狀態的選用預設組態。
Mode 原則模式的選用預設組態。
識別碼 GUID 可以下列格式唯一識別此 DLP 原則範本定義:"A29C69BF-4F98-47F1-9A99-5771DFD2C27F"。

子項目包含以下元素順序:

子元素 (最小,最大) 說明
PublisherName (1, 1) 範本發行者的元數據
名稱 (1, 1) 此範本的可當地語系化名稱。
說明 (1, 1) 此範本的可當地語系化說明。
關鍵字 (1, 1) 適用於此範本的關鍵字清單。 範本可能會有一個空的關鍵字清單。
RuleParameters (0, 1) 原則定義中使用的範本參數清單。
PolicyCommands (0, 1) 適用於此原則的傳輸規則定義的清單。 這是選用的元素。

DLP 原則範本:原則命令

此部分的原則範本包含用來實例化原則定義之 Exchange 管理命令介面命令的清單。 匯入程式會在具現化程序中執行每個命令。 這裡提供原則命令範例。

<PolicyCommands>
    <!-- The contents below are applied/executed as rules directly in PS - -->
      <CommandBlock> <![CDATA[ new-transportRule "PCI-DSS: Monitor Payment Card Information Sent To Outside" -DlpPolicy "PCI-DSS" -SentToScope NotInOrganization -SetAuditSeverity High -MessageContainsDataClassifications @{Name="Credit Card Number"; MinCount="1" } -Comments "Monitors payment card information sent to outside the organization as part of the PCI-DSS DLP policy."]]></CommandBlock>
      <CommandBlock><![CDATA[ new-transportRule "PCI-DSS: Monitor Payment Card Information Sent To Within" -DlpPolicy "PCI-DSS" -Comments "Monitors payment card information sent inside the organization as part of the PCI-DSS DLP policy." -SentToScope InOrganization -SetAuditSeverity Low -MessageContainsDataClassifications @{Name="Credit Card Number"; MinCount="1" } ]]> </CommandBlock>
  </PolicyCommands>

指令程式的格式是指令程式使用的標準 Exchange 管理命令介面指令程式語法。 命令會依序執行。 每個命令節點都可能包含腳本區塊,該區塊會由多個命令組成。 以下範例說明如何內嵌分類規則套件在 DLP 原則範本中,以及安裝規則套件作為原則建立程序的一部分。 分類規則套件內嵌至原則範本中,然後以參數傳遞至範本中的指令程式:

<CommandBlock>
  <![CDATA[
$rulePack = [system.Text.Encoding]::Unicode.GetBytes('<?xml version="1.0" encoding="utf-8"?>
<rulePackage xmlns="http://schemas.microsoft.com/office/2011/mce">
  <RulePack id="c3f021a3-c265-4dc2-b3a7-41a1800bf518">
    <Version major="1" minor="0" build="0" revision="0"/>
    <Publisher id="e17451d3-9648-4117-a0b1-493a6d5c73ad"/>
    <Details defaultLangCode="en-us">
      <LocalizedDetails langcode="en-us">
        <PublisherName>Contoso</PublisherName>
        <Name>Contoso Sample Rule Pack</Name>
        <Description>This is a sample rule package</Description>
      </LocalizedDetails>
    </Details>
  </RulePack>
  <Rules>
    <Entity id="7cc35258-6b35-4415-baff-a76d1a018980" patternsProximity="300" recommendedConfidence="85" workload="Exchange">
      <Pattern confidenceLevel="85">
        <IdMatch idRef="Regex_Contoso" />
        <Any minMatches="1">
          <Match idRef="Regex_conf" />
        </Any>
      </Pattern>
    </Entity>
    <Regex id="Regex_Contoso">(?i)(\bContoso\b)</Regex>
    <Regex id="Regex_conf">(?i)(\bConfidential\b)</Regex>
    <LocalizedStrings>
      <Resource idRef="7cc35258-6b35-4415-baff-a76d1a018980">
        <Name default="true" langcode="en-us">
          Confidential Information Rule
        </Name>
        <Description default="true" langcode="en-us">
          Sample rule pack - Detects Contoso confidential information
        </Description>
      </Resource>
    </LocalizedStrings>
  </Rules>
</RulePackage>
')
New-ClassificationRuleCollection -FileData $rulePack
New-TransportRule -name "customEntity" -DlpPolicy "%%DlpPolicyName%%" -SentToScope NotInOrganization -MessageContainsDataClassifications @{Name="Confidential Information Rule"} -SetAuditSeverity High]]>
</CommandBlock>

子元素包含以下依序排列的元素。

子元素 (最小,最大) 說明
CommandBlock (1,n) 在 PowerShell 中執行的命令區塊。 依序執行的命令區塊。

相關資訊

資料外洩防護

定義自己的 DLP 範本和資訊類型

從檔案匯入自訂的 DLP 原則範本