共用方式為


快速入門:使用 Azure CLI 建立 Azure 受控 CCF 資源

Azure 受控 CCF (受控 CCF) 是一項新的高度安全服務,用於部署機密應用程式。 如需 Azure 受控 CCF 的詳細資訊,請參閱 關於 Azure 受控機密聯盟架構

如果您沒有 Azure 帳戶,請先建立 免費帳戶 ,再開始。

Azure CLI 可用來使用命令或腳本來建立和管理 Azure 資源。

先決條件

  • 本快速入門需要 2.51.0 版或更新版本的 Azure CLI。 如果使用 Azure Cloud Shell,則已安裝最新版本。
  • 在執行 Windows 或 Linux 的電腦上也需要 OpenSSL

建立資源群組

資源群組是部署和管理 Azure 資源的邏輯容器。 使用 az group create 命令,在 southcentralus 位置建立名為 myResourceGroup 的資源群組。

az group create --name "myResourceGroup" --location "SouthCentralUS"

建立成員

產生成員的金鑰組。 下列指令完成後,成員的公開金鑰會儲存在 中 member0_cert.pem ,而私密金鑰會儲存在 member0_privk.pem中。

openssl ecparam -out "member0_privk.pem" -name "secp384r1" -genkey
openssl req -new -key "member0_privk.pem" -x509 -nodes -days 365 -out "member0_cert.pem" -"sha384" -subj=/CN="member0"

建立受控 CCF 資源

使用 Azure CLI az confidentialledger managedccfs create 命令,在上一個步驟的資源群組中建立受控 CCF 資源。 您必須提供一些資訊:

  • 受控 CCF 名稱:3 到 32 個字元的字串,只能包含數字 (0-9)、字母 (a-z、A-Z) 和連字號 (-)

    這很重要

    每個受管理 CCF 資源都必須有唯一的名稱。 在下列範例中,將 your-unique-managed-ccf-name> 取代<為您的資源名稱。

  • 資源群組名稱: myResourceGroup

  • 地點:中南部或西歐。 預設值為 southcentralus。

  • 成員:要新增至資源的初始成員集合。 至少需要一名成員。

  • 節點計數:然後是資源中的節點數目。 預設值為 3。

az confidentialledger managedccfs create --name "<your-unique-managed-ccf-name>" --resource-group "myResourceGroup" --location "southcentralus" --members "[{certificate:'c:/certs/member0_cert.pem',identifier:'it-admin',group:'IT'},{certificate:'c:/certs/member1_cert.pem',identifier:'finance-admin',group:'Finance'}]"

若要檢視先前建立的資源:

az confidentialledger managedccfs show --name "<your-unique-managed-ccf-name>" --resource-group "myResourceGroup"

若要列出 myResourceGroup 中的受控 CCF 資源:

az confidentialledger managedccfs list --resource-group "myResourceGroup"

若要列出訂用帳戶中的受控 CCF 資源:

az confidentialledger managedccfs list --subscription <subscription id or subscription name>

後續步驟

在本快速入門中,您已使用 Azure 入口網站建立受控 CCF 資源。 若要深入瞭解 Azure 機密總帳,以及如何將它與您的應用程式整合,請繼續閱讀下列文章: