Share via


如何在 Azure Spring Apps 中使用許可權

注意

Azure Spring Apps 是 Azure Spring Cloud 服務的新名稱。 雖然服務有新的名稱,但是您暫時還是會在某些位置看到舊的名稱。我們正在致力更新螢幕擷取畫面、影片和圖表等資產。

本文適用於: ✔️基本/標準✔️企業

本文說明如何建立自定義角色,將許可權委派給 Azure Spring Apps 資源。 自定義角色會擴充 具有各種庫存許可權的 Azure 內建角色

我們將實作下列自定義角色。

  • 開發人員角色

    • 部署
    • Test
    • 重新啟動應用程式
    • 在 Git 存放庫中套用和變更應用程式組態
    • 取得記錄數據流
  • DevOps 工程師角色

    • 在 Azure Spring Apps 中建立、讀取、更新和刪除所有專案
  • Ops - 網站可靠性工程角色

    • 重新啟動應用程式
    • 取得記錄數據流
    • 無法變更應用程式或設定
  • Azure Pipelines / Jenkins / GitHub Actions 角色

    • 執行建立、讀取、更新和刪除作業
    • 使用 Terraform 或 ARM 範本在服務實例內的 Azure Spring Apps 和應用程式中建立和設定所有專案:Azure Pipelines、Jenkins 和 GitHub Actions

定義開發人員角色

開發人員角色包含重新啟動應用程式的許可權,並查看其記錄數據流。 此角色無法變更應用程式或組態。

  1. 在 Azure 入口網站 中,開啟您要指派自定義角色的訂用帳戶。

  2. 開啟 訪問控制 (IAM)

  3. 選取 [新增]。

  4. 選取 [ 新增自定義角色]。

  5. 選取 [下一步]

    顯示 [建立自定義角色] 視窗 [基本] 索引標籤的螢幕快照。

  6. 選取 [ 新增許可權]:

    顯示 [新增許可權] 按鈕的螢幕快照。

  7. 在搜尋方塊中,搜尋 Microsoft.app。 選取 Microsoft Azure Spring Apps

    Azure 入口網站 的螢幕快照,其中顯示醒目提示 Microsoft Azure Spring Apps 的 [新增許可權] 頁面搜尋結果。

  8. 選取開發人員角色的許可權。

    在 [Microsoft.AppPlatform/Spring] 下,選取:

    • 寫入:建立或更新 Azure Spring Apps 服務實例
    • 讀取:取得 Azure Spring Apps 服務實例
    • 其他 :列出 Azure Spring Apps 服務實例測試密鑰

    (僅適用於企業方案)在 [Microsoft.AppPlatform/Spring/buildServices] 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建服務
    • 其他:在 Azure Spring Apps 中取得上傳 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建
    • 寫入:撰寫 Microsoft Azure Spring Apps 組建

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds/results 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 建置結果
    • 其他:在 Azure Spring Apps 中取得記錄檔 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builders
    • 寫入:撰寫 Microsoft Azure Spring Apps Builders
    • 刪除:刪除 Microsoft Azure Spring Apps Builders

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 寫入:撰寫 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 刪除:刪除 Microsoft Azure Spring Apps Builder BuildpackBinding

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的 Buildpacks

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedStacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的堆疊

    在 [Microsoft.AppPlatform/Spring/apps] 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式
    • 其他:取得 Microsoft Azure Spring Apps 應用程式資源上傳 URL

    Microsoft.AppPlatform/Spring/apps/bindings 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式系結

    Microsoft.AppPlatform/Spring/apps/deployments 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式部署
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式部署
    • 其他:啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他 :停止 Microsoft Azure Spring Apps 應用程式部署
    • 其他:重新啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他:取得 Microsoft Azure Spring Apps 應用程式部署記錄檔 URL

    Microsoft.AppPlatform/Spring/apps/domains 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式自定義網域

    在 [Microsoft.AppPlatform/Spring/certificates] 底下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 憑證

    Microsoft.AppPlatform/locations/operationResults/Spring 下,選取:

    • 讀取:讀取作業結果

    在 Microsoft.AppPlatform/locations/operationStatus/operationId 底下,選取:

    • 讀取:讀取作業狀態

    顯示開發人員許可權選取專案的 Azure 入口網站 螢幕快照。

  9. 選取 [新增]。

  10. 檢閱許可權。

  11. 選取 [檢閱和建立]

定義DevOps工程師角色

此程式會定義具有部署、測試及重新啟動 Azure Spring Apps 應用程式許可權的角色。

  1. 在新增開發人員角色的程式中重複步驟 1 到 4。

  2. 選取 DevOps 工程師角色的權限:

    在 [Microsoft.AppPlatform/Spring] 下,選取:

    • 寫入:建立或更新 Azure Spring Apps 服務實例
    • 刪除:刪除 Azure Spring Apps 服務實例
    • 讀取:取得 Azure Spring Apps 服務實例
    • 其他:啟用 Azure Spring Apps 服務實例測試端點
    • 其他:停用 Azure Spring Apps 服務實例測試端點
    • 其他 :列出 Azure Spring Apps 服務實例測試密鑰
    • 其他 :重新產生 Azure Spring Apps 服務實例測試密鑰

    (僅適用於企業方案)在 [Microsoft.AppPlatform/Spring/buildServices] 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建服務
    • 其他:在 Azure Spring Apps 中取得上傳 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/agentPools 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 代理程式集區
    • 寫入:撰寫 Microsoft Azure Spring Apps 代理程式集區

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建
    • 寫入:撰寫 Microsoft Azure Spring Apps 組建

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds/results 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 建置結果
    • 其他:在 Azure Spring Apps 中取得記錄檔 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builders
    • 寫入:撰寫 Microsoft Azure Spring Apps Builders
    • 刪除:刪除 Microsoft Azure Spring Apps Builders

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 寫入:撰寫 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 刪除:刪除 Microsoft Azure Spring Apps Builder BuildpackBinding

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的 Buildpacks

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedStacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的堆疊

    在 [Microsoft.AppPlatform/Spring/apps] 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式
    • 刪除:刪除 Microsoft Azure Spring Apps 應用程式
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式
    • 其他:取得 Microsoft Azure Spring Apps 應用程式資源上傳 URL
    • 其他:驗證 Microsoft Azure Spring Apps 應用程式自定義網域

    Microsoft.AppPlatform/Spring/apps/bindings 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式系結
    • 刪除:刪除 Microsoft Azure Spring Apps 應用程式系結
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式系結

    Microsoft.AppPlatform/Spring/apps/deployments 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式部署
    • 刪除:刪除 Azure Spring Apps 應用程式部署
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式部署
    • 其他:啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他 :停止 Microsoft Azure Spring Apps 應用程式部署
    • 其他:重新啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他:取得 Microsoft Azure Spring Apps 應用程式部署記錄檔 URL

    Microsoft.AppPlatform/Spring/apps/deployments/skus 下,選取:

    • 讀取:列出可用的應用程式部署 SKU

    在 [Microsoft.AppPlatform/locations] 下,選取:

    • 其他 :檢查名稱可用性

    Microsoft.AppPlatform/locations/operationResults/Spring 下選取:

    • 讀取:讀取作業結果

    在 Microsoft.AppPlatform/locations/operationStatus/operationId 底下,選取:

    • 讀取:讀取作業狀態

    在 [Microsoft.AppPlatform/skus] 下,選取:

    • 讀取:列出可用的 SKU

    顯示 DevOps 許可權選取項目的 Azure 入口網站 螢幕快照。

  3. 選取 [新增]。

  4. 檢閱許可權。

  5. 選取 [檢閱和建立]

定義 Ops - 網站可靠性工程角色

此程式會定義具有部署、測試及重新啟動 Azure Spring Apps 應用程式許可權的角色。

  1. 從新增開發人員角色的程序重複步驟 1 到 4。

  2. 選取 Ops - 網站可靠性工程角色的許可權:

    在 [Microsoft.AppPlatform/Spring] 下,選取:

    • 讀取:取得 Azure Spring Apps 服務實例
    • 其他 :列出 Azure Spring Apps 服務實例測試密鑰

    在 [Microsoft.AppPlatform/Spring/apps] 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式

    在 [Microsoft.AppPlatform/apps/deployments] 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式部署
    • 其他:啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他 :停止 Microsoft Azure Spring Apps 應用程式部署
    • 其他:重新啟動 Microsoft Azure Spring Apps 應用程式部署

    Microsoft.AppPlatform/locations/operationResults/Spring 下,選取:

    • 讀取:讀取作業結果

    在 Microsoft.AppPlatform/locations/operationStatus/operationId 底下,選取:

    • 讀取:讀取作業狀態

    顯示 Ops - 網站可靠性工程許可權選取專案的 Azure 入口網站 螢幕快照。

  3. 選取 [新增]。

  4. 檢閱許可權。

  5. 選取 [檢閱和建立]

定義 Azure Pipelines / Jenkins / GitHub Actions 角色

此角色可以使用服務實例,在 Azure Spring Apps 和應用程式中建立和設定所有專案。 此角色適用於發行或部署程序代碼。

  1. 從新增開發人員角色的程序重複步驟 1 到 4。

  2. 開啟 [ 許可權] 選項。

  3. 選取 Azure Pipelines / Jenkins / GitHub Actions 角色的許可權:

    在 [Microsoft.AppPlatform/Spring] 下,選取:

    • 寫入:建立或更新 Azure Spring Apps 服務實例
    • 刪除:刪除 Azure Spring Apps 服務實例
    • 讀取:取得 Azure Spring Apps 服務實例
    • 其他:啟用 Azure Spring Apps 服務實例測試端點
    • 其他:停用 Azure Spring Apps 服務實例測試端點
    • 其他 :列出 Azure Spring Apps 服務實例測試密鑰
    • 其他 :重新產生 Azure Spring Apps 服務實例測試密鑰

    (僅適用於企業方案)在 [Microsoft.AppPlatform/Spring/buildServices] 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建服務
    • 其他:在 Azure Spring Apps 中取得上傳 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds 下,選取:

    • 閱讀:讀取 Microsoft Azure Spring Apps 組建
    • 寫入:撰寫 Microsoft Azure Spring Apps 組建

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builds/results 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 建置結果
    • 其他:在 Azure Spring Apps 中取得記錄檔 URL

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builders
    • 寫入:撰寫 Microsoft Azure Spring Apps Builders
    • 刪除:刪除 Microsoft Azure Spring Apps Builders

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 寫入:撰寫 Microsoft Azure Spring Apps Builder BuildpackBinding
    • 刪除:刪除 Microsoft Azure Spring Apps Builder BuildpackBinding

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的 Buildpacks

    (僅適用於企業方案)在 Microsoft.AppPlatform/Spring/buildServices/supportedStacks 下,選取:

    • 讀取:讀取 Microsoft Azure Spring Apps 支援的堆疊

    在 [Microsoft.AppPlatform/Spring/apps] 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式
    • 刪除:刪除 Microsoft Azure Spring Apps 應用程式
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式
    • 其他:取得 Microsoft Azure Spring Apps 應用程式資源上傳 URL
    • 其他:驗證 Microsoft Azure Spring Apps 應用程式自定義網域

    Microsoft.AppPlatform/Spring/apps/bindings 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式系結
    • 刪除:刪除 Microsoft Azure Spring Apps 應用程式系結
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式系結

    Microsoft.AppPlatform/Spring/apps/deployments 下,選取:

    • 寫入:撰寫 Microsoft Azure Spring Apps 應用程式部署
    • 刪除:刪除 Azure Spring Apps 應用程式部署
    • 讀取:讀取 Microsoft Azure Spring Apps 應用程式部署
    • 其他:啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他 :停止 Microsoft Azure Spring Apps 應用程式部署
    • 其他:重新啟動 Microsoft Azure Spring Apps 應用程式部署
    • 其他:取得 Microsoft Azure Spring Apps 應用程式部署記錄檔 URL

    Microsoft.AppPlatform/Spring/apps/deployments/skus 下,選取:

    • 讀取:列出可用的應用程式部署 SKU

    在 [Microsoft.AppPlatform/locations] 下,選取:

    • 其他 :檢查名稱可用性

    Microsoft.AppPlatform/locations/operationResults/Spring 下,選取:

    • 讀取:讀取作業結果

    在 Microsoft.AppPlatform/locations/operationStatus/operationId 底下,選取:

    • 讀取:讀取作業狀態

    在 [Microsoft.AppPlatform/skus] 下,選取:

    • 讀取:列出可用的 SKU

    Azure 入口網站的螢幕快照,其中顯示 Azure Pipelines /Jenkins / GitHub Actions 許可權的選取專案。

  4. 選取 [新增]。

  5. 檢閱許可權。

  6. 選取 [檢閱和建立]

下一步

如需定義自定義許可權之三種方法的詳細資訊,請參閱: