跨樹系部署宣告 (示範步驟)

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

在本主題中,我們將介紹基本案例,說明如何設定信任與受信任樹系之間的宣告轉換。 您將了解如何建立宣告轉換原則物件,並將其連結至信任樹系和受信任樹系上的信任。 接著,您會驗證該案例。

案例概觀

Adatum Corporation 為 Contoso, Ltd 提供金融服務。每一季,Adatum 會計師都會將其帳戶試算表複製到位於 Contoso, Ltd. 的檔案伺服器上的資料夾中。從 Contoso 到 Adatum 設定了雙向信任。 Contoso, Ltd. 想要保護共用,以便只有 Adatum 員工可以存取遠端共用。

在此情節中:

  1. 設定必要條件和測試環境

  2. 在受信任樹系上設定宣告轉換 (Adatum)

  3. 在信任樹系中設定宣告轉換 (Contoso)

  4. 驗證案例

設定必要條件和測試環境

測試組態涉及設定兩個樹系:Adatum Corporation 和 Contoso, Ltd,以及 Contoso 與 Adatum 之間的雙向信任。 「adatum.com」是受信任樹系,而「contoso.com」是信任樹系。

宣告轉換案例示範將受信任樹系中的宣告轉換為信任樹系中的宣告。 若要執行這項操作,您必須設定名為 adatum.com 的新樹系,並將公司值為「Adatum」的測試使用者填入該樹系。 然後,您必須設定 contoso.com 與 adatum.com 之間的雙向信任。

重要

設定 Contoso 和 Adatum 樹系時,必須確保這兩個根網域都在 Windows Server 2012 網域功能等級,宣告轉換才能正常運作。

您必須為實驗室設定下列內容。 這些程序在附錄 B:設定測試環境中有詳細說明

您必須實作下列程序來設定此案例的實驗室:

  1. 將 Adatum 設定為 Contoso 的受信任樹系

  2. 在 Contoso 上建立「公司」宣告類型

  3. 啟用 Contoso 上的「公司」資源屬性

  4. 建立集中存取規則

  5. 建立集中存取原則

  6. 透過群組原則發佈新的原則

  7. 在檔案伺服器上建立 Earnings 資料夾

  8. 設定分類並將集中存取原則套用到新資料夾

使用下列資訊來完成此案例:

物件 詳細資料
使用者 Jeff Low、Contoso
Adatum 和 Contoso 上的使用者宣告 識別碼:ad://ext/Company:ContosoAdatum,

來源屬性:公司

建議的值:Contoso、Adatum 重要事項:您必須將 Contoso 和 Adatum 上「公司」宣告類型的識別碼設定為相同,宣告轉換才能正常運作。

Contoso 上的集中存取規則 AdatumEmployeeAccessRule
Contoso 上的集中存取原則 僅限 Adatum 存取原則
Adatum 和 Contoso 上的宣告轉換原則 DenyAllExcept 公司
Contoso 上的檔案資料夾 D:\EARNINGS

在受信任的樹系上設定宣告轉換 (Adatum)

在此步驟中,您會在 Adatum 中建立轉換原則,以拒絕將除了「公司」以外的所有宣告傳遞至 Contoso。

Windows PowerShell 的 Active Directory 模組提供 DenyAllExcept 引數,該引數會卸除轉換原則中指定宣告以外的所有內容。

若要設定宣告轉換,您必須建立宣告轉換原則,並在受信任與信任樹系之間進行連結。

在 Adatum 中建立宣告轉換原則

建立轉換原則 Adatum 以拒絕「公司」以外的所有宣告
  1. 以系統管理員身分使用密碼 pass@word1 登入網域控制站 adatum.com。

  2. 在 Windows PowerShell 中開啟提升權限的命令提示字元,並輸入下列內容:

    New-ADClaimTransformPolicy `
    -Description:"Claims transformation policy to deny all claims except Company"`
    -Name:"DenyAllClaimsExceptCompanyPolicy" `
    -DenyAllExcept:company `
    -Server:"adatum.com" `
    
    

在 Adatum 的信任網域物件上設定宣告轉換連結

在此步驟中,您將新建立的宣告轉換原則套用至 Contoso 的 Adatum 信任網域物件。

套用宣告轉換原則
  1. 以系統管理員身分使用密碼 pass@word1 登入網域控制站 adatum.com。

  2. 在 Windows PowerShell 中開啟提升權限的命令提示字元,並輸入下列內容:

    
      Set-ADClaimTransformLink `
    -Identity:"contoso.com" `
    -Policy:"DenyAllClaimsExceptCompanyPolicy" `
    '"TrustRole:Trusted `
    
    

在信任樹系中設定宣告轉換 (Contoso)

在此步驟中,您會在 Contoso 中建立宣告轉換原則 (信任樹系),以拒絕「公司」以外的所有宣告。 您必須建立宣告轉換原則,並將其連結至樹系信任。

在 Contoso 中建立宣告轉換原則

建立轉換原則 Adatum 以拒絕「公司」以外的所有內容
  1. 以系統管理員身分使用密碼 pass@word1 登入網域控制站 contoso.com。

  2. 在 Windows PowerShell 中開啟提升權限的命令提示字元,並輸入下列內容:

    New-ADClaimTransformPolicy `
    -Description:"Claims transformation policy to deny all claims except company" `
    -Name:"DenyAllClaimsExceptCompanyPolicy" `
    -DenyAllExcept:company `
    -Server:"contoso.com" `
    
    

在 Contoso 的信任網域物件上設定宣告轉換連結

在此步驟中,您將新建立的宣告轉換原則套用至 Adatum 的 contoso.com 信任網域物件,以允許將「公司」傳遞至 contoso.com。 信任網域物件命名為 adatum.com。

設定宣告轉換原則
  1. 以系統管理員身分使用密碼 pass@word1 登入網域控制站 contoso.com。

  2. 在 Windows PowerShell 中開啟提升權限的命令提示字元,並輸入下列內容:

    
      Set-ADClaimTransformLink
    -Identity:"adatum.com" `
    -Policy:"DenyAllClaimsExceptCompanyPolicy" `
    -TrustRole:Trusting `
    
    

驗證案例

在此步驟中,您嘗試存取檔案伺服器 FILE1 上設定的 D:\EARNINGS 資料夾,以驗證使用者是否具有共用資料夾的存取權。

確保 Adatum 使用者可以存取共用資料夾

  1. 以 Jeff Low 身分使用密碼 pass@word1 登入用戶端電腦 CLIENT1。

  2. 瀏覽至 \\FILE1.contoso.com\Earnings 資料夾。

  3. Jeff Low 應該能夠存取資料夾。

宣告轉換原則的其他案例

以下是宣告轉換中其他常見案例的清單。

案例 原則
允許來自 Adatum 的所有宣告通過 Contoso Adatum 代碼 -
New-ADClaimTransformPolicy `
-Description:"Claims transformation policy to allow all claims" `
-Name:"AllowAllClaimsPolicy" `
-AllowAll `
-Server:"contoso.com" `
Set-ADClaimTransformLink `
-Identity:"adatum.com" `
-Policy:"AllowAllClaimsPolicy" `
-TrustRole:Trusting `
-Server:"contoso.com" `
拒絕來自 Adatum 的所有宣告通過 Contoso Adatum 代碼 -
New-ADClaimTransformPolicy `
-Description:"Claims transformation policy to deny all claims" `
-Name:"DenyAllClaimsPolicy" `
-DenyAll `
-Server:"contoso.com" `
Set-ADClaimTransformLink `
-Identity:"adatum.com" `
-Policy:"DenyAllClaimsPolicy" `
-TrustRole:Trusting `
-Server:"contoso.com"`
允許來自 Adatum (除了「公司」和「部門」以外) 的所有宣告通過 Contoso Adatum 代碼
- New-ADClaimTransformationPolicy `
-Description:"Claims transformation policy to allow all claims except company and department" `
-Name:"AllowAllClaimsExceptCompanyAndDepartmentPolicy" `
-AllowAllExcept:company,department `
-Server:"contoso.com" `
Set-ADClaimTransformLink `
-Identity:"adatum.com" `
-Policy:"AllowAllClaimsExceptCompanyAndDepartmentPolicy" `
-TrustRole:Trusting `
-Server:"contoso.com" `