You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-sql/database/azure-defender-for-sql.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Microsoft Defender for SQL
3
3
description: Learn about functionality for managing your database vulnerabilities and detecting anomalous activities that could indicate a threat to your database in Azure SQL Database, Azure SQL Managed Instance, or Azure Synapse.
4
4
author: bmansheim
5
5
ms.author: benmansheim
6
-
ms.date: 06/15/2022
6
+
ms.date: 01/16/2023
7
7
ms.service: sql-db-mi
8
8
ms.subservice: security
9
9
ms.topic: conceptual
@@ -19,10 +19,11 @@ Microsoft Defender for SQL is a Defender plan in Microsoft Defender for Cloud. M
19
19
## What are the benefits of Microsoft Defender for SQL?
20
20
21
21
Microsoft Defender for SQL provides a set of advanced SQL security capabilities, including SQL Vulnerability Assessment and Advanced Threat Protection.
22
+
22
23
-[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.
23
24
-[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.
24
25
25
-
Enable Microsoft Defender for SQL once to enable all these included features. With one click, 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.
26
+
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.
26
27
27
28
For more information about Microsoft Defender for SQL pricing, see the [Microsoft Defender for Cloud pricing page](https://azure.microsoft.com/pricing/details/security-center/).
28
29
@@ -46,15 +47,15 @@ To enable Microsoft Defender for Azure SQL Database at the subscription level fr
46
47
1. Select the relevant subscription.
47
48
1. Change the plan setting to **On**.
48
49
49
-
:::image type="content" source="media/azure-defender-for-sql/enable-azure-defender-sql-subscription-level.png" alt-text="Enabling Microsoft Defender for Azure SQL Database at the subscription level.":::
50
+
:::image type="content" source="media/azure-defender-for-sql/defender-sql-subscription-level.png" alt-text="Screenshot showing enabling Microsoft Defender for Azure SQL Database at the subscription level." lightbox="media/azure-defender-for-sql/defender-sql-subscription-level.png":::
50
51
51
52
1. Select **Save**.
52
53
53
-
### Enable Microsoft Defender plans programatically
54
+
### Enable Microsoft Defender plans programatically
54
55
55
-
The flexibility of Azure allows for a number of programmatic methods for enabling Microsoft Defender plans.
56
+
The flexibility of Azure allows for several programmatic methods for enabling Microsoft Defender plans.
56
57
57
-
Use any of the following tools to enable Microsoft Defender for your subscription:
58
+
Use any of the following tools to enable Microsoft Defender for your subscription:
58
59
59
60
| Method | Instructions |
60
61
|--------------|----------------------|
@@ -63,7 +64,6 @@ Use any of the following tools to enable Microsoft Defender for your subscriptio
### Enable Microsoft Defender for Azure SQL Database at the resource level
68
68
69
69
We recommend enabling Microsoft Defender plans at the subscription level so that new resources are automatically protected. However, if you have an organizational reason to enable Microsoft Defender for Cloud at the server level, use the following steps:
@@ -72,7 +72,7 @@ We recommend enabling Microsoft Defender plans at the subscription level so that
72
72
1. Under the **Security** heading, select **Defender for Cloud**.
73
73
1. Select **Enable Microsoft Defender for SQL**.
74
74
75
-
:::image type="content" source="media/azure-defender-for-sql/enable-azure-defender.png" alt-text="Enable Microsoft Defender for SQL from within Azure SQL databases.":::
75
+
:::image type="content" source="media/azure-defender-for-sql/enable-defender-sql.png" alt-text="Screenshot showing Enable Microsoft Defender for SQL from within Azure SQL databases." lightbox="media/azure-defender-for-sql/enable-defender-sql.png":::
76
76
77
77
> [!NOTE]
78
78
> A storage account is automatically created and configured to store your **Vulnerability Assessment** scan results. If you've already enabled Microsoft Defender for another server in the same resource group and region, then the existing storage account is used.
@@ -85,19 +85,18 @@ To view and manage Microsoft Defender for SQL settings:
85
85
86
86
1. From the **Security** area of your server or managed instance, select **Defender for Cloud**.
87
87
88
-
On this page, you'll see the status of Microsoft Defender for SQL:
88
+
On this page, you'll see the status of Microsoft Defender for SQL(disabled or enabled):
89
89
90
-
:::image type="content" source="media/azure-defender-for-sql/status-of-defender-for-sql.png" alt-text="Checking the status of Microsoft Defender for SQL inside Azure SQL databases.":::
90
+
:::image type="content" source="media/azure-defender-for-sql/enable-defender-sql-enabled-disabled.png" alt-text="Screenshot showing status as enabled or disabled." lightbox="media/azure-defender-for-sql/enable-defender-sql-enabled-disabled.png":::
91
91
92
92
1. If Microsoft Defender for SQL is enabled, you'll see a **Configure** link as shown in the previous graphic. To edit the settings for Microsoft Defender for SQL, select **Configure**.
93
93
94
-
:::image type="content" source="media/azure-defender-for-sql/security-server-settings.png" alt-text="Settings for Microsoft Defender for SQL.":::
94
+
:::image type="content" source="media/azure-defender-for-sql/defender-sql-configure.png" alt-text="Screenshot showing Configure screen for Microsoft Defender for SQL." lightbox="media/azure-defender-for-sql/defender-sql-configure.png":::
95
95
96
96
1. Make the necessary changes and select **Save**.
97
97
98
-
99
98
## Next steps
100
99
101
100
- Learn more about [Vulnerability Assessment](/azure/defender-for-cloud/sql-azure-vulnerability-assessment-overview)
102
101
- Learn more about [Advanced Threat Protection](threat-detection-configure.md)
103
-
- Learn more about [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)
102
+
- Learn more about [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)
If you are limiting access to your storage account in Azure for certain VNets or services, you'll need to enable the appropriate configuration so that Vulnerability Assessment (VA) scanning for SQL Databases or Managed Instances have access to that storage account.
18
+
If you're limiting access to your storage account in Azure for certain VNets or services, you'll need to enable the appropriate configuration so that Vulnerability Assessment (VA) scanning for SQL Databases or Azure SQL Managed Instances have access to that storage account.
18
19
19
20
## Prerequisites
20
21
21
-
1. The SQL Vulnerability Assessment service needs permission to the storage account to save baseline and scan results. There are three methods:
22
+
1. The SQL Vulnerability Assessment service needs permission to the storage account to save baseline and scan results. There are three methods:
23
+
22
24
-**Use Storage Account key**: Azure creates the SAS key and saves it (though we don't save the account key)
23
25
-**Use Storage SAS key**: The SAS key must have: Write | List | Read | Delete permissions
24
26
-**Use SQL Server managed identity**: The SQL Server must have a managed identity. The storage account must have a role assignment for the SQL Managed Identity as [Storage Blob Data Contributor](/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor). When you apply the settings, the VA fields storageContainerSasKey and storageAccountAccessKey must be empty. When storage is behind a firewall or virtual network, then the SQL managed identity is required.
25
27
28
+
When you use the Azure portal to save SQL VA settings, Azure checks if you have permission to assign a new role assignment for the managed identity as [Storage Blob Data Contributor](/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) on the storage. If permissions are assigned, Azure uses SQL Server managed identity, otherwise Azure uses the key method.
26
29
27
-
When you use the Azure portal to save SQL VA settings, Azure checks if you have permission to assign a new role assignment for the managed identity as [Storage Blob Data Contributor](/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) on the storage. If permissions are assigned, Azure uses SQL Server managed identity, otherwise Azure uses the key method.
28
-
29
-
2. If using Azure Storage lifecycle management policies, avoid moving files on the container used by VA to the archive access tier. Reading scan results or baseline configurations stored in archive access tier is not supported.
30
+
If using Azure Storage lifecycle management policies, avoid moving files on the container used by VA to the archive access tier. Reading scan results or baseline configurations stored in archive access tier isn't supported.
30
31
31
32
## Enable Azure SQL Database VA scanning access to the storage account
32
33
33
-
If you have configured your VA storage account to only be accessible by certain networks or services, you'll need to ensure that VA scans for your Azure SQL Database are able to store the scans on the storage account. You can use the existing storage account, or create a new storage account to store VA scan results for all databases on your [logical SQL server](logical-servers.md).
34
+
If you've configured your VA storage account to only be accessible by certain networks or services, you'll need to ensure that VA scans for your Azure SQL Database are able to store the scans on the storage account. You can use the existing storage account, or create a new storage account to store VA scan results for all databases on your [logical SQL server](logical-servers.md).
34
35
35
36
> [!NOTE]
36
37
> The vulnerability assessment service can't access storage accounts protected with firewalls or VNets if they require storage access keys.
@@ -39,40 +40,44 @@ Go to your **Resource group** that contains the storage account and access the *
39
40
40
41
Ensure that **Allow trusted Microsoft services access to this storage account** is checked.
41
42
42
-
:::image type="content" source="media/sql-database-vulnerability-assessment-storage/storage-allow-microsoft-services.png" alt-text="Screenshot shows Firewall and virtual networks dialog box, with Allow trusted Microsoft services to access this storage account selected.":::
43
+
:::image type="content" source="media/sql-database-vulnerability-assessment-storage/storage-allow-microsoft-services.png" alt-text="Screenshot showing Firewall and virtual networks dialog box, with Allow trusted Microsoft services to access this storage account selected.":::
43
44
44
-
To find out which storage account is being used, go to your **SQL server** pane in the [Azure portal](https://portal.azure.com), under **Security**, and then select **Defender for Cloud**.
45
+
To find out which storage account is being used, do the following steps:
45
46
46
-
:::image type="content" source="../database/media/azure-defender-for-sql/va-storage.png" alt-text="set up vulnerability assessment":::
47
+
1. Go to your **SQL server** pane in the [Azure portal](https://portal.azure.com).
48
+
1. Under **Security**, select **Defender for Cloud**.
> You can set up email alerts to notify users in your organization to view or access the scan reports. To do this, ensure that you have SQL Security Manager and Storage Blob Data Reader permissions.
50
55
51
56
## Store VA scan results for Azure SQL Managed Instance in a storage account that can be accessed behind a firewall or VNet
52
57
53
-
Since Managed Instance is not a trusted Microsoft Service and has a different VNet from the storage account, executing a VA scan will result in an error.
58
+
Since Azure SQL Managed Instance isn't a trusted Microsoft Service and has a different VNet from the storage account, executing a VA scan will result in an error.
54
59
55
-
To support VA scans on Managed Instances, follow the below steps:
60
+
To support VA scans on Azure SQL Managed Instances, follow the below steps:
56
61
57
-
1. In the **SQL managed instance** pane, under the **Overview** heading, click the **Virtual network/subnet** link. This takes you to the **Virtual network** pane.
62
+
1. In the **SQL managed instance** pane, under the **Overview** heading, select the **Virtual network/subnet** link. This link takes you to the **Virtual network** pane.
1. Under **Settings**, select **Subnets**. Click**Subnet** in the new pane to add a subnet, and delegate it to *Microsoft.Sql\managedInstance*. For more information, see [Manage subnets](/azure/virtual-network/virtual-network-manage-subnet).
66
+
1. Under **Settings**, select **Subnets**. Select**Subnet** in the new pane to add a subnet, and delegate it to *Microsoft.Sql\managedInstance*. For more information, see [Manage subnets](/azure/virtual-network/virtual-network-manage-subnet).
62
67
63
68
:::image type="content" source="media/sql-database-vulnerability-assessment-storage/mi-subnets.png" alt-text="Screenshot shows a subnet that has been delegated Microsoft.sql\managedInstance.":::
64
69
65
-
1. In your **Virtual network** pane, under **Settings**, select **Service endpoints**. Click**Add** in the new pane, and add the *Microsoft.Storage* Service as a new service endpoint. Make sure the *ManagedInstance* Subnet is selected. Click**Add**.
70
+
1. In your **Virtual network** pane, under **Settings**, select **Service endpoints**. Select**Add** in the new pane, and add the *Microsoft.Storage* Service as a new service endpoint. Make sure the *ManagedInstance* Subnet is selected. Select**Add**.
66
71
67
72
:::image type="content" source="media/sql-database-vulnerability-assessment-storage/mi-service-endpoint.png" alt-text="Screenshot shows Add service endpoints, where you add the Microsoft.Storage Service as an endpoint.":::
68
73
69
-
1. Go to your **Storage account** that you've selected to store your VA scans. Under **Settings**, select **Firewall and virtual networks**. Click on **Add existing virtual network**. Select your managed instance virtual network and subnet, and click**Add**.
74
+
1. Go to your **Storage account** that you've selected to store your VA scans. Under **Settings**, select **Firewall and virtual networks**. Select **Add existing virtual network**. Select your managed instance virtual network and subnet, and then select**Add**.
70
75
71
76
:::image type="content" source="media/sql-database-vulnerability-assessment-storage/storage-firewall.png" alt-text="Screenshot shows the Firewalls and virtual networks pane, which contains the Add existing virtual network link.":::
72
77
73
-
You should now be able to store your VA scans for Managed Instances in your storage account.
78
+
You should now be able to store your VA scans for Azure SQL Managed Instances in your storage account.
Troubleshoot common issues related to vulnerability assessment scans.
78
83
@@ -90,7 +95,7 @@ The storage account in which vulnerability assessment scan results are saved mus
90
95
91
96
If any of these requirements aren't met, saving changes to vulnerability assessment settings fails.
92
97
93
-
#### Permissions
98
+
#### Permissions
94
99
95
100
The following permissions are required to save changes to vulnerability assessment settings:
96
101
@@ -112,9 +117,9 @@ The storage account might not appear in the storage account picker for several r
112
117
113
118
### Failure to open an email link for scan results or can't view scan results
114
119
115
-
You might not be able to open a link in a notification email about scan results or to view scan results if you don't have the required permissions or if you use a browser that doesn't support opening or displaying scan results.
120
+
You might not be able to open a link in a notification email about scan results, or to view scan results if you don't have the required permissions, or if you use a browser that doesn't support opening or displaying scan results.
116
121
117
-
#### Permissions
122
+
#### Required permissions
118
123
119
124
The following permissions are required to open links in email notifications about scan results or to view scan results:
120
125
@@ -129,4 +134,4 @@ The Firefox browser doesn't support opening or displaying scan results view. We
0 commit comments