Service Fabric の管理認証設定の確認

クラスター管理クライアントの認証とロールを正しく設定してください。

説明

Azure Service Fabric の管理クライアントを Microsoft Entra ID で認証するには、テナントと登録済みの 2 つのアプリケーションを指定します。X.509 クライアント証明書でもアクセスを管理できます。

想定される影響

テナント ID が欠けていると Entra 構成をデプロイできません。ロールの割り当てを誤ると、一般ユーザーがクラスターを管理できるおそれがあります。

対処方法

azure_active_directory に tenant_id、cluster_application_id、client_application_id を設定します。管理者と一般ユーザーにロールを割り当て、それぞれのアクセス権を確認します。証明書認証を使う場合は、信頼するクライアント証明書と付与するロールを確認します。

例

最初の例では必須の tenant_id が欠けています。デプロイには、サポート対象のクラスター バージョン、HTTPS 管理エンドポイント、ノードとクラスター証明書の設定も必要です。

変更前

hcl
resource "azurerm_service_fabric_cluster" "example" {
  name                 = "example-servicefabric"
  resource_group_name  = azurerm_resource_group.example.name
  location             = azurerm_resource_group.example.location
  reliability_level    = "Bronze"
  upgrade_mode         = "Manual"
  cluster_code_version = var.cluster_code_version
  vm_image             = "Windows"
  management_endpoint  = var.management_endpoint

  azure_active_directory {
    cluster_application_id = var.cluster_application_id
    client_application_id  = var.client_application_id
  }
}

変更後

hcl
resource "azurerm_service_fabric_cluster" "example" {
  name                 = "example-servicefabric"
  resource_group_name  = azurerm_resource_group.example.name
  location             = azurerm_resource_group.example.location
  reliability_level    = "Bronze"
  upgrade_mode         = "Manual"
  cluster_code_version = var.cluster_code_version
  vm_image             = "Windows"
  management_endpoint  = var.management_endpoint

  azure_active_directory {
    tenant_id              = var.tenant_id
    cluster_application_id = var.cluster_application_id
    client_application_id  = var.client_application_id
  }
}

参考資料