@@ -27,11 +27,59 @@ To set up your app to require client certificates:
27
27
28
28
1 . Set ** Client certificate mode** to ** Require** . Click ** Save** at the top of the page.
29
29
30
+ ### [ Azure CLI] ( #tab/azurecli )
30
31
To do the same with Azure CLI, run the following command in the [ Cloud Shell] ( https://shell.azure.com ) :
31
32
32
33
``` azurecli-interactive
33
34
az webapp update --set clientCertEnabled=true --name <app-name> --resource-group <group-name>
34
35
```
36
+ ### [ Bicep] ( #tab/bicep )
37
+
38
+ For Bicep, modify the properties ` clientCertEnabled ` , ` clientCertMode ` , and ` clientCertExclusionPaths ` . A sampe Bicep snippet is provided for you:
39
+
40
+ ``` bicep
41
+ resource appService 'Microsoft.Web/sites@2020-06-01' = {
42
+ name: webSiteName
43
+ location: location
44
+ kind: 'app'
45
+ properties: {
46
+ serverFarmId: appServicePlan.id
47
+ siteConfig: {
48
+ linuxFxVersion: linuxFxVersion
49
+ }
50
+ clientCertEnabled: true
51
+ clientCertMode: 'Required'
52
+ clientCertExclusionPaths: '/sample1;/sample2'
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### [ ARM] ( #tab/arm )
58
+
59
+ For ARM templates, modify the properties ` clientCertEnabled ` , ` clientCertMode ` , and ` clientCertExclusionPaths ` . A sampe ARM template snippet is provided for you:
60
+
61
+ ``` ARM
62
+ {
63
+ "type": "Microsoft.Web/sites",
64
+ "apiVersion": "2020-06-01",
65
+ "name": "[parameters('webAppName')]",
66
+ "location": "[parameters('location')]",
67
+ "dependsOn": [
68
+ "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]"
69
+ ],
70
+ "properties": {
71
+ "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]",
72
+ "siteConfig": {
73
+ "linuxFxVersion": "[parameters('linuxFxVersion')]"
74
+ },
75
+ "clientCertEnabled": true,
76
+ "clientCertMode": "Required",
77
+ "clientCertExclusionPaths": "/sample1;/sample2"
78
+ }
79
+ }
80
+ ```
81
+
82
+ ---
35
83
36
84
## Exclude paths from requiring authentication
37
85
0 commit comments