Skip to content

Commit 444941a

Browse files
authored
Merge pull request #34369 from WilliamDAssafMSFT/20250610-freshness
20250610 freshness pass
2 parents 192bfb6 + a43b0d7 commit 444941a

File tree

101 files changed

+610
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+610
-605
lines changed

azure-sql/database/active-directory-interactive-connect-azure-sql-db.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Connect .NET with Microsoft Entra multifactor authentication
2+
title: "Connect .NET with Microsoft Entra Multifactor Authentication"
33
description: "C# Code example, with explanations, for connecting to Azure SQL Database by using SqlAuthenticationMethod.ActiveDirectoryInteractive mode."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: wiassaf, vanto, mathoma
7-
ms.date: 09/27/2023
7+
ms.date: 06/10/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
1010
ms.topic: how-to
@@ -16,6 +16,7 @@ ms.custom:
1616
monikerRange: "=azuresql || =azuresql-db || =fabricsql"
1717
---
1818
# Connect to Azure SQL Database with Microsoft Entra multifactor authentication
19+
1920
[!INCLUDE [appliesto-sqldb-fabricsqldb](../includes/appliesto-sqldb-fabricsqldb.md)]
2021

2122
This article provides a C# program that connects to Azure SQL Database. The program uses interactive mode authentication, which supports [multifactor authentication](/azure/active-directory/authentication/concept-mfa-howitworks) using Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)).
@@ -24,21 +25,21 @@ For more information about multifactor authentication support for SQL tools, see
2425

2526
[!INCLUDE [entra-id](../includes/entra-id.md)]
2627

27-
<a name='multi-factor-authentication-for-azure-sql-database'></a>
28+
<a id="multi-factor-authentication-for-azure-sql-database"></a>
2829

2930
## Multifactor authentication for Azure SQL Database
3031

3132
`Active Directory Interactive` authentication supports multifactor authentication using [Microsoft.Data.SqlClient](/sql/connect/ado-net/introduction-microsoft-data-sqlclient-namespace) to connect to Azure SQL data sources. In a client C# program, the enum value directs the system to use the Microsoft Entra interactive mode that supports multifactor authentication to connect to Azure SQL Database. The user who runs the program sees the following dialog boxes:
3233

33-
* A dialog box that displays a Microsoft Entra user name and asks for the user's password.
34+
- A dialog box that displays a Microsoft Entra user name and asks for the user's password.
3435

3536
If the user's domain is federated with Microsoft Entra ID, the dialog box doesn't appear, because no password is needed.
3637

3738
If the Microsoft Entra policy imposes multifactor authentication on the user, a dialog box to sign in to your account will display.
3839

39-
* The first time a user goes through multifactor authentication, the system displays a dialog box that asks for a mobile phone number to send text messages to. Each message provides the *verification code* that the user must enter in the next dialog box.
40+
- The first time a user goes through multifactor authentication, the system displays a dialog box that asks for a mobile phone number to send text messages to. Each message provides the *verification code* that the user must enter in the next dialog box.
4041

41-
* A dialog box that asks for a multifactor authentication verification code, which the system has sent to a mobile phone.
42+
- A dialog box that asks for a multifactor authentication verification code, which the system has sent to a mobile phone.
4243

4344
For information about how to configure Microsoft Entra ID to require multifactor authentication, see [Getting started with Microsoft Entra multifactor authentication in the cloud](/azure/active-directory/authentication/howto-mfa-getstarted).
4445

@@ -49,11 +50,11 @@ For screenshots of these dialog boxes, see [Using Microsoft Entra multifactor au
4950
>
5051
> You can also search directly with the [optional ?term=&lt;search value&gt; parameter](/dotnet/api/?term=SqlAuthenticationMethod).
5152
52-
## Prerequisite
53+
## Prerequisites
5354

5455
Before you begin, you should have a [logical SQL server](logical-servers.md) created and available.
5556

56-
<a name='set-an-azure-ad-admin-for-your-server'></a>
57+
<a id="set-an-azure-ad-admin-for-your-server"></a>
5758

5859
### Set a Microsoft Entra admin for your server
5960

@@ -78,7 +79,7 @@ Before you run the C# example, it's a good idea to check that your setup and con
7879

7980
Run SSMS from the same computer, in the same building, where you plan to run the C# example. For this test, any **Authentication** mode is OK. If there's any indication that the server isn't accepting your IP address, see [server-level and database-level firewall rules](firewall-configure.md) for help.
8081

81-
<a name='verify-azure-active-directory-multi-factor-authentication'></a>
82+
<a id="verify-azure-active-directory-multi-factor-authentication"></a>
8283

8384
### Verify Microsoft Entra multifactor authentication
8485

@@ -99,7 +100,6 @@ For more information, see [Using Microsoft Entra multifactor authentication](./a
99100
This is an example of C# source code.
100101

101102
```csharp
102-
103103
using System;
104104
using Microsoft.Data.SqlClient;
105105

@@ -111,7 +111,6 @@ public class Program
111111
// Connection string - user ID is not provided and is asked interactively.
112112
string ConnectionString = @"Server=<your server>.database.windows.net; Authentication=Active Directory Interactive; Database=<your database>";
113113

114-
115114
using (SqlConnection conn = new SqlConnection(ConnectionString))
116115

117116
{
@@ -129,21 +128,20 @@ public class Program
129128

130129
}
131130
}
132-
133131
```
134132

135133
&nbsp;
136134

137135
This is an example of the C# test output.
138136

139-
```C#
137+
```console
140138
ConnectionString2 succeeded.
141139
select @@version
142140
Microsoft SQL Azure (RTM) - 12.0.2000.8
143141
...
144142
```
145143

146-
## Next steps
144+
## Related content
147145

148146
- [Microsoft Entra server principals](authentication-azure-ad-logins.md)
149147
- [Microsoft Entra-only authentication with Azure SQL](authentication-azure-ad-only-authentication.md)

azure-sql/database/active-geo-replication-security-configure.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
---
2-
title: Configure security for disaster recovery
2+
title: Configure Security for Disaster Recovery
33
description: Learn the security considerations for configuring and managing security after a database restore or a failover to a secondary server.
44
author: rajeshsetlem
55
ms.author: rsetlem
66
ms.reviewer: wiassaf, mathoma, vanto
7-
ms.date: 12/18/2018
7+
ms.date: 06/10/2025
88
ms.service: azure-sql-database
99
ms.subservice: high-availability
1010
ms.topic: how-to
11-
ms.custom: sqldbrb=1
11+
ms.custom:
12+
- sqldbrb=1
1213
---
1314
# Configure and manage Azure SQL Database security for geo-restore or failover
15+
1416
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
1517

16-
This article describes the authentication requirements to configure and control [active geo-replication](active-geo-replication-overview.md) and [failover groups](failover-group-sql-db.md). It also provides the steps required to set up user access to the secondary database. Finally, it also describes how to enable access to the recovered database after using [geo-restore](recovery-using-backups.md#geo-restore). For more information on recovery options, see [Business Continuity Overview](business-continuity-high-availability-disaster-recover-hadr-overview.md).
18+
This article describes the authentication requirements to configure and control [active geo-replication](active-geo-replication-overview.md) and [failover groups](failover-group-sql-db.md). It also provides the steps required to set up user access to the secondary database. Finally, it also describes how to enable access to the recovered database after using [geo-restore](recovery-using-backups.md#geo-restore). For more information on recovery options, see [Business continuity in Azure SQL Database](business-continuity-high-availability-disaster-recover-hadr-overview.md).
1719

1820
## Disaster recovery with contained users
1921

2022
Unlike traditional users, which must be mapped to logins in the `master` database, a contained user is managed completely by the database itself. This has two benefits. In the disaster recovery scenario, the users can continue to connect to the new primary database or the database recovered using geo-restore without any additional configuration, because the database manages the users. There are also potential scalability and performance benefits from this configuration from a login perspective. For more information, see [Contained Database Users - Making Your Database Portable](/sql/relational-databases/security/contained-database-users-making-your-database-portable).
2123

22-
The main trade-off is that managing the disaster recovery process at scale is more challenging. When you have multiple databases that use the same login, maintaining the credentials using contained users in multiple databases may negate the benefits of contained users. For example, the password rotation policy requires that changes be made consistently in multiple databases rather than changing the password for the login once in the `master` database. For this reason, if you have multiple databases that use the same user name and password, using contained users is not recommended.
24+
The main trade-off is that managing the disaster recovery process at scale is more challenging. When you have multiple databases that use the same login, maintaining the credentials using contained users in multiple databases might negate the benefits of contained users. For example, the password rotation policy requires that changes be made consistently in multiple databases rather than changing the password for the login once in the `master` database. For this reason, if you have multiple databases that use the same user name and password, using contained users is not recommended.
2325

2426
## How to configure logins and users
2527

2628
If you are using logins and users (rather than contained users), you must take extra steps to ensure that the same logins exist in the `master` database. The following sections outline the steps involved and additional considerations.
2729

2830
>[!NOTE]
29-
> It's also possible to use logins created from Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)) to manage your databases. For more information, see [Azure SQL logins and users](./logins-create-manage.md).
31+
> It's also possible to use logins created from Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)) to manage your databases. For more information, see [Authorize database access](logins-create-manage.md).
3032
3133
### Set up user access to a secondary or recovered database
3234

3335
In order for the secondary database to be usable as a read-only secondary database, and to ensure proper access to the new primary database or the database recovered using geo-restore, the `master` database of the target server must have the appropriate security configuration in place before the recovery.
3436

35-
The specific permissions for each step are described later in this topic.
36-
37-
Preparing user access to a geo-replication secondary should be performed as part configuring geo-replication. Preparing user access to the geo-restored databases should be performed at any time when the original server is online (e.g. as part of the DR drill).
37+
Preparing user access to a geo-replication secondary should be performed as part configuring geo-replication. Preparing user access to the geo-restored databases should be performed at any time when the original server is online (as part of the disaster recovery test).
3838

3939
> [!NOTE]
4040
> If you fail over or geo-restore to a server that does not have properly configured logins, access to it will be limited to the server admin account.
4141
42-
Setting up logins on the target server involves three steps outlined below:
42+
Setting up logins on the target server involves three steps:
4343

4444
#### 1. Determine logins with access to the primary database
4545

4646
The first step of the process is to determine which logins must be duplicated on the target server. This is accomplished with a pair of SELECT statements, one in the logical `master` database on the source server and one in the primary database itself.
4747

48-
Only the server admin or a member of the **LoginManager** server role can determine the logins on the source server with the following SELECT statement.
48+
Only the server admin or a member of the **LoginManager** server role can determine the logins on the source server with the following `SELECT` statement.
4949

5050
```sql
5151
SELECT [name], [sid]
@@ -74,7 +74,7 @@ WHERE [type_desc] = 'SQL_USER'
7474
```
7575

7676
> [!NOTE]
77-
> The **INFORMATION_SCHEMA** and **sys** users have *NULL* SIDs, and the **guest** SID is **0x00**. The **dbo** SID may start with *0x01060000000001648000000000048454*, if the database creator was the server admin instead of a member of **DbManager**.
77+
> The `INFORMATION_SCHEMA` and `sys` users have `NULL` SIDs, and the `guest` SID is `0x00`. The `dbo` SID might start with `0x01060000000001648000000000048454` if the database creator was the server admin instead of a member of **DbManager**.
7878
7979
#### 3. Create the logins on the target server
8080

@@ -97,10 +97,10 @@ On the target server, do not create a new login with the server admin SID from t
9797
>
9898
> DISABLE doesn't change the password, so you can always enable it if needed.
9999
100-
## Next steps
100+
## Related content
101101
102-
* For more information on managing database access and logins, see [SQL Database security: Manage database access and login security](logins-create-manage.md).
103-
* For more information on contained database users, see [Contained Database Users - Making Your Database Portable](/sql/relational-databases/security/contained-database-users-making-your-database-portable).
104-
* To learn about active geo-replication, see [Active geo-replication](active-geo-replication-overview.md).
105-
* To learn about failover groups, see [Failover groups](failover-group-sql-db.md).
106-
* For information about using geo-restore, see [geo-restore](recovery-using-backups.md#geo-restore)
102+
- [Authorize database access to SQL Database, SQL Managed Instance, and Azure Synapse Analytics](logins-create-manage.md)
103+
- [Contained Database Users - Making Your Database Portable](/sql/relational-databases/security/contained-database-users-making-your-database-portable)
104+
- [Active geo-replication](active-geo-replication-overview.md)
105+
- [Failover groups overview & best practices (Azure SQL Database)](failover-group-sql-db.md)
106+
- [Geo-restore](recovery-using-backups.md#geo-restore)

azure-sql/database/always-encrypted-enclaves-configure-attestation.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
title: "Configure attestation for Always Encrypted using Azure Attestation"
2+
title: "Configure Attestation for Always Encrypted Using Azure Attestation"
33
description: Configure Azure Attestation for Always Encrypted with secure enclaves in Azure SQL Database.
44
author: Pietervanhove
55
ms.author: pivanho
66
ms.reviewer: vanto, mathoma
7-
ms.date: 11/14/2023
7+
ms.date: 06/10/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
10-
ms.custom: ignite-2023
1110
ms.topic: how-to
11+
ms.custom:
12+
- ignite-2023
1213
keywords:
1314
- "encrypt data"
1415
- "sql encryption"
@@ -30,7 +31,7 @@ To use Azure Attestation for attesting Intel SGX enclaves used for [Always Encry
3031

3132
1. Create an [attestation provider](/azure/attestation/basic-concepts#attestation-provider) and configure it with the recommended attestation policy.
3233

33-
2. Determine the attestation URL and share it with application administrators.
34+
1. Determine the attestation URL and share it with application administrators.
3435

3536
> [!IMPORTANT]
3637
>With Intel SGX enclaves in Azure SQL Database, attestation is mandatory and it requires Microsoft Azure Attestation.
@@ -71,23 +72,23 @@ authorizationrules
7172
The policy verifies:
7273

7374
- The enclave inside Azure SQL Database doesn't support debugging.
74-
75+
7576
Enclaves can be loaded with debugging disabled or enabled. Debugging support is designed to allow developers to troubleshoot the code running in an enclave. In a production system, debugging could enable an administrator to examine the content of the enclave, which would reduce the level of protection the enclave provides. The recommended policy disables debugging to ensure that if a malicious admin tries to turn on debugging support by taking over the enclave machine, attestation will fail.
7677

7778
- The product ID of the enclave matches the product ID assigned to Always Encrypted with secure enclaves.
78-
79+
7980
Each enclave has a unique product ID that differentiates the enclave from other enclaves. The product ID assigned to the Always Encrypted enclave is 4639.
8081

8182
- The security version number (SVN) of the library is greater than or equal to 2.
82-
83+
8384
The SVN allows Microsoft to respond to potential security bugs identified in the enclave code. In case a security issue is discovered and fixed, Microsoft will deploy a new version of the enclave with a new (incremented) SVN. The recommended policy is updated to reflect the new SVN. By updating your policy to match the recommended policy, you can ensure that if a malicious administrator tries to load an older and insecure enclave, attestation will fail.
8485

8586
- The library in the enclave has been signed using the Microsoft signing key (the value of the x-ms-sgx-mrsigner claim is the hash of the signing key).
86-
87+
8788
One of the main goals of attestation is to convince clients that the binary running in the enclave is the binary that is supposed to run. Attestation policies provide two mechanisms for this purpose. One is the **mrenclave** claim, which is the hash of the binary that is supposed to run in an enclave. The problem with the **mrenclave** is that the binary hash changes even with trivial changes to the code, which makes it hard to rev the code running in the enclave. Hence, we recommend the use of the **mrsigner**, which is a hash of a key that is used to sign the enclave binary. When Microsoft revs the enclave, the **mrsigner** stays the same as long as the signing key doesn't change. In this way, it becomes feasible to deploy updated binaries without breaking customers' applications.
8889

8990
> [!IMPORTANT]
90-
> Microsoft may need to rotate the key used to sign the Always Encrypted enclave binary, which is expected to be a rare event. Before a new version of the enclave binary, signed with a new key, is deployed to Azure SQL Database, this article will be updated to provide a new recommended attestation policy and instructions on how you should update the policy in your attestation providers to ensure your applications continue to work uninterrupted.
91+
> Microsoft might need to rotate the key used to sign the Always Encrypted enclave binary, which is expected to be a rare event. Before a new version of the enclave binary, signed with a new key, is deployed to Azure SQL Database, this article will be updated to provide a new recommended attestation policy and instructions on how you should update the policy in your attestation providers to ensure your applications continue to work uninterrupted.
9192
9293
For instructions for how to create an attestation provider and configure with an attestation policy using:
9394

@@ -119,10 +120,11 @@ Get-AzAttestation -Name $attestationProviderName -ResourceGroupName $attestation
119120

120121
For more information, see [Create and manage an attestation provider](/azure/attestation/quickstart-powershell#create-and-manage-an-attestation-provider).
121122

122-
## Next steps
123+
## Next step
123124

124-
- [Manage keys for Always Encrypted with secure enclaves](/sql/relational-databases/security/encryption/always-encrypted-enclaves-manage-keys)
125+
> [!div class="nextstepaction"]
126+
> [Manage keys for Always Encrypted with secure enclaves](/sql/relational-databases/security/encryption/always-encrypted-enclaves-manage-keys)
125127
126-
## See also
128+
## Related content
127129

128130
- [Getting started using Always Encrypted with secure enclaves](always-encrypted-enclaves-getting-started.md)

0 commit comments

Comments
 (0)