Artifact Registry Service Agent

Artifact Registry Service Agent 会代表 与 Google Cloud 服务交互时的 Artifact Registry。

在存储分区中创建第一个 Artifact Registry 代码库后 Google Cloud 项目、Artifact Registry Service Agent 系统会自动创建服务代理标识符为:

service-PROJECT-NUMBER@gcp-sa-artifactregistry.iam.gserviceaccount.com

PROJECT-NUMBER 是 运行 Artifact Registry 的 Google Cloud 项目的项目编号

您可以在项目中手动创建服务账号,而无需 运行以下命令:

gcloud beta services identity create \
    --service=artifactregistry.googleapis.com \
    --project=PROJECT-ID

PROJECT-ID 替换为 Google Cloud 项目 ID。

为 Artifact Registry Service Agent 授予了 Artifact Registry 中资源的 Service Agent 角色 (roles/artifactregistry.serviceAgent) 项目。为了实施最小权限安全原则, 具备以下最低权限:

  • 发布 Pub/Sub 主题:pubsub.topics.publish
  • 从 Artifact Registry 代码库中下载制品: artifactregistry.repositories.downloadArtifacts
  • 删除制品:artifactregistry.versions.delete

后续步骤

了解 Artifact Registry 角色以及配置对代码库的访问权限