监控证书

Certificate Manager(第 2 代)概览信息中心可帮助您维护安全、健康的证书环境。您可以使用该信息中心来识别即将到期的证书、审核安全状况以及跟踪签发趋势。

概览信息中心包含以下监控图表:

  • 过去 7 天内颁发的证书数量:跟踪过去 7 天内颁发的证书总数。
  • 按授权机构类型颁发的证书:按授权机构类型(公共、私有或未知)对证书进行分组。
  • 按位置颁发的证书:按部署位置对证书进行地理排序。
  • 即将过期的证书:显示将在 7 天和 30 天内过期的证书。

准备工作

  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 页面。

    前往 Certificate Manager 概览信息中心

  2. 可选:如需调整时间跨度,请使用信息中心右上角的时间选择器。默认情况下,信息中心会显示过去 7 天的指标。

信息中心数据每 24 小时更新一次。

监控证书运行状况和到期时间

该信息中心提供专门针对长期证书(即生命周期超过 72 小时的证书)的指标。

Certificate Manager(第 2 代)不包含短期证书(生命周期少于 72 小时),因为这些证书会频繁进行自动轮替,不需要像长期证书那样进行人工监控。

如需监控需要手动干预的即将到期的证书,请按以下步骤操作:

  1. 在信息中心内找到即将过期的证书图表。
  2. 查看有关证书即将到期的警告。
  3. 如果您收到到期警告,请使用证书身份搜索您的资产清单,以验证是否已完成更换。如需了解详情,请参阅过滤证书清单。

审核证书清单

使用信息中心的资产指标部分,审核所选时间范围内环境中的有效证书。

如需审核您的资产清单,请查看按以下条件分类的证书:

  • 按资源查看有效证书:根据颁发证书的 Google Cloud 资源跟踪证书数量。Certificate Manager(第 2 代)可识别由托管式 Workload Identity 或负载均衡颁发的证书;通过 Certificate Authority Service 颁发的其他证书则归类为未指定。如需了解详情,请参阅支持的服务。
  • 按密钥算法查看有效证书:通过按叶密钥算法(例如 RSA 或 ECDSA)对证书进行分组,审核您的加密标准。这样才能确保符合您组织的安全政策。
  • 按密钥用途配置文件查看有效证书:按预期用途对证书进行分组。Certificate Manager 会根据最匹配的配置文件为证书添加标签。如果无法确定配置文件,则会将其标记为其他。

如需查看其中任一类别中的特定证书,请点击查看证书以打开清单页面。

跟踪证书颁发趋势

使用颁发指标图表可监控配置的服务在一段时间内生成证书的情况。这种方法有助于您跟踪增长情况,并识别潜在的凭证发放异常。

如需跟踪签发趋势,请监控以下指标:

  1. 按位置颁发的证书:观察每个位置颁发的证书数量,了解证书数量的地理分布。
  2. 按授权机构类型颁发的证书:观察公共 CA(例如 Public Certificate Authority)与私有 CA(例如 CA Service)颁发的证书数量。
  3. 颁发的证书总数:监控所选时间段内颁发的证书总量,以了解环境的规模。

后续步骤