Skip to content

Commit

Permalink
Set minimum TLS version to 1.2 (Azure-Samples#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecheta authored Feb 1, 2024
1 parent dd70af3 commit 3418860
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 57 deletions.
6 changes: 6 additions & 0 deletions infra/deployment.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
{ name: 'AZURE_SPEECH_SERVICE_REGION', value: Location}
]
linuxFxVersion: WebAppImageName
minTlsVersion: '1.2'
}
}
identity: { type: authType == 'rbac' ? 'SystemAssigned' : 'None' }
Expand Down Expand Up @@ -409,6 +410,7 @@ resource WebsiteName_admin 'Microsoft.Web/sites@2020-06-01' = {
{ name: 'AZURE_CONTENT_SAFETY_KEY', value: listKeys('Microsoft.CognitiveServices/accounts/${ContentSafetyName}', '2023-05-01').key1}
]
linuxFxVersion: AdminWebAppImageName
minTlsVersion: '1.2'
}
}
identity: { type: authType == 'rbac' ? 'SystemAssigned' : 'None' }
Expand All @@ -424,6 +426,9 @@ resource StorageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = {
sku: {
name: 'Standard_GRS'
}
properties: {
minimumTlsVersion: 'TLS1_2'
}
}

resource StorageAccountName_default_BlobContainer 'Microsoft.Storage/storageAccounts/blobServices/containers@2021-08-01' = {
Expand Down Expand Up @@ -538,6 +543,7 @@ resource Function 'Microsoft.Web/sites@2018-11-01' = {
linuxFxVersion: BackendImageName
appCommandLine: ''
alwaysOn: true
minTlsVersion: '1.2'
}
serverFarmId: HostingPlan.id
clientAffinityEnabled: false
Expand Down
120 changes: 63 additions & 57 deletions infra/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "18188660465230985501"
"version": "0.24.24.22086",
"templateHash": "8362420292927365599"
}
},
"parameters": {
Expand Down Expand Up @@ -662,7 +662,8 @@
"value": "[parameters('Location')]"
}
],
"linuxFxVersion": "[variables('WebAppImageName')]"
"linuxFxVersion": "[variables('WebAppImageName')]",
"minTlsVersion": "1.2"
}
},
"identity": {
Expand Down Expand Up @@ -833,7 +834,8 @@
"value": "[listKeys(format('Microsoft.CognitiveServices/accounts/{0}', parameters('ContentSafetyName')), '2023-05-01').key1]"
}
],
"linuxFxVersion": "[variables('AdminWebAppImageName')]"
"linuxFxVersion": "[variables('AdminWebAppImageName')]",
"minTlsVersion": "1.2"
}
},
"identity": {
Expand All @@ -854,6 +856,9 @@
"kind": "StorageV2",
"sku": {
"name": "Standard_GRS"
},
"properties": {
"minimumTlsVersion": "TLS1_2"
}
},
{
Expand Down Expand Up @@ -1048,7 +1053,8 @@
"use32BitWorkerProcess": false,
"linuxFxVersion": "[variables('BackendImageName')]",
"appCommandLine": "",
"alwaysOn": true
"alwaysOn": true,
"minTlsVersion": "1.2"
},
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('HostingPlanName'))]",
"clientAffinityEnabled": false,
Expand Down Expand Up @@ -1167,8 +1173,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1236,8 +1242,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1305,8 +1311,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1374,8 +1380,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1443,8 +1449,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1512,8 +1518,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1578,8 +1584,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1647,8 +1653,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1716,8 +1722,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1785,8 +1791,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1854,8 +1860,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1923,8 +1929,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -1992,8 +1998,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2058,8 +2064,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2127,8 +2133,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2196,8 +2202,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2265,8 +2271,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2334,8 +2340,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2400,8 +2406,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2469,8 +2475,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2538,8 +2544,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2607,8 +2613,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2673,8 +2679,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2742,8 +2748,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2811,8 +2817,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down Expand Up @@ -2880,8 +2886,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "8211880587811090337"
"version": "0.24.24.22086",
"templateHash": "2184194315885104837"
},
"description": "Creates a role assignment for a service principal."
},
Expand Down

0 comments on commit 3418860

Please sign in to comment.