Function App client certificates not required 이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다. Id: terraform-azure-function-app-client-certificates-unrequired
Provider: Azure
Platform: Terraform
Severity: Medium
Category: Insecure Configurations
Learn More Description Azure Function Apps should require client certificates for incoming requests by setting the client_cert_mode attribute to "Required". Without this setting, as seen below, the Function App allows unauthenticated traffic, increasing the risk of unauthorized access to sensitive business logic or data processed by the Function App:
resource "azurerm_function_app" "example" {
// ... other configuration ...
client_cert_mode = "Required"
}
Enforcing client certificate authentication ensures that only trusted clients can interact with the Function App, reducing the attack surface and protecting against various unauthorized access vectors.
Compliant Code Examples resource "azurerm_function_app" "negative" {
name = "test-azure-functions"
location = azurerm_resource_group . example . location
resource_group_name = azurerm_resource_group . example . name
app_service_plan_id = azurerm_app_service_plan . example . id
storage_account_name = azurerm_storage_account . example . name
storage_account_access_key = azurerm_storage_account . example . primary_access_key
client_cert_mode = "Required"
}
Non-Compliant Code Examples resource "azurerm_function_app" "positive1" {
name = "test-azure-functions"
location = azurerm_resource_group . example . location
resource_group_name = azurerm_resource_group . example . name
app_service_plan_id = azurerm_app_service_plan . example . id
storage_account_name = azurerm_storage_account . example . name
storage_account_access_key = azurerm_storage_account . example . primary_access_key
}
resource "azurerm_function_app" "positive2" {
name = "test-azure-functions"
location = azurerm_resource_group . example . location
resource_group_name = azurerm_resource_group . example . name
app_service_plan_id = azurerm_app_service_plan . example . id
storage_account_name = azurerm_storage_account . example . name
storage_account_access_key = azurerm_storage_account . example . primary_access_key
client_cert_mode = "Optional"
}