透過 Chrome Enterprise 進階版保護 Cloud Workstations API

總覽

Chrome Enterprise Premium 是 Google 的零信任解決方案,可讓機構員工隨時隨地安全地存取網頁應用程式,無需 VPN,也不必擔心惡意軟體、網路釣魚或資料遺失等威脅。Google Cloud

Chrome Enterprise 進階版搭載 Google Chrome,可讓使用者透過任何裝置存取應用程式。Chrome Enterprise 進階版將擴充功能,解決開發人員環境中的一些重要安全問題。 透過情境感知存取權控管Google Cloud 控制台和 API,Chrome Enterprise Premium 可為 Cloud Workstations API 提供額外安全防護。

下表列出 Chrome Enterprise Premium 是否支援指定 Cloud Workstations 存取方法的脈絡感知存取控制。

  • 勾號表示 Chrome Enterprise 進階版會限制這種 Cloud Workstations 存取方法。
  • 「不支援」圖示表示 Chrome Enterprise Premium 不會限制這種 Cloud Workstations 存取方法。

目標

本文說明管理員如何設定 Cloud Workstations API 的 Chrome Enterprise Premium 存取權控管,以及提供額外機制,協助防止從瀏覽器型 Cloud Workstations IDE 竊取原始碼。

費用

在本教學課程中,您可能需要其他團隊 (例如帳單或 IAM) 的協助,並測試存取權控管,證明 Chrome Enterprise Premium 防護措施已就位。

在本文件中,您會使用 Google Cloud的下列計費元件:

如要根據預測用量估算費用,請使用 Pricing Calculator

初次使用 Google Cloud 的使用者可能符合免費試用資格。

完成本文所述工作後,您可以刪除已建立的資源,避免繼續計費。詳情請參閱清除所用資源一節。

事前準備

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Workstations API.

    Enable the API

  5. Make sure that you have the following role or roles on the project: Cloud Workstations > Cloud Workstations Admin.

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      前往「IAM」頁面
    2. 選取專案。
    3. 按一下 「授予存取權」
    4. 在「New principals」(新增主體) 欄位中,輸入您的使用者 ID。 這通常是 Google 帳戶的電子郵件地址。

    5. 在「Select a role」(選取角色) 清單中,選取角色。
    6. 如要授予其他角色,請按一下 「新增其他角色」,然後新增每個其他角色。
    7. 按一下 [Save]
  6. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  7. Verify that billing is enabled for your Google Cloud project.

  8. Enable the Workstations API.

    Enable the API

  9. Make sure that you have the following role or roles on the project: Cloud Workstations > Cloud Workstations Admin.

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      前往「IAM」頁面
    2. 選取專案。
    3. 按一下 「授予存取權」
    4. 在「New principals」(新增主體) 欄位中,輸入您的使用者 ID。 這通常是 Google 帳戶的電子郵件地址。

    5. 在「Select a role」(選取角色) 清單中,選取角色。
    6. 如要授予其他角色,請按一下 「新增其他角色」,然後新增每個其他角色。
    7. 按一下 [Save]
  10. 請確認您已為每位使用者指派 Chrome Enterprise 進階版標準授權。只有具備授權的使用者會受到存取控制措施的限制。詳情請參閱「指派、移除及重新指派授權」。

  11. 第 1 部分:為 Cloud Workstations 設定 Chrome Enterprise Premium

    本節將逐步說明如何確保情境感知存取權可存取 Cloud Workstations API:

    1. 設定 Cloud Workstations
    2. 建立示範使用者和示範群組
    3. 在 Access Context Manager 中建立存取層級
    4. 啟用 Chrome Enterprise Premium CAA
    5. 新增必要的 Google 群組和存取層級
    6. 測試開發人員對 Cloud Workstations 的存取權

    設定 Cloud Workstations

    如要與 Chrome Enterprise Premium 整合,Cloud Workstations 叢集必須使用 Identity-Aware Proxy (IAP)。如果已設定這些資源,請略過這個部分。

    如要設定 Cloud Workstations,請按照下列步驟操作:

    1. 建立具有自訂網域的工作站叢集
    2. 啟用應用程式內購
    3. 在叢集中建立工作站設定

    如果您是 Cloud Workstations 新手,請參閱總覽架構

    建立示範使用者和示範群組

    在 Google Workspace 管理控制台中,建立示範使用者和新的使用者群組。啟用後,Google Cloud 控制台的情境感知存取權 (CAA) 會套用至所有使用者和 Google 群組,因為這是全域設定。

    1. 使用管理員帳戶登入 Google Workspace 管理控制台: 依序點選「選單」>「目錄」> 「使用者」>「新增使用者」

    2. 建立示範使用者:demo-user@<domain>

    3. 登入 Google Cloud 控制台,然後依序前往「選單」>「IAM 與管理」 >「群組」

    4. 建立 Cloud Workstations 存取權的 IAM 群組,並命名為 Cloud Workstations Users,然後指派先前建立的示範使用者 demo-user@<domain>

    5. 按一下 [儲存]

    6. 此外,請建立 IAM 管理員群組,並命名為「Cloud Admin Users」。 將專案和機構管理員指派給這個群組。

    7. 將示範使用者 demo-user@<domain> 新增至您建立的 Cloud Workstations 使用者群組:

      1. Google Cloud 控制台中,依序前往「Cloud Workstations」>「Workstations」
      2. 選取工作站,然後依序點選「更多」圖示 more_vert「更多」>「新增使用者」
      3. 選取示範使用者 demo-user@<domain>,然後選取 Cloud Workstations User 做為「角色」
      4. 如要授予示範使用者工作站存取權,請選取 demo-user@<domain>,將「角色」設為 Cloud Workstations Users,然後按一下「儲存」

    建立存取層級

    返回 Google Cloud 控制台,在 Access Context Manager 中建立存取層級。

    請按照下列操作說明測試存取權:

    1. Google Cloud 控制台中,依序前往「Security」>「Access Context Manager」,設定公司管理的裝置政策。

    2. 按一下「建立存取層級」,然後填入下列欄位:

      1. 在「Access level title」(存取層級標題) 欄位中輸入 corpManagedDevice
      2. 選取「基本」模式。
      3. 在「條件」下方選取「True」,啟用條件。
      4. 按一下「+ 裝置政策」展開選項,然後勾選「必須使用公司擁有的裝置」
      5. 按一下「儲存」,儲存存取權政策。

    為 Google Cloud 控制台啟用 Chrome Enterprise Premium CAA

    如要將情境感知存取權控管 (CAA) 指派給工作站,請先為控制台啟用 CAA: Google Cloud

    1. 前往 Google Cloud 控制台,依序點選「安全性」>「BeyondCorp Enterprise」

    2. 按一下「管理控制台和 API 的存取權」 Google Cloud 。 這會將您導向 Chrome Enterprise Premium 的「機構層級」頁面。

    3. 在「提供安全使用 Cloud Console 和 API 的功能」 Google Cloud 部分中,按一下「啟用」

    新增具備存取層級的必要 Google 群組

    新增所需管理員群組,並加入相關成員和正確的存取權政策。

    控制台

    1. 建立名為 CloudAdminAccess 的管理員存取政策,並將位置設為管理員的工作區域。確保管理員即使遭到其他政策封鎖,也能存取資源。

    2. 在「IAM 與管理」>「群組」中,建立具有管理員存取權的 IAM 群組。

      1. 選取機構。
      2. 建立群組,並命名為「Cloud Admin Users」
      3. 將自己和其他管理員指派給這個群組。
      4. 按一下 [儲存]
    3. 依序前往「安全性」>「Chrome Enterprise 進階版」。 按一下「管理存取權」,然後查看顯示的群組和存取層級清單。

    4. 按一下「將主體新增至控制台和 API」 Google Cloud

      1. 如果是 Google 網路論壇,請選取「Cloud Admin Users」。這是您在上一個步驟中選取的 Google 群組。
      2. 選取您為管理員存取權建立的存取層級「CloudAdminAccess」CloudAdminAccess
      3. 按一下 [儲存]

    gcloud 和 API

    如要啟用試營運,請按照 Chrome Enterprise Premium 試營運教學課程操作。

    為 Cloud Workstations 使用者群組指派存取層級

    如要為 Cloud Workstations 使用者群組指派存取層級,請按照下列步驟操作:

    1. 依序前往「安全性」>「Chrome Enterprise 進階版」,然後按一下「管理存取權」

    2. 查看畫面上顯示的群組和存取層級清單。

    3. 按一下「將主體新增至控制台和 API」 Google Cloud

      1. 如果是 Google 網路論壇,請選取「Cloud Workstations 使用者」。 這是您在上一個步驟中選取的 Google 群組。
      2. 選取您先前建立的存取層級,corpManagedDevice
      3. 按一下 [儲存]

    測試開發人員對 Cloud Workstations 的存取權

    從多個進入點測試開發人員對 Cloud Workstations API 的存取權。如果是公司擁有的裝置,請確保開發人員可以存取工作站 API。

    • 測試是否禁止從未受管理的裝置存取工作站 API:

      Chrome Enterprise 進階版會封鎖嘗試存取 Cloud Workstations API 的使用者。使用者嘗試登入時,系統會顯示錯誤訊息,告知使用者沒有存取權,或應檢查網路連線和瀏覽器設定。

    • 測試是否已啟用從公司裝置存取工作站 API 的功能:

      開發人員必須具備 Chrome Enterprise 進階版和 Cloud Workstations 存取權,才能建立工作站,然後啟動工作站

    第 2 部分:設定 Chrome Enterprise Premium 資料遺失防護功能

    本節說明如何運用 BeyondCorp Threat and Data Protection 整合資料遺失防護 (DLP) 功能。這有助於防止從 Chrome 瀏覽器型Cloud Workstations 基礎編輯器 (適用於 Cloud Workstations 的 Code OSS) 竊取原始碼。

    請按照下列步驟設定 Chrome Enterprise Premium 資料遺失防護功能,防止使用者下載原始碼:

    1. 啟用威脅和資料保護功能
    2. 建立 BeyondCorp 資料遺失防護規則
    3. 檢查設定並建立規則
    4. 測試資料遺失防護規則

    啟用威脅與資料保護功能

    如要透過 Google Workspace 管理控制台啟用威脅和資料保護功能,請按照下列步驟操作:

    1. 依序前往「裝置」>「Chrome」>「設定」>「使用者和瀏覽器」

    2. 選取機構單位 ID 後,按一下「使用者和瀏覽器設定」下方的「搜尋或新增篩選器」,然後選取「類別」子類型。

    3. 在「類別」子類型中搜尋「Chrome Enterprise 連接器」

    4. 在「下載內容分析」中,選取「Google BeyondCorp Enterprise」

    5. 展開「其他設定」

      1. 選取「待分析完成後才能存取檔案」
      2. 在「檢查機密資料」> 模式中,選取「預設為開啟 (下列網址模式除外)」
    6. 按一下「儲存」,儲存設定。

    建立 Chrome Enterprise Premium 資料遺失防護規則

    如要建立資料遺失防護規則,請按照下列步驟操作:

    1. 前往 Google Workspace 管理控制台,然後依序選取「安全性」>「存取權與資料控管」>「資料保護」>「管理規則」

    2. 如要建立新規則,請依序點選「新增規則」和「建立新規則」。 系統隨即會開啟「名稱和範圍」頁面。

    3. 在「名稱」部分中,輸入名稱和說明。舉例來說,在「Name」(名稱) 欄位中輸入 CloudWorkstations-DLP-Rule1,在「Description」(說明) 欄位中輸入 Cloud Workstations Data Loss Prevention Rule 1

    4. 在「範圍」部分,設定下列項目:

      1. 選取「機構單位和/或群組」
      2. 按一下「包含機構單位」,然後選取機構
      3. 按一下「繼續」
    5. 在「應用程式」部分,設定下列項目:

      1. 在「Chrome」選項中,選取「已上傳檔案」和「已下載檔案」
      2. 按一下「繼續」
    6. 在「條件」頁面中,設定下列項目:

      1. 按一下「新增條件」,即可建立新條件。
      2. 選取「所有內容」
      3. 選取「與預先定義的資料類型相符 (建議)」
      4. 在「選取資料類型」部分,選取「文件 - 原始碼檔案」
      5. 在「可能性門檻」欄位中,選取「高」
      6. 在「不重複相符項目數下限」欄位中輸入「1」
      7. 在「相符項目數下限」欄位中輸入 1
      8. 按一下「繼續」
    7. 在「動作」頁面中,設定下列項目:

      1. 在「動作」選項中,依序選取「Chrome」> 封鎖內容」
      2. 在「Alerting」(快訊) 選項中,設定下列項目:
        • 嚴重性請選取「中」
        • 選取「傳送到快訊中心」
      3. 按一下「繼續」

    檢查設定並建立規則

    在「檢查」頁面中,檢查您在先前頁面中設定的項目:

    1. 確認設定正確無誤。
    2. 如要繼續,請按一下「建立」
    3. 在下一個頁面中,請務必選取「啟用」
    4. 如要完成規則建立程序,請按一下「完成」

    測試資料遺失防護規則

    新增資料遺失防護規則後,您可以在 Chrome 中透過 Cloud Workstations 進行測試:

    1. 在新 Chrome 分頁中輸入 chrome://policy,然後按一下「重新載入政策」,確認 Chrome 政策已更新。

    2. 向下捲動,確認是否看到政策清單。如果看到這些訊息,表示政策已成功下載。在這種情況下,請尋找 OnFileDownloadEnterpriseConnector 政策。

    3. 前往 Google Cloud 控制台,並建立 Cloud Workstations 設定

      建立工作站設定時,請務必選取「使用基本映像檔的程式碼編輯器」,然後選取「Base Editor (Code OSS for Cloud Workstations)」(Cloud Workstations 的基本編輯器 (Code OSS))預先設定的基本映像檔

    4. 建立工作站

    5. 啟動工作站

    6. 啟動工作站並連線至通訊埠 80 後,即可存取 Cloud Workstations 的 Code OSS 網址。

    7. 使用 IDE 中的「Clone Git Repository」選項複製存放區。 複製存放區後,請嘗試下載檔案,內含原始碼

      如要在 Code OSS for Cloud Workstations 探索工具檢視畫面中下載檔案,請使用下列任一方法:

      • 從檔案總管檢視畫面拖曳檔案。

      • 前往要使用的檔案和目錄,按一下滑鼠右鍵,然後選擇「下載」

    8. 下載後,資料遺失防護政策就會生效。您會看到下載遭封鎖的通知,指出不符合貴機構的政策規定:

    恭喜!您已成功防止原始碼檔案遭人下載。

    清除所用資源

    如要避免系統向您的 Google Cloud 帳戶收取本教學課程所用資源的費用,請刪除含有相關資源的專案,或者保留專案但刪除個別資源。詳情請參閱「刪除資源」。

    後續步驟