使用 CA Service 颁发证书,并在 Certificate Manager(第 2 代)中进行验证

了解如何使用 Certificate Authority Service 颁发私有证书,以及如何使用 Certificate Manager(第 2 代)查看和验证目录中的证书详细信息。

准备工作

  1. 登录您的 Google Cloud 账号。如果您是 Google Cloud新手,请 创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。
  2. 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the CA Service, Certificate Manager APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  5. 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the CA Service, Certificate Manager APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  8. 您需要在 CA Service 中拥有一个已启用 CA 的现有 CA 池。如需了解详情,请参阅创建 CA 池创建 CA
  9. 确保您拥有所需的 IAM 角色。如需了解详情,请参阅必需的角色

所需的角色

如需获得颁发证书和查看资源所需的权限,请让管理员为您授予项目的以下 IAM 角色:

如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

您也可以通过自定义角色或其他预定义角色来获取所需的权限。

使用 CA Service 颁发证书

如需签发证书,请完成以下步骤:

  1. 在 Google Cloud 控制台中,前往 CA Service

    前往 CA Service

  2. 按照 CA Service 文档中的说明申请证书

  3. 记下您指定的域名身份。您可以使用此值在目录中查找证书。

在 Certificate Manager(第 2 代)中查看和验证证书详细信息

CA 服务颁发证书后,Certificate Manager(第 2 代)会检测到该证书,并将其作为观测到的证书添加到证书目录中。

如需查看证书,请完成以下步骤:

  1. 在 Google Cloud 控制台中,前往证书

    前往“证书”页面

  2. 等待几分钟,直到证书显示在目录中。 如果未显示,请刷新目录。

  3. 如需查找您签发的证书,请使用过滤栏,通过相关过滤条件进行搜索。

  4. 如需打开详细信息窗格,请点击目录列表中的证书域名

  5. 检查证书属性:

    • 有效期:检查不早于不晚于日期。
    • 正文:确认正文与您在签发时提供的详细信息一致。
    • 签发详情:记下签发 CA 和组织。

清理

为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。

为避免产生意外费用,请撤消并删除 CA 服务资源。

如需详细了解如何在 CA Service 中管理证书,请参阅管理证书

后续步骤