Azure 服務主體
在 AutoSSL 中管理並使用 Azure 服務主體認證。
總覽
AutoSSL 透過 Microsoft Entra ID 向 Azure 服務發起請求時,需要 Azure 服務主體認證進行身分驗證。新增服務主體後,你授權 AutoSSL 代為執行指定操作,例如把 SSL 憑證檔案上傳到 Azure Blob Storage。
設定參數
| 參數 | 說明 |
|---|---|
| Tenant ID | Microsoft Entra ID(Azure AD)租用戶 ID。 |
| Client ID | 服務主體的應用程式(用戶端)ID。 |
| Client Secret | 服務主體的用戶端金鑰。AutoSSL 會在儲存前對其進行安全加密。 |
重要
以後如果要修改 Client Secret,必須重新填寫完整的金鑰。
如何建立服務主體
- 登入 Azure 門戶。
- 進入 Microsoft Entra ID > App registrations > New registration。
- 輸入名稱(例如
AutoSSL),點選 Register。 - 在總覽頁複製 Application (client) ID 和 Directory (tenant) ID。
- 進入 Certificates & secrets > New client secret,建立金鑰並立即複製其值。
- 把 Tenant ID、Client ID 和 Client Secret 貼上到 AutoSSL。
更詳細的說明見 Azure 建立服務主體的文件。
安全建議
- 最小權限:只授予服務主體存取目標資源所需的 RBAC 角色(例如針對特定儲存帳戶或容器的
Storage Blob Data Contributor)。 - 定期輪換:定期輪換用戶端金鑰,並在 AutoSSL 中更新。
- 專用服務主體:為 AutoSSL 單獨建立服務主體,不要複用其他應用的認證。
支援的部署目標
Azure 服務主體用於 AutoSSL 中的以下部署供應商:
- Azure Blob Storage:把憑證檔案上傳到 Blob 容器,並保留版本目錄和 latest 路徑。