From 036cf76fb2cba83ea71fa878e473eae2f689e27b Mon Sep 17 00:00:00 2001 From: xingyang-li Date: Mon, 25 Mar 2024 14:32:43 -0700 Subject: [PATCH] enable basic auth --- templates/stf-prod.json | 48 ++++++++++++++++++++++++++++++++++ templates/stf-test.json | 58 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 101 insertions(+), 5 deletions(-) diff --git a/templates/stf-prod.json b/templates/stf-prod.json index 730127e..e53a62c 100644 --- a/templates/stf-prod.json +++ b/templates/stf-prod.json @@ -1165,6 +1165,30 @@ } ] }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('windowsAppName'), '/scm')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('windowsAppName'))]" + ], + "properties": { + "allow": true + } + }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('windowsAppName'), '/ftp')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('windowsAppName'))]" + ], + "properties": { + "allow": true + } + }, { "type": "Microsoft.Web/sites", "apiVersion": "2021-03-01", @@ -1267,6 +1291,30 @@ } ] }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('linuxAppName'), '/scm')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('linuxAppName'))]" + ], + "properties": { + "allow": true + } + }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('linuxAppName'), '/ftp')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('linuxAppName'))]" + ], + "properties": { + "allow": true + } + }, { "type": "Microsoft.Web/sites", "apiVersion": "2021-03-01", diff --git a/templates/stf-test.json b/templates/stf-test.json index e6bf8a7..e53a62c 100644 --- a/templates/stf-test.json +++ b/templates/stf-test.json @@ -36,7 +36,7 @@ "linuxAppSubnetPrefix": "10.0.2.0/24", "vmName": "[concat(parameters('projectName'), '-vm')]", "adminUsername": "stfadmin", - "adminPassword": "iis6!dfu", + "adminPassword": "iis6!dfu", "peeredVmName": "peered-vm", "functionAppName": "[concat(parameters('projectName'), '-functionapp')]", "privateAppName": "[concat(parameters('projectName'), '-privateapp')]", @@ -489,7 +489,7 @@ "osProfile": { "computerName": "[variables('vmName')]", "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]" + "adminPassword": "[variables('adminPassword')]" }, "storageProfile": { "imageReference": { @@ -551,7 +551,7 @@ "osProfile": { "computerName": "[variables('peeredVmName')]", "adminUsername": "[variables('adminUsername')]", - "adminPassword": "[variables('adminPassword')]" + "adminPassword": "[variables('adminPassword')]" }, "storageProfile": { "imageReference": { @@ -1130,10 +1130,10 @@ "properties": { "secret1": "[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('secret1ResourceId')).secretUriWithVersion, ')')]", "storageKeySecret": "[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('storageKeySecretResourceId')).secretUriWithVersion, ')')]", - "WEBSITE_DNS_SERVER": "168.63.129.16", + "WEBSITE_DNS_SERVER": "168.63.129.16", "WEBSITE_VNET_ROUTE_ALL": "1", "WEBSITE_CONTENTOVERVNET": "1", - "WEBSITE_CONTENTSHARE": "windows", + "WEBSITE_CONTENTSHARE": "windows", "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2015-05-01-preview').key1)]", "ResourceGroup": "[parameters('projectName')]" }, @@ -1165,6 +1165,30 @@ } ] }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('windowsAppName'), '/scm')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('windowsAppName'))]" + ], + "properties": { + "allow": true + } + }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('windowsAppName'), '/ftp')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('windowsAppName'))]" + ], + "properties": { + "allow": true + } + }, { "type": "Microsoft.Web/sites", "apiVersion": "2021-03-01", @@ -1267,6 +1291,30 @@ } ] }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('linuxAppName'), '/scm')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('linuxAppName'))]" + ], + "properties": { + "allow": true + } + }, + { + "type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies", + "apiVersion": "2023-01-01", + "name": "[concat(variables('linuxAppName'), '/ftp')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('linuxAppName'))]" + ], + "properties": { + "allow": true + } + }, { "type": "Microsoft.Web/sites", "apiVersion": "2021-03-01",