查看证书目录

本文档介绍了如何使用 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.

    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 Certificate Authority 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

所需的角色

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

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

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

访问证书目录

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

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

    前往证书目录

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

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

过滤证书目录

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

包含短时效证书

默认情况下,系统会排除短时效证书,因为它们的自动轮替可能会产生噪声。这些工作负载使用经常轮换的短期证书进行双向 TLS (mTLS)。您可以包含这些日志,以便审核或排查使用托管式工作负载身份或代理身份的工作负载。显示这些指标有助于您验证证书轮换是否成功,并检查工作负载身份状态。

如需查看有效期不足 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. 查看签发日期失效日期列,以跟踪受管理的证书的生成时间和计划失效时间。

后续步骤