默认服务帐户编辑者角色

Default Service Account Editor Role

我是 Google Cloud 的新手。

我了解到最佳做法是删除默认服务帐户,因为它具有编辑角色。但是,一旦删除它,我就无法启动市场解决方案。创建一个具有编辑角色的新服务帐户也不起作用。

我正在使用以下步骤:

推荐的最佳做法是什么?

默认服务帐户是使用 IAM 基本编辑者角色创建的,但您可以修改服务帐户的角色以控制服务帐户对 Google API 的访问。

您可以从您的项目中禁用或删除此 service account,但这样做可能会导致任何依赖服务帐户凭据的应用程序失败。因此,正如 @John Hanley 所提到的,不要删除 Google 为您创建的服务帐户。相反,创建一个新的服务帐户并在需要时使用它。

您可以使用 IAM. After you create an account, you grant the account IAM roles and set up instances to run as the service account. Apps running on instances with the service account attached can use the account's credentials to make requests to other Google APIs. Refer creating and enabling service account for instances 创建和管理自己的服务帐户。

如果您删除了默认服务帐户,您可以尝试在 30 天内恢复该帐户。 30 天后,IAM 会永久删除该服务帐户。 Google Cloud 在永久删除后无法恢复服务帐户,即使您提出支持请求也是如此。

参考Undeleting a Service account了解更多信息。