查看证书目录

本文档介绍了如何使用 Google Cloud 控制台中的 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 Certificate Authority Service, Certificate Manager APIs, if any are not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). 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 Certificate Authority Service, Certificate Manager APIs, if any are not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

所需的角色

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

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

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

访问证书目录

如需访问名录并查看您的证书,请按以下步骤操作:

  1. 在 Google Cloud 控制台中,前往 Certificate Manager 页面。

    前往证书目录

  2. 查看显示的证书目录表。

默认情况下,该表仅显示长期证书(生命周期超过 72 小时)。如需显示短期证书,请参阅包含短期证书。

过滤证书目录

使用过滤条件查找特定证书,或根据监控需求缩小目录视图范围。

包含短期证书

默认情况下,系统会排除短期证书,因为其自动轮替可能会产生干扰。这些工作负载使用短期证书,这些证书会频繁轮替以实现双向 TLS (mTLS)。您可以添加这些字段,以审核或排查使用托管式工作负载身份或代理身份的工作负载。显示这些信息有助于您验证证书轮替是否成功,并检查 Workload Identity 状态。

如需查看有效期低于 72 小时的证书,请按以下步骤操作:

  • 点击包含短期证书切换开关。证书会显示在目录中。

使用过滤条件面板

如需使用预定义值过滤表格,请按以下步骤操作:

  1. 点击过滤条件面板。
  2. 选中要应用的条件旁边的复选框,例如签发者类型或到期状态。

使用过滤条件栏

如需为特定列输入自定义过滤条件,请按以下步骤操作:

  1. 点击目录表过滤条件栏中的过滤条件字段。
  2. 从列表中选择一列,例如身份、失效日期或资源。
  3. 输入要过滤的值(例如域名或特定资源名称)。

查看和管理证书详细信息

如需监控关键参数并管理目录表中的各个证书,请执行以下任务。

监控证书状态并查看证书详情

如需查看特定证书的状态,请按以下步骤操作:

  1. 在目录表中找到该证书。
  2. 查看到期状态列,确定证书是有效还是已过期。
  3. 点击身份列中的身份名称(通用名称或 SAN),查看其完整详细信息。

审核位置和资源

如需验证证书的来源和使用情况,请按以下步骤操作:

  1. 查看位置和颁发者类型列,验证证书的暂存位置以及证书是由公共 CA(例如 Public Certificate Authority)还是私有 CA(例如 CA Service)颁发的。
  2. 在资源列中,找到颁发证书的 Google Cloud 资源,例如 TargetHttpsProxy。
  3. 点击资源名称可查看有关该特定资源的更多信息。

跟踪生命周期日期

如需监控签发和到期时间轴,请按以下步骤操作:

  1. 在目录表中找到该证书。
  2. 查看签发日期和失效日期列,以跟踪托管证书的生成时间和预定失效时间。

后续步骤