建立 Sensitive Data Protection 檢查範本
本快速入門導覽課程說明如何在 Google Cloud 控制台中,建立及使用 Sensitive Data Protection 檢查範本。Sensitive Data Protection 檢查範本可讓您在 Sensitive Data Protection 中建立及保留設定資訊。
如要完成本快速入門導覽課程,您必須擁有可在 Cloud Storage、BigQuery 或 Datastore 模式 (Datastore) 的 Firestore 中掃描的資料。
如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導):
事前準備
- 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.
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Sensitive Data Protection API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles.
建立範本
在接下來的章節中,您將設定及建立檢查範本。
定義範本
在 Google Cloud 控制台的「Sensitive Data Protection」部分,前往「建立範本」頁面。
在「Create template」(建立範本) 頁面中定義下列選項:
在「Template type」(範本類型) 中,請使用預設設定「Inspect (find sensitive data)」(檢查 (搜尋機密資料))。
在「Template ID」(範本 ID) 中輸入
quickstart-template
。在「Display name」(顯示名稱) 部分輸入
Quickstart template
。將「Description」(說明) 欄位留空。
在「Resource location」(資源位置) 中使用預設設定「Global (any region)」(全域 (任何地區))。
按一下「繼續」。
設定偵測作業
現在請設定範本,偵測信用卡號碼等 infoType。
在「Create template」(建立範本) 頁面的「Configure detection」(設定偵測) 區段中,執行下列操作:
在「InfoTypes」(infoType) 專區中,按一下「Manage infoTypes」(管理 infoType),選取要掃描的 infoType,然後按一下「Done」(完成)。
在「可信度門檻」部分,從「可能性」清單中選取「有可能」。
預設值「Possible」(或許可能) 足以供大多數情況使用。如果使用此範本時,得到的相符項目範圍常常過廣,請將滑桿上移。如果得到的相符項目太少,請將滑桿下移。
如要建立範本,請按一下「Create」(建立)。
系統隨即會顯示範本的摘要資訊頁面。如要返回主要的 Sensitive Data Protection 頁面,請按一下「返回範本清單」
。
使用範本
下列步驟說明如何設定範本,以便用於掃描:
前往 Google Cloud 控制台的「Create job or job trigger」(建立工作或工作觸發條件) 頁面。
按照提示建立檢查工作或工作觸發條件 (週期性工作)。系統提示您設定偵測功能時,請選取您建立的範本。
清除所用資源
如要避免系統向您的 Google Cloud 帳戶收取本頁所用資源的費用,請按照下列步驟操作。
刪除專案
如要避免付費,最簡單的方法就是刪除您為了本教學課程所建立的專案。
如要刪除專案:
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
刪除範本
建立及儲存範本不會產生任何費用。不過,如要刪除範本,請按照下列步驟操作:
前往 Google Cloud 控制台的 Sensitive Data Protection「設定」頁面。
選取要刪除檢查範本的專案。
按一下 [Templates] (範本) 分頁標籤。 Google Cloud 主控台隨即會顯示目前專案的所有範本。
在「Actions」(動作) 欄中找到要刪除的範本,按一下觸發條件動作選單
,然後依序點選「Delete」(刪除) 和「Confirm」(確認)。 )
後續步驟
進一步瞭解 infoType 偵測工具參考資料。
進一步瞭解 Sensitive Data Protection 如何使用可能性值比對內容。