Skip to content

Commit be7c896

Browse files
authored
Merge pull request #115576 from rohitnayakmsft/tlsdocs
Doc updates for minimal TLS version
2 parents 9a854be + 44905b6 commit be7c896

File tree

2 files changed

+67
-5
lines changed

2 files changed

+67
-5
lines changed
95.8 KB
Loading

articles/sql-database/sql-database-connectivity-settings.md

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.date: 03/09/2020
1313

1414
# Azure SQL Connectivity Settings
1515
> [!NOTE]
16-
> This article applies to Azure SQL server, and to both SQL Database and SQL Data Warehouse databases that are created on the Azure SQL server. For simplicity, SQL Database is used when referring to both SQL Database and SQL Data Warehouse.
16+
> This article applies to the logical SQL server in Azure used for both Azure SQL Database and SQL Data Warehouse databases that are created on the logical server. For simplicity, SQL Database is used when referring to both SQL Database and SQL Data Warehouse.
1717
1818
> [!IMPORTANT]
1919
> This article does *not* apply to **Azure SQL Database Managed Instance**
@@ -23,22 +23,26 @@ This article introduces settings that control connectivity to Azure SQL Database
2323
> [!NOTE]
2424
> Once these settings are applied, they **take effect immediately** and may result in connection loss for your clients if they do not meet the requirements for each setting.
2525
26-
The connectivity settings are accessible from the **Firewalls and virtual networks** blade as shown in the screenshot below:
26+
The connectivity settings are accessible from the **Firewalls and virtual networks** screen as shown in the following screenshot:
2727

2828
![Screenshot of connectivity settings][1]
2929

3030

3131
## Deny public network access
32-
In the Azure portal, when the **Deny public network access** setting is set to **Yes**, only connections via private endpoints are allowed. When this setting is set to **No**, clients can connect using the private or public endpoint.
3332

34-
After setting **Deny public network access** to **Yes**, login attempts from clients using public endpoint will fail with the following error:
33+
Customers can connect to SQL Database using public endpoints (IP-based firewall rules, VNET based firewall rules) or private endpoints (using Private Link) as outlined in the [network access overview](sql-database-networkaccess-overview.md).
34+
35+
When **Deny public network access** setting is set to **Yes**, only connections via private endpoints are allowed and all connections via public endpoints are denied with an error message similar to:
3536

3637
```output
3738
Error 47073
38-
An instance-specific error occurred while establishing a connection to SQL Server. The public network interface on this server is not accessible. To connect to this server, use the Private Endpoint from inside your virtual network.
39+
An instance-specific error occurred while establishing a connection to SQL Server.
40+
The public network interface on this server is not accessible.
41+
To connect to this server, use the Private Endpoint from inside your virtual network.
3942
```
4043

4144
## Change Public Network Access via PowerShell
45+
4246
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
4347
> [!IMPORTANT]
4448
> The PowerShell Azure Resource Manager module is still supported by Azure SQL Database, but all future development is for the Az.Sql module. For these cmdlets, see [AzureRM.Sql](https://docs.microsoft.com/powershell/module/AzureRM.Sql/). The arguments for the commands in the Az module and in the AzureRm modules are substantially identical. The following script requires the [Azure PowerShell module](/powershell/azure/install-az-ps).
@@ -56,10 +60,12 @@ Set-AzSqlServer -ServerName sql-server-name -ResourceGroupName sql-server-group
5660
```
5761

5862
## Change Public Network Access via CLI
63+
5964
> [!IMPORTANT]
6065
> All scripts in this section requires [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
6166
6267
### Azure CLI in a bash shell
68+
6369
The following CLI script shows how to change the **Public Network Access** in a bash shell:
6470

6571
```azurecli-interactive
@@ -72,11 +78,64 @@ az sql server update -n sql-server-name -g sql-server-group --set publicNetworkA
7278
7379
```
7480

81+
## Minimal TLS Version
82+
83+
The Minimal [Transport Layer Security (TLS)](https://support.microsoft.com/help/3135244/tls-1-2-support-for-microsoft-sql-server) Version setting allows customers to control the version of TLS used by their Azure SQL Database.
84+
85+
At present we support TLS 1.0, 1.1 and 1.2. Setting a Minimal TLS Version ensures that subsequent, newer TLS versions are supported. For example, e.g., choosing a TLS version greater than 1.1. means only connections with TLS 1.1 and 1.2 are accepted and TLS 1.0 is rejected. After testing to confirm your applications supports the it, we recommend setting minimal TLS version to 1.2 since it includes fixes for vulnerabilities found in previous versions and is the highest version of TLS supported in Azure SQL Database.
86+
87+
For customers with applications that rely on older versions of TLS, we recommend setting the Minimal TLS Version per the requirements of your applications. For customers that rely on applications to connect using an unencrypted connection, we recommend not setting any Minimal TLS Version.
88+
89+
For more information, see [TLS considerations for SQL Database connectivity](sql-database-connect-query.md#tls-considerations-for-sql-database-connectivity).
90+
91+
After setting the Minimal TLS Version, login attempts from clients that are using a TLS version lower than the Minimal TLS Version of the server will fail with following error:
92+
93+
```output
94+
Error 47072
95+
Login failed with invalid TLS version
96+
```
97+
98+
## Set minimal TLS version via PowerShell
99+
100+
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
101+
> [!IMPORTANT]
102+
> The PowerShell Azure Resource Manager module is still supported by Azure SQL Database, but all future development is for the Az.Sql module. For these cmdlets, see [AzureRM.Sql](https://docs.microsoft.com/powershell/module/AzureRM.Sql/). The arguments for the commands in the Az module and in the AzureRm modules are substantially identical. The following script requires the [Azure PowerShell module](/powershell/azure/install-az-ps).
103+
104+
The following PowerShell script shows how to `Get` and `Set` the **Minimal TLS Version** property at the logical server level:
105+
106+
```powershell
107+
#Get the Public Network Access property
108+
(Get-AzSqlServer -ServerName sql-server-name -ResourceGroupName sql-server-group).PublicNetworkAccess
109+
110+
# Update Public Network Access to Disabled
111+
$SecureString = ConvertTo-SecureString "password" -AsPlainText -Force
112+
113+
Set-AzSqlServer -ServerName sql-server-name -ResourceGroupName sql-server-group -SqlAdministratorPassword $SecureString -MinimalTlsVersion "1.2"
114+
```
115+
116+
## Set Minimal TLS Version via Azure CLI
117+
118+
> [!IMPORTANT]
119+
> All scripts in this section requires [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
120+
121+
### Azure CLI in a bash shell
122+
123+
The following CLI script shows how to change the **Minimal TLS Version** setting in a bash shell:
124+
125+
```azurecli-interactive
126+
# Get current setting for Minimal TLS Version
127+
az sql server show -n sql-server-name -g sql-server-group --query "minimalTlsVersion"
128+
129+
# Update setting for Minimal TLS Version
130+
az sql server update -n sql-server-name -g sql-server-group --set minimalTlsVersion="1.2"
131+
```
75132

76133
## Connection policy
134+
77135
[Connection policy](sql-database-connectivity-architecture.md#connection-policy) determines how clients connect to Azure SQL Server.
78136

79137
## Change Connection policy via PowerShell
138+
80139
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
81140
> [!IMPORTANT]
82141
> The PowerShell Azure Resource Manager module is still supported by Azure SQL Database, but all future development is for the Az.Sql module. For these cmdlets, see [AzureRM.Sql](https://docs.microsoft.com/powershell/module/AzureRM.Sql/). The arguments for the commands in the Az module and in the AzureRm modules are substantially identical. The following script requires the [Azure PowerShell module](/powershell/azure/install-az-ps).
@@ -98,6 +157,7 @@ Set-AzResource -ResourceId $id -Properties @{"connectionType" = "Proxy"} -f
98157
```
99158

100159
## Change Connection policy via Azure CLI
160+
101161
> [!IMPORTANT]
102162
> All scripts in this section requires [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
103163
@@ -119,6 +179,7 @@ az resource update --ids $ids --set properties.connectionType=Proxy
119179
```
120180

121181
### Azure CLI from a Windows command prompt
182+
122183
The following CLI script shows how to change the connection policy from a Windows command prompt (with Azure CLI installed).
123184

124185
```azurecli
@@ -133,6 +194,7 @@ az resource update --ids %sqlserverid% --set properties.connectionType=Proxy
133194
```
134195

135196
## Next steps
197+
136198
- For an overview of how connectivity works in Azure SQL Database, refer to [Azure SQL Connectivity Architecture](sql-database-connectivity-architecture.md)
137199
- For information on how to change the Azure SQL Database connection policy for an Azure SQL Database server, see [conn-policy](https://docs.microsoft.com/cli/azure/sql/server/conn-policy).
138200

0 commit comments

Comments
 (0)