Sensitive Data Protection 服務代理程式

本頁說明與 Sensitive Data Protection 相關的服務代理程式。

服務代理

服務代理是由 Google 建立及管理的服務帳戶。服務代理程式會做為 Google Cloud 服務的身分,代表您存取專案中的資源。

啟用並使用 Google Cloud API 後,系統會在某個時間點建立服務代理。建立專案時,Google 通常會將特定的預先定義 IAM 角色授予專案的服務代理人。這些角色包含服務代理正常運作所需的最低權限。如需獲派角色的服務代理完整清單,請參閱 IAM 說明文件中的「服務代理」。

如要存取這兩項資源並呼叫 Sensitive Data Protection,Sensitive Data Protection 會使用 Cloud Data Loss Prevention 服務代理程式的憑證,向其他 API 進行驗證。 Google Cloud 服務代理程式是一種特殊的服務帳戶,可代表您執行內部 Google 程序。服務代理可以透過下列電子郵件地址識別:

service-PROJECT_NUMBER@dlp-api.iam.gserviceaccount.com

首次需要時,系統會建立 Cloud Data Loss Prevention 服務代理人。您可以呼叫 InspectContent 預先建立:

curl --request POST \
  "https://dlp.googleapis.com/v2/projects/PROJECT_ID/locations/us-central1/content:inspect" \
  --header "X-Goog-User-Project: PROJECT_ID" \
  --header "Authorization: Bearer $(gcloud auth print-access-token)" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"item":{"value":"google@google.com"}}' \
  --compressed

將 PROJECT_ID 替換為專案 ID。

系統會自動授予 Cloud Data Loss Prevention 服務代理人專案的常見權限,以檢查資源,並列在 Google Cloud 控制台的「身分與存取權管理」部分。服務代理程式會與專案一起存在,只有刪除專案時才會隨之刪除。Sensitive Data Protection 需要使用這個服務代理,因此請勿移除。

如要進一步瞭解探索作業中的 Cloud Data Loss Prevention 服務代理程式,請參閱「服務代理程式容器和服務代理程式」。

後續步驟