Skip to content

Commit 5a6e6c6

Browse files
authored
Merge pull request #34432 from WilliamDAssafMSFT/20250610-freshness
20250616 freshness pass
2 parents f9586fa + 914fa96 commit 5a6e6c6

File tree

81 files changed

+738
-721
lines changed

Some content is hidden

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

81 files changed

+738
-721
lines changed

azure-sql/database/azure-defender-for-sql.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ description: Learn about functionality for managing your database vulnerabilitie
55
author: cesanu
66
ms.author: cesanu
77
ms.reviewer: maghan, mathoma
8-
ms.date: 07/04/2023
8+
ms.date: 06/13/2025
99
ms.service: azure-sql
1010
ms.subservice: security
1111
ms.topic: conceptual
12-
ms.custom: sqldbrb=2
13-
monikerRange: "= azuresql || = azuresql-db || = azuresql-mi"
12+
ms.custom:
13+
- sqldbrb=2
14+
monikerRange: "=azuresql || =azuresql-db || =azuresql-mi"
1415
---
1516

1617
# Microsoft Defender for SQL
@@ -24,7 +25,7 @@ Microsoft Defender for SQL is a Defender plan in Microsoft Defender for Cloud. M
2425
Microsoft Defender for SQL provides a set of advanced SQL security capabilities, including SQL Vulnerability Assessment and Advanced Threat Protection.
2526

2627
- [Vulnerability Assessment](/azure/defender-for-cloud/sql-azure-vulnerability-assessment-overview) is an easy-to-configure service that can discover, track, and help you remediate potential database vulnerabilities. It provides visibility into your security state, and it includes actionable steps to resolve security issues and enhance your database fortifications.
27-
- [Advanced Threat Protection](threat-detection-overview.md) detects anomalous activities indicating unusual and potentially harmful attempts to access or exploit your database. It continuously monitors your database for suspicious activities, and it provides immediate security alerts on potential vulnerabilities, Azure SQL injection attacks, and anomalous database access patterns. Advanced Threat Protection alerts provide details of the suspicious activity and recommend action on how to investigate and mitigate the threat.
28+
- [SQL Advanced Threat Protection](threat-detection-overview.md) detects anomalous activities indicating unusual and potentially harmful attempts to access or exploit your database. It continuously monitors your database for suspicious activities, and it provides immediate security alerts on potential vulnerabilities, Azure SQL injection attacks, and anomalous database access patterns. Advanced Threat Protection alerts provide details of the suspicious activity and recommend action on how to investigate and mitigate the threat.
2829

2930
Enable Microsoft Defender for SQL once to enable all these included features. With one select, you can enable Microsoft Defender for all databases on your [server](logical-servers.md) in Azure or in your SQL Managed Instance. Enabling or managing Microsoft Defender for SQL settings requires belonging to the [SQL security manager](/azure/role-based-access-control/built-in-roles#sql-security-manager) role, or one of the database or server admin roles.
3031

@@ -98,8 +99,8 @@ To view and manage Microsoft Defender for SQL settings:
9899

99100
1. Make the necessary changes and select **Save**.
100101

101-
## Next steps
102+
## Related content
102103

103-
- Learn more about [Vulnerability Assessment](/azure/defender-for-cloud/sql-azure-vulnerability-assessment-overview)
104-
- Learn more about [Advanced Threat Protection](threat-detection-configure.md)
105-
- Learn more about [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)
104+
- [Vulnerability Assessment](/azure/defender-for-cloud/sql-azure-vulnerability-assessment-overview)
105+
- [Configure Advanced Threat Protection for Azure SQL Database](threat-detection-configure.md)
106+
- [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)

azure-sql/database/azure-sql-passwordless-migration-nodejs.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
---
2-
title: Migrate a Node.js application to use passwordless connections
2+
title: "Migrate a Node.js Application to Use Passwordless Connections"
33
description: Learn how to migrate a Node.js application to use passwordless connections with Azure SQL Database.
44
author: diberry
55
ms.author: rotabor
66
ms.reviewer: mathoma
7-
ms.date: 06/05/2023
7+
ms.date: 06/13/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
10-
monikerRange: "= azuresql || = azuresql-db"
1110
ms.topic: how-to
12-
ms.custom: passwordless-js, devx-track-azurecli, devx-track-javascript
11+
ms.custom:
12+
- passwordless-js
13+
- devx-track-azurecli
14+
- devx-track-javascript
1315
ms.devlang: nodejs
16+
monikerRange: "=azuresql || =azuresql-db"
1417
---
1518

1619
# Migrate a Node.js application to use passwordless connections with Azure SQL Database
20+
1721
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
1822

1923
Application requests to Azure SQL Database must be authenticated. Although there are multiple options for authenticating to Azure SQL Database, you should prioritize passwordless connections in your applications when possible. Traditional authentication methods that use passwords or secret keys create security risks and complications. Visit the [passwordless connections for Azure services](/azure/developer/intro/passwordless-overview) hub to learn more about the advantages of moving to passwordless connections.
@@ -48,7 +52,7 @@ Create a user in Azure SQL Database. The user should correspond to the Azure acc
4852
AZURE_SQL_PORT=1433
4953
```
5054

51-
2. Existing application code that connects to Azure SQL Database using the [Node.js SQL Driver - tedious](/sql/connect/node-js/node-js-driver-for-sql-server) continues to work with passwordless connections with minor changes. To use a **user-assigned** managed identity, pass the `authentication.type` and `options.clientId` properties.
55+
1. Existing application code that connects to Azure SQL Database using the [Node.js SQL Driver - tedious](/sql/connect/node-js/node-js-driver-for-sql-server) continues to work with passwordless connections with minor changes. To use a **user-assigned** managed identity, pass the `authentication.type` and `options.clientId` properties.
5256

5357
```nodejs
5458
import sql from 'mssql';
@@ -77,12 +81,12 @@ Create a user in Azure SQL Database. The user should correspond to the Azure acc
7781
config = {};
7882
poolconnection = null;
7983
connected = false;
80-
84+
8185
constructor(config) {
8286
this.config = config;
8387
console.log(`Database: config: ${JSON.stringify(config)}`);
8488
}
85-
89+
8690
async connect() {
8791
try {
8892
console.log(`Database connecting...${this.connected}`);
@@ -97,7 +101,7 @@ Create a user in Azure SQL Database. The user should correspond to the Azure acc
97101
console.error(`Error connecting to database: ${JSON.stringify(error)}`);
98102
}
99103
}
100-
104+
101105
async disconnect() {
102106
try {
103107
this.poolconnection.close();
@@ -106,16 +110,16 @@ Create a user in Azure SQL Database. The user should correspond to the Azure acc
106110
console.error(`Error closing database connection: ${error}`);
107111
}
108112
}
109-
113+
110114
async executeQuery(query) {
111115
await this.connect();
112116
const request = this.poolconnection.request();
113117
const result = await request.query(query);
114-
118+
115119
return result.rowsAffected[0];
116120
}
117121
}
118-
122+
119123
const databaseClient = new Database(config);
120124
const result = await databaseClient.executeQuery(`select * from mytable where id = 10`);
121125
```
@@ -124,7 +128,7 @@ Create a user in Azure SQL Database. The user should correspond to the Azure acc
124128

125129
### Test the app
126130

127-
Run your app locally and verify that the connections to Azure SQL Database are working as expected. Keep in mind that it may take several minutes for changes to Azure users and roles to propagate through your Azure environment. Your application is now configured to run locally without developers having to manage secrets in the application itself.
131+
Run your app locally and verify that the connections to Azure SQL Database are working as expected. Keep in mind that it can take several minutes for changes to Azure users and roles to propagate through your Azure environment. Your application is now configured to run locally without developers having to manage secrets in the application itself.
128132

129133
## Configure the Azure hosting environment
130134

@@ -146,25 +150,25 @@ Configure your web app to use the user-assigned managed identity you created.
146150
147151
Complete the following steps in the Azure portal to associate the user-assigned managed identity with your app. These same steps apply to the following Azure services:
148152
149-
* Azure Spring Apps
150-
* Azure Container Apps
151-
* Azure virtual machines
152-
* Azure Kubernetes Service
153-
* Navigate to the overview page of your web app.
153+
- Azure Spring Apps
154+
- Azure Container Apps
155+
- Azure virtual machines
156+
- Azure Kubernetes Service
157+
- Navigate to the overview page of your web app.
154158
155-
1) Select **Identity** from the left navigation.
159+
1. Select **Identity** from the left navigation.
156160
157-
1) On the **Identity** page, switch to the **User assigned** tab.
161+
1. On the **Identity** page, switch to the **User assigned** tab.
158162
159-
1) Select **+ Add** to open the **Add user assigned managed identity** flyout.
163+
1. Select **+ Add** to open the **Add user assigned managed identity** flyout.
160164
161-
1) Select the subscription you used previously to create the identity.
165+
1. Select the subscription you used previously to create the identity.
162166
163-
1) Search for the **MigrationIdentity** by name and select it from the search results.
167+
1. Search for the **MigrationIdentity** by name and select it from the search results.
164168
165-
1) Select **Add** to associate the identity with your app.
169+
1. Select **Add** to associate the identity with your app.
166170
167-
:::image type="content" source="media/passwordless-connections/assign-managed-identity-small.png" lightbox="media/passwordless-connections/assign-managed-identity.png" alt-text="A screenshot showing how to assign a managed identity.":::
171+
:::image type="content" source="media/azure-sql-passwordless-migration-nodejs/assign-managed-identity-small.png" lightbox="media/azure-sql-passwordless-migration-nodejs/assign-managed-identity.png" alt-text="Screenshot showing how to assign a managed identity.":::
168172
169173
# [Azure CLI](#tab/azure-cli-assign)
170174
@@ -183,7 +187,7 @@ To use the **user-assigned** managed identity, create an `AZURE_CLIENT_ID` envir
183187
Save your changes and restart the application if it doesn't do so automatically.
184188

185189
If you need to use a **system-assigned** managed identity, omit the `options.clientId` property. You still need to pass the `authentication.type` property.
186-
190+
187191
```nodejs
188192
const config = {
189193
server,
@@ -200,13 +204,9 @@ const config = {
200204

201205
### Test the application
202206

203-
Test your app to make sure everything is still working. It may take a few minutes for all of the changes to propagate through your Azure environment.
204-
205-
## Next steps
206-
207-
In this tutorial, you learned how to migrate an application to passwordless connections.
207+
Test your app to make sure everything is still working. It can take a few minutes for all of the changes to propagate through your Azure environment.
208208

209-
You can read the following resources to explore the concepts discussed in this article in more depth:
209+
## Related content
210210

211211
- [Passwordless overview](/azure/developer/intro/passwordless-overview)
212212
- [Managed identity best practices](/azure/active-directory/managed-identities-azure-resources/managed-identity-best-practice-recommendations)

azure-sql/database/azure-sql-passwordless-migration-python.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
---
2-
title: Migrate a Python application to use passwordless connections
2+
title: Migrate a Python Application to Use Passwordless Connections
33
description: Learn how to migrate a Python application to use passwordless connections with Azure SQL Database.
44
author: bobtabor-msft
55
ms.author: rotabor
66
ms.reviewer: mathoma
7-
ms.date: 10/11/2023
7+
ms.date: 06/13/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
10-
monikerRange: "= azuresql || = azuresql-db"
1110
ms.topic: how-to
12-
ms.custom: devx-track-csharp, passwordless-python, devx-track-azurecli
11+
ms.custom:
12+
- devx-track-csharp
13+
- passwordless-python
14+
- devx-track-azurecli
1315
ms.devlang: python
16+
monikerRange: "=azuresql || =azuresql-db"
1417
---
1518

1619
# Migrate a Python application to use passwordless connections with Azure SQL Database
20+
1721
[!INCLUDE[appliesto-sqldb](../includes/appliesto-sqldb.md)]
1822

1923
Application requests to Azure SQL Database must be authenticated. Although there are multiple options for authenticating to Azure SQL Database, you should prioritize passwordless connections in your applications when possible. Traditional authentication methods that use passwords or secret keys create security risks and complications. Visit the [passwordless connections for Azure services](/azure/developer/intro/passwordless-overview) hub to learn more about the advantages of moving to passwordless connections. The following tutorial explains how to migrate an existing Python application to connect to Azure SQL Database to use passwordless connections instead of a username and password solution.
@@ -74,7 +78,7 @@ Driver={ODBC Driver 18 for SQL Server};Server=tcp:<database-server-name>.databas
7478

7579
### Test the app
7680

77-
Run your app locally and verify that the connections to Azure SQL Database are working as expected. Keep in mind that it may take several minutes for changes to Azure users and roles to propagate through your Azure environment. Your application is now configured to run locally without developers having to manage secrets in the application itself.
81+
Run your app locally and verify that the connections to Azure SQL Database are working as expected. Keep in mind that it can take several minutes for changes to Azure users and roles to propagate through your Azure environment. Your application is now configured to run locally without developers having to manage secrets in the application itself.
7882

7983
## Configure the Azure hosting environment
8084

@@ -95,25 +99,25 @@ Configure your web app to use the user-assigned managed identity you created.
9599

96100
Complete the following steps in the Azure portal to associate the user-assigned managed identity with your app. These same steps apply to the following Azure services:
97101

98-
* Azure Spring Apps
99-
* Azure Container Apps
100-
* Azure virtual machines
101-
* Azure Kubernetes Service
102-
* Navigate to the overview page of your web app.
102+
- Azure Spring Apps
103+
- Azure Container Apps
104+
- Azure virtual machines
105+
- Azure Kubernetes Service
106+
- Navigate to the overview page of your web app.
103107

104-
1) Select **Identity** from the left navigation.
108+
1. Select **Identity** from the left navigation.
105109

106-
1) On the **Identity** page, switch to the **User assigned** tab.
110+
1. On the **Identity** page, switch to the **User assigned** tab.
107111

108-
1) Select **+ Add** to open the **Add user assigned managed identity** flyout.
112+
1. Select **+ Add** to open the **Add user assigned managed identity** flyout.
109113

110-
1) Select the subscription you used previously to create the identity.
114+
1. Select the subscription you used previously to create the identity.
111115

112-
1) Search for the **MigrationIdentity** by name and select it from the search results.
116+
1. Search for the **MigrationIdentity** by name and select it from the search results.
113117

114-
1) Select **Add** to associate the identity with your app.
118+
1. Select **Add** to associate the identity with your app.
115119

116-
:::image type="content" source="media/passwordless-connections/assign-managed-identity-small.png" lightbox="media/passwordless-connections/assign-managed-identity.png" alt-text="A screenshot showing how to assign a managed identity.":::
120+
:::image type="content" source="media/azure-sql-passwordless-migration-python/assign-managed-identity-small.png" lightbox="media/azure-sql-passwordless-migration-python/assign-managed-identity.png" alt-text="Screenshot showing how to assign a managed identity.":::
117121

118122
# [Azure CLI](#tab/azure-cli-assign)
119123

@@ -131,15 +135,15 @@ Update your Azure app configuration to use the passwordless connection string fo
131135

132136
Connection strings can be stored as environment variables in your app hosting environment. The following instructions focus on App Service, but other Azure hosting services provide similar configurations.
133137

134-
```
138+
```connectionstring
135139
Driver={ODBC Driver 18 for SQL Server};Server=tcp:<database-server-name>.database.windows.net,1433;Database=<database-name>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30
136140
```
137141

138142
`<database-server-name>` is the name of your Azure SQL Database server and `<database-name>` is the name of your Azure SQL Database.
139143

140144
### Create an app setting for the managed identity client ID
141145

142-
To use the user-assigned managed identity, create an AZURE_CLIENT_ID environment variable and set it equal to the client ID of the managed identity. You can set this variable in the **Configuration** section of your app in the Azure portal. You can find the client ID in the **Overview** section of the managed identity resource in the Azure portal.
146+
To use the user-assigned managed identity, create an `AZURE_CLIENT_ID` environment variable and set it equal to the client ID of the managed identity. You can set this variable in the **Configuration** section of your app in the Azure portal. You can find the client ID in the **Overview** section of the managed identity resource in the Azure portal.
143147

144148
Save your changes and restart the application if it doesn't do so automatically.
145149

@@ -150,13 +154,9 @@ Save your changes and restart the application if it doesn't do so automatically.
150154
151155
### Test the application
152156

153-
Test your app to make sure everything is still working. It may take a few minutes for all of the changes to propagate through your Azure environment.
154-
155-
## Next steps
156-
157-
In this tutorial, you learned how to migrate an application to passwordless connections.
157+
Test your app to make sure everything is still working. It can take a few minutes for all of the changes to propagate through your Azure environment.
158158

159-
You can read the following resources to explore the concepts discussed in this article in more depth:
159+
## Related content
160160

161161
- [Passwordless overview](/azure/developer/intro/passwordless-overview)
162162
- [Managed identity best practices](/azure/active-directory/managed-identities-azure-resources/managed-identity-best-practice-recommendations)

0 commit comments

Comments
 (0)