建立 Sensitive Data Protection 檢查範本

本快速入門導覽課程說明如何在 Google Cloud 控制台中,建立及使用 Sensitive Data Protection 檢查範本。Sensitive Data Protection 檢查範本可讓您在 Sensitive Data Protection 中建立及保留設定資訊。

如要完成本快速入門導覽,您必須擁有可掃描的資料,並儲存在 Cloud Storage、BigQuery 或 Datastore 模式的 Firestore (Datastore)。


如要直接在 Google Cloud 控制台中,按照這項工作的逐步指南操作,請按一下「Guide me」(逐步引導):

「Guide me」(逐步引導)


事前準備

  1. 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自評估產品在實際工作環境中的成效。新客戶還能獲得價值 $300 美元的免費抵免額,可用於執行、測試及部署工作負載。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  6. 如果尚未啟用,請啟用 Sensitive Data Protection API。

    啟用 API 時所需的角色

    如要啟用 API,您必須具備 serviceusage.services.enable 權限。如果您建立了專案,可能已透過「擁有者」角色 (roles/owner) 取得這項權限。否則,您可以透過「服務使用情形管理員」角色 (roles/serviceusage.serviceUsageAdmin) 取得這項權限。瞭解如何授予角色。

    啟用 API

建立範本

在接下來的章節中,您將設定及建立檢查範本。

定義範本

  1. 在 Google Cloud 控制台的 Sensitive Data Protection 專區中,前往「建立範本」頁面。

    前往「建立範本」

  2. 在「Create template」(建立範本) 頁面中定義下列選項:

    • 在「範本類型」部分,請使用預設設定「檢查 (搜尋機密資料)」。

    • 在「範本 ID」中輸入 quickstart-template。

    • 在「Display name」(顯示名稱) 中輸入 Quickstart template。

    • 將「說明」部分留空。

    • 在「Resource location」(資源位置) 中使用預設設定「Global (any region)」(全域 (任何地區))。

  3. 按一下「繼續」。

設定偵測作業

現在請設定範本,偵測信用卡號碼等 infoType。

  1. 在「建立範本」頁面的「設定偵測」部分,執行下列操作:

    • 在「InfoTypes」(infoType) 專區中,按一下「Manage infoTypes」(管理 infoType),選取要掃描的 infoType,然後按一下「Done」(完成)。

    • 在「可信度門檻」部分,從「可能性」清單中選取「有可能」。

      在大多數情況下,預設值「可能」就已足夠。如果使用這個範本時,您經常獲得過於廣泛的相符結果,請向上移動滑桿。如果配對結果太少,請將滑桿向下移動。

  2. 如要建立範本,請按一下「建立」。

    接著就會出現範本的摘要資訊頁面。如要返回主要的 Sensitive Data Protection 頁面,請按一下「檢查範本詳細資料」。

使用範本

下列步驟說明如何設定範本,以便用於掃描:

  1. 前往 Google Cloud 控制台的「Create job or job trigger」(建立工作或工作觸發條件) 頁面。

    前往「建立工作或工作觸發條件」

  2. 按照提示建立檢查工作或工作觸發條件 (週期性工作)。系統提示您設定偵測功能時,請選取您建立的範本。

清除所用資源

為了避免系統向您的 Google Cloud 帳戶收取本頁面所用資源的費用,請按照下列步驟操作。

刪除專案

如要避免付費,最簡單的方法就是刪除您為了本教學課程所建立的專案。

刪除專案的方法如下:

  1. 前往 Google Cloud 控制台的「Manage resources」(管理資源) 頁面。

    前往「Manage resources」(管理資源)

  2. 在專案清單中選取要刪除的專案,然後點選「Delete」(刪除)。
  3. 在對話方塊中輸入專案 ID,然後按一下 [Shut down] (關閉) 以刪除專案。

刪除範本

建立及儲存範本不會產生任何費用。不過,如要刪除範本,請按照下列步驟操作:

  1. 在 Google Cloud 控制台中,前往 Sensitive Data Protection 的「Configuration」(設定) 分頁。

    前往「設定」

  2. 選取要刪除檢查範本的專案。

  3. 在「設定」分頁中,點按「範本」子分頁。 Google Cloud 控制台隨即會顯示目前專案的所有範本清單。

  4. 在「Actions」(動作) 欄中找到要刪除的範本,按一下觸發條件動作選單 ,然後依序點選「Delete」(刪除) 和「Confirm」(確認)。

後續步驟