本文說明如何使用 Google Cloud 控制台中的 Certificate Manager (第 2 代) 頁面,查看及篩選憑證目錄。您可以使用目錄監控憑證的到期狀態、找出相關聯的資源,以及尋找特定憑證。
事前準備
- 登入 Google Cloud 帳戶。如果您未曾使用過 Google Cloud,歡迎 建立帳戶,親自體驗實際使用我們產品的成效。新客戶還能獲得價值 $300 美元的免費抵免額,用於執行、測試及部署工作負載。
-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
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.enablepermission. 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.-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
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.enablepermission. 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.
必要的角色
如要取得查看憑證目錄所需的權限,請要求管理員在專案中授予您下列 IAM 角色:
- Certificate Manager 檢視者 (
roles/certificatemanager.viewer) - Certificate Manager 編輯者 (
roles/certificatemanager.editor)
如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。
存取憑證目錄
如要存取目錄並查看憑證,請按照下列步驟操作:
前往 Google Cloud 控制台的「Certificate Manager」頁面。
查看顯示的憑證目錄表。
根據預設,表格只會顯示「長期憑證」 (效期超過 72 小時)。如要顯示短期憑證,請參閱「納入短期憑證」。
篩選憑證目錄
使用篩選器尋找特定憑證,或根據監控需求縮小目錄檢視範圍。
包含短期憑證
根據預設,系統會排除短期憑證,因為這類憑證自動輪替時可能會產生雜訊。這些工作負載會使用短期憑證,並經常輪替,以進行雙向傳輸層安全標準 (mTLS)。您可以加入這些欄位,稽核或排解使用代管 Workload Identity 或代理身分的工作負載。顯示這些資訊有助於確認憑證是否成功輪替,以及檢查 Workload Identity 狀態。
如要查看效期不到 72 小時的憑證,請按照下列步驟操作:
- 按一下「納入短期憑證」切換鈕。憑證會顯示在目錄中。
使用篩選器面板
如要使用預先定義的值篩選表格,請按照下列步驟操作:
- 按一下「篩選器面板」。
- 找出要套用的條件,例如「Issuer type」(核發者類型) 或「Expiration status」(到期狀態),然後勾選旁邊的核取方塊。
使用篩選列
如要為特定資料欄輸入自訂篩選器,請按照下列步驟操作:
- 在目錄表格的篩選列中,按一下「篩選器」欄位。
- 從清單中選取資料欄,例如「Identity」(身分)、「Expiration date」(到期日) 或「Resources」(資源)。
- 輸入要篩選的值 (例如網域名稱或特定資源名稱)。
查看及管理憑證詳細資料
如要監控重要參數,並管理目錄表格中的個別憑證,請執行下列工作。
監控憑證狀態及查看憑證詳細資料
如要查看特定憑證的狀態,請按照下列步驟操作:
- 在目錄表格中找出憑證。
- 查看「Expiration status」(到期狀態) 欄,判斷憑證是否有效或已過期。
- 按一下「Identity」(身分) 欄中的身分名稱 (通用名稱或 SAN),即可查看完整詳細資料。
稽核位置和資源
如要驗證憑證的來源和用途,請按照下列步驟操作:
- 查看「Location」(位置) 和「Issuer type」(核發者類型) 欄,確認憑證的暫存位置,以及憑證是由公開 CA (例如 Public Certificate Authority) 還是私人 CA (例如 CA 服務) 核發。
- 在「Resources」(資源) 欄中,找出核發憑證的 Google Cloud 資源,例如
TargetHttpsProxy。 - 按一下資源名稱,即可查看該特定資源的詳細資訊。
追蹤生命週期日期
如要監控核發和到期時間軸,請按照下列步驟操作:
- 在目錄表格中找出憑證。
- 查看「Issuance date」(核發日期) 和「Expiration date」(到期日) 欄,追蹤代管憑證的產生時間和預定到期時間。