Skip to content

Commit 13e541c

Browse files
Update app-service-web-configure-tls-mutual-auth.md
------- cc: @cephalin
1 parent 7ef0e12 commit 13e541c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

articles/app-service/app-service-web-configure-tls-mutual-auth.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,59 @@ To set up your app to require client certificates:
2727

2828
1. Set **Client certificate mode** to **Require**. Click **Save** at the top of the page.
2929

30+
### [Azure CLI](#tab/azurecli)
3031
To do the same with Azure CLI, run the following command in the [Cloud Shell](https://shell.azure.com):
3132

3233
```azurecli-interactive
3334
az webapp update --set clientCertEnabled=true --name <app-name> --resource-group <group-name>
3435
```
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+
---
3583

3684
## Exclude paths from requiring authentication
3785

0 commit comments

Comments
 (0)