本頁面說明如何解決 Sensitive Data Protection 探索服務的問題。如要進一步瞭解探索服務,請參閱資料設定檔。如要瞭解如何查看與探索掃描設定相關的錯誤,請參閱「查看設定錯誤」。
服務代理人容器未啟用 DLP API
如果您建立機構層級的掃描設定,但對所選的服務代理程式容器專案沒有 serviceusage.services.enable
權限,就會發生這個問題。Sensitive Data Protection 無法在專案中自動啟用 DLP API。
Permission denied to enable service [dlp.googleapis.com]
如要解決這個問題,請完成下列任一工作。不論是以上何種情況,您都需要取得必要權限。詳情請參閱「在機構或資料夾層級使用資料剖析檔時所需的角色」。
建立新的服務代理容器
- 請管理員授予您機構的「專案建立者」角色 (
roles/resourcemanager.projectCreator
)。 - 編輯機構層級掃描設定。
- 在「服務代理程式容器」部分,按一下「建立」並按照提示操作,建立新的服務代理程式容器。
- 儲存設定。
更新服務代理容器
- 請管理員授予您所選專案的
serviceusage.services.enable
權限,該專案將做為服務代理容器。 - 查看掃描設定的詳細資料,瞭解目前有哪些錯誤。
- 找出這項錯誤,然後按一下「修復」。
服務代理沒有權限讀取受存取權控管的資料欄
如果資料表透過政策標記強制執行資料欄層級安全性政策,就會發生這個問題。如果服務代理沒有權限存取受限資料欄,Sensitive Data Protection 會顯示下列錯誤:
Permission denied for DLP API service account 'SERVICE_AGENT_ID' while accessing a BigQuery table. Access Denied: BigQuery BigQuery: User does not have permission to access policy tag "POLICY_TAG_ID" on column FIELD_NAME.
如要解決這個問題,請前往「身分與存取權管理 (IAM)」頁面,將「精細讀取者」角色授予服務代理。
如果無法剖析資料,Sensitive Data Protection 會定期重試。
如要進一步瞭解如何授予角色,請參閱授予單一角色。
服務代理沒有資料剖析服務的存取權
貴機構使用者建立機構或資料夾層級的掃描設定後,就會發生這個問題。查看掃描設定詳細資料時,您會發現「掃描狀態」的值為「有效,但有錯誤」。查看錯誤時,敏感資料保護功能會顯示下列錯誤訊息:
None of the driver projects (PROJECT_ID) have MISSING_PERMISSION permission for organizations/ORGANIZATION_ID.
發生這項錯誤的原因是,Sensitive Data Protection 在建立掃描設定時,無法自動將 DLP Organization Data Profiles Driver 角色授予服務代理人。掃描設定的建立者沒有授予資料剖析存取權的權限,因此 Sensitive Data Protection 無法代為執行這項操作。
如要解決這個問題,請參閱「將資料剖析服務的存取權授予服務代理」。
服務帳戶沒有查詢資料表的權限
如果服務代理程式沒有查詢資料表的權限,Sensitive Data Protection 就無法剖析該資料表,Sensitive Data Protection 顯示下列錯誤:
Permission denied error: Permission denied for DLP API service account 'SERVICE_AGENT_ID' while accessing BigQuery table. Access Denied: Table TABLE: User does not have permission to query table TABLE. Permission denied for DLP API service account 'SERVICE_AGENT_ID' while accessing BigQuery table. Access Denied: Table TABLE: User does not have permission to query TABLE. [TIMESTAMP]
確認資料表是否仍存在。如果資料表存在,請執行下列步驟。
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
取得資料表的現行 IAM 政策,並列印至
stdout
:bq get-iam-policy TABLE
將 TABLE 替換為 BigQuery 資料表的完整資源名稱,格式為 PROJECT_ID:DATASET_ID。TABLE_ID例如:
project-id:dataset-id.table-id
。將 DLP API 服務代理人 (
roles/dlp.serviceAgent
) 角色授予服務代理人:bq add-iam-policy-binding --member=serviceAccount:SERVICE_AGENT_ID \ --role=roles/dlp.serviceAgent TABLE
更改下列內容:
- SERVICE_AGENT_ID:需要查詢資料表的服務代理程式 ID,例如
service-0123456789@dlp-api.iam.gserviceaccount.com
。 TABLE:BigQuery 資料表的完整資源名稱,格式為 PROJECT_ID:DATASET_ID.TABLE_ID,例如
project-id:dataset-id.table-id
。輸出結果會與下列內容相似:
Successfully added member 'SERVICE_AGENT_ID' to role 'roles/dlp.serviceAgent' in IAM policy for table 'TABLE': { "bindings": [ { "members": [ "serviceAccount:SERVICE_AGENT_ID" ], "role": "roles/dlp.serviceAgent" } ], "etag": "BwXNAPbVq+A=", "version": 1 }
如果無法剖析資料,Sensitive Data Protection 會定期重試。
- SERVICE_AGENT_ID:需要查詢資料表的服務代理程式 ID,例如
服務帳戶沒有權限發布至 Pub/Sub 主題
如果服務代理人沒有發布權限,Sensitive Data Protection 就無法將通知發布至 Pub/Sub 主題,Sensitive Data Protection 顯示下列錯誤:
Permission missing to publish notifications on Cloud Pub/Sub topic 'TOPIC_NAME'. The DLP API service account 'SERVICE_AGENT_ID' must must have at least the Pub/Sub Publisher role.
如要解決這個問題,請在專案或主題層級授予服務代理人發布存取權。舉例來說,Pub/Sub 發布者角色就具備發布權限。
如果 Pub/Sub 主題有設定或權限問題,資訊保護服務最多會重試傳送 Pub/Sub 通知兩週。兩週後,系統會捨棄通知。
檢查範本無法用於剖析其他區域的資料
如果 Sensitive Data Protection 嘗試剖析的資料與檢查範本不在同一個區域,就會發生這個問題。Sensitive Data Protection 顯示下列錯誤:
Data in region DATA_REGION cannot be profiled using template in region TEMPLATE_REGION. Regional template can only be used to profile data in the same region. If profiling data in multiple regions, use a global template.
在這個錯誤訊息中,DATA_REGION 是資料所在的區域,TEMPLATE_REGION 則是檢查範本所在的區域。
如要解決這個問題,請將特定區域的範本複製到 global
區域:
在「檢查範本詳細資料」頁面中,複製範本的完整資源名稱。完整資源名稱的格式如下:
projects/PROJECT_ID/locations/REGION/inspectTemplates/TEMPLATE_ID
編輯掃描設定,然後輸入新檢查範本的完整資源名稱。
按一下 [儲存]。
如果無法剖析資料,Sensitive Data Protection 會定期重試。
Sensitive Data Protection 嘗試剖析不支援的資料表
如果 Sensitive Data Protection 嘗試剖析不支援的資料表,就會發生這個問題。您仍會取得該資料表的部分設定檔,其中包含資料表中繼資料。不過,部分設定檔會顯示下列錯誤:
Unimplemented error: Table of type `TABLE_TYPE` is not currently supported for inspection. [DATE_TIME].
如要避免系統為不支援的資料表提供部分設定檔和錯誤,請按照下列步驟操作:
- 編輯掃描設定。
- 在「管理時間表」步驟中,按一下「編輯時間表」 。
- 在隨即顯示的窗格中,按一下「條件」分頁標籤。
- 在「Tables to profile」(要剖析的資料表) 部分,按一下「Profile supported tables」(剖析支援的資料表)。
詳情請參閱「管理時間表」。
預先製作的 Looker 報表無法正常載入
請參閱「排解預先建立的報表錯誤」。
根據資料機密程度自動加上標記的問題
請參閱根據資料私密性控管資源 IAM 存取權的說明文件,瞭解如何排解錯誤。