Skip to content

Commit 941a8f9

Browse files
Merge pull request #230242 from inward-eye/main
updates to devops docs
2 parents ca09021 + aaf731c commit 941a8f9

5 files changed

+85
-141
lines changed

articles/purview/how-to-policies-devops-arc-sql-server.md

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -63,70 +63,14 @@ Follow this link for the steps to [delete a DevOps policies in Microsoft Purview
6363
>[!Important]
6464
> DevOps policies are auto-published and changes can take up to **5 minutes** to be enforced by the data source.
6565
66-
## Test the policy
66+
## Test the DevOps policy
67+
See how to [test the policy you created](./how-to-policies-devops-authoring-generic.md#test-the-devops-policy)
6768

68-
The Azure AD Accounts referenced in the access policies should now be able to connect to any database in the server to which the policies are published.
69+
## Role definition detail
70+
See the [mapping of DevOps role to data source actions](./how-to-policies-devops-authoring-generic.md#role-definition-detail)
6971

70-
### Force policy download
71-
It is possible to force an immediate download of the latest published policies to the current SQL database by running the following command. The minimal permission required to run it is membership in ##MS_ServerStateManager##-server role.
72-
73-
```sql
74-
-- Force immediate download of latest published policies
75-
exec sp_external_policy_refresh reload
76-
```
77-
78-
### Analyze downloaded policy state from SQL
79-
The following DMVs can be used to analyze which policies have been downloaded and are currently assigned to Azure AD accounts. The minimal permission required to run them is VIEW DATABASE SECURITY STATE - or assigned Action Group *SQL Security Auditor*.
80-
81-
```sql
82-
83-
-- Lists generally supported actions
84-
SELECT * FROM sys.dm_server_external_policy_actions
85-
86-
-- Lists the roles that are part of a policy published to this server
87-
SELECT * FROM sys.dm_server_external_policy_roles
88-
89-
-- Lists the links between the roles and actions, could be used to join the two
90-
SELECT * FROM sys.dm_server_external_policy_role_actions
91-
92-
-- Lists all Azure AD principals that were given connect permissions
93-
SELECT * FROM sys.dm_server_external_policy_principals
94-
95-
-- Lists Azure AD principals assigned to a given role on a given resource scope
96-
SELECT * FROM sys.dm_server_external_policy_role_members
97-
98-
-- Lists Azure AD principals, joined with roles, joined with their data actions
99-
SELECT * FROM sys.dm_server_external_policy_principal_assigned_actions
100-
```
101-
102-
## Additional information
103-
104-
### Policy action mapping
72+
## Next steps
73+
See [related videos, blogs and documents](./how-to-policies-devops-authoring-generic.md#next-steps)
10574

106-
This section contains a reference of how actions in Microsoft Purview data policies map to specific actions in Azure Arc-enabled SQL Server.
10775

108-
| **DevOps role definition** | **Data source specific actions** |
109-
|-------------------------------------|--------------------------------------|
110-
| | |
111-
| *SQL Performance Monitor* |Microsoft.Sql/sqlservers/Connect |
112-
||Microsoft.Sql/sqlservers/databases/Connect |
113-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabasePerformanceState/rows/select |
114-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/ServerPerformanceState/rows/select |
115-
|||
116-
| *SQL Security Auditor* |Microsoft.Sql/sqlservers/Connect |
117-
||Microsoft.Sql/sqlservers/databases/Connect |
118-
||Microsoft.Sql/sqlservers/SystemViewsAndFunctions/ServerSecurityState/rows/select |
119-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabaseSecurityState/rows/select |
120-
||Microsoft.Sql/sqlservers/SystemViewsAndFunctions/ServerSecurityMetadata/rows/select |
121-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabaseSecurityMetadata/rows/select |
122-
|||
12376

124-
## Next steps
125-
Check the blogs, videos and related docs
126-
* Blog: [Microsoft Purview DevOps policies enter General Availability](https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-purview-devops-policies-enter-ga-simplify-access/ba-p/3674057)
127-
* Blog: [Microsoft Purview DevOps policies enable at scale access provisioning for IT operations](https://techcommunity.microsoft.com/t5/microsoft-purview-blog/microsoft-purview-devops-policies-enable-at-scale-access/ba-p/3604725)
128-
* Video: [DevOps policies quick overview](https://aka.ms/Microsoft-Purview-DevOps-Policies-Video)
129-
* Video: [DevOps policies deep dive](https://youtu.be/UvClpdIb-6g)
130-
* Video: [Pre-requisite for policies: The "Data use management" option](https://youtu.be/v_lOzevLW-Q)
131-
* Doc: [Microsoft Purview DevOps policies on Azure SQL DB](./how-to-policies-devops-azure-sql-db.md)
132-
* Doc: [Microsoft Purview DevOps policies on resource groups and subscriptions](./how-to-policies-devops-resource-group.md)

articles/purview/how-to-policies-devops-authoring-generic.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ To delete a DevOps policy, ensure first that you have the Microsoft Purview Poli
7979
1. Check one of the policies and then select **Delete** as shown in the following screenshot:
8080
![Screenshot shows to enter SQL DevOps policies to delete.](./media/how-to-policies-devops-authoring-generic/enter-devops-policies-to-delete.png)
8181

82-
## Test a DevOps policy
82+
## Test the DevOps policy
8383
After creating the policy, any of the Azure AD users in the Subject should now be able to connect to the data sources in the scope of the policy. To test, use SSMS or any SQL client and try to query some DMVs/DMFs. We list here some examples. For more, you can consult the [Microsoft Purview DevOps policies concept guide](/azure/purview/concept-policies-devops.md#mapping-of-popular-dmvsdmfs)
8484

85-
### Testing access for SQL Performance Monitor
85+
### Testing SQL Performance Monitor access
8686
If you provided the Subject(s) of the policy SQL Performance Monitor role, you can issue the following commands
8787
```sql
8888
-- Returns I/O statistics for data and log files
@@ -92,7 +92,7 @@ SELECT wait_type, wait_time_ms FROM sys.dm_os_wait_stats
9292
```
9393
![Screenshot shows test for SQL Performance Monitor.](./media/how-to-policies-devops-authoring-generic/test-access-sql-performance-monitor.png)
9494

95-
### Testing access for SQL Security Auditor
95+
### Testing SQL Security Auditor access
9696
If you provided the Subject(s) of the policy SQL Security Auditor role, you can issue the following commands from SSMS or any SQL client
9797
```sql
9898
-- Returns the current state of the audit
@@ -101,7 +101,7 @@ SELECT * FROM sys.dm_server_audit_status
101101
SELECT * FROM sys.dm_database_encryption_keys
102102
```
103103

104-
### Ensure there is no access to user data
104+
### Ensure no access to user data
105105
Next, try accessing a table in one of the databases. The Azure AD principal you are testing with should be denied, which means the data is protected from insider threat
106106

107107
```sql
@@ -112,8 +112,7 @@ SELECT * FROM [databaseName].schemaName.tableName
112112
![Screenshot shows test to access user data.](./media/how-to-policies-devops-authoring-generic/test-access-user-data.png)
113113

114114

115-
## Policy action mapping
116-
115+
## Role definition detail
117116
This section contains a reference of how actions in Microsoft Purview data policies map to specific actions in Azure SQL MI.
118117

119118
| **DevOps role definition** | **Data source specific actions** |

articles/purview/how-to-policies-devops-azure-sql-db.md

Lines changed: 5 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -49,71 +49,13 @@ Follow this link for the steps to [delete a DevOps policies in Microsoft Purview
4949
>[!Important]
5050
> DevOps policies are auto-published and changes can take up to **5 minutes** to be enforced by the data source.
5151
52-
## Test the policy
53-
The Azure AD Accounts referenced in the access policies should now be able to connect to any database in the server to which the policies are published.
52+
## Test the DevOps policy
53+
See how to [test the policy you created](./how-to-policies-devops-authoring-generic.md#test-the-devops-policy)
5454

55-
### Force policy download
56-
It is possible to force an immediate download of the latest published policies to the current SQL database by running the following command. The minimal permission required to run it is membership in ##MS_ServerStateManager##-server role.
57-
58-
```sql
59-
-- Force immediate download of latest published policies
60-
exec sp_external_policy_refresh reload
61-
```
62-
63-
### Analyze downloaded policy state from SQL
64-
The following DMVs can be used to analyze which policies have been downloaded and are currently assigned to Azure AD accounts. The minimal permission required to run them is VIEW DATABASE SECURITY STATE - or assigned Action Group *SQL Security Auditor*.
65-
66-
```sql
67-
68-
-- Lists generally supported actions
69-
SELECT * FROM sys.dm_server_external_policy_actions
70-
71-
-- Lists the roles that are part of a policy published to this server
72-
SELECT * FROM sys.dm_server_external_policy_roles
73-
74-
-- Lists the links between the roles and actions, could be used to join the two
75-
SELECT * FROM sys.dm_server_external_policy_role_actions
76-
77-
-- Lists all Azure AD principals that were given connect permissions
78-
SELECT * FROM sys.dm_server_external_policy_principals
79-
80-
-- Lists Azure AD principals assigned to a given role on a given resource scope
81-
SELECT * FROM sys.dm_server_external_policy_role_members
82-
83-
-- Lists Azure AD principals, joined with roles, joined with their data actions
84-
SELECT * FROM sys.dm_server_external_policy_principal_assigned_actions
85-
```
86-
87-
## Additional information
88-
89-
### Policy action mapping
90-
91-
This section contains a reference of how actions in Microsoft Purview data policies map to specific actions in Azure SQL DB.
92-
93-
| **Microsoft Purview policy action** | **Data source specific actions** |
94-
|-------------------------------------|--------------------------------------|
95-
| | |
96-
| *SQL Performance Monitor* |Microsoft.Sql/sqlservers/Connect |
97-
||Microsoft.Sql/sqlservers/databases/Connect |
98-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabasePerformanceState/rows/select |
99-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/ServerPerformanceState/rows/select |
100-
|||
101-
| *SQL Security Auditor* |Microsoft.Sql/sqlservers/Connect |
102-
||Microsoft.Sql/sqlservers/databases/Connect |
103-
||Microsoft.Sql/sqlservers/SystemViewsAndFunctions/ServerSecurityState/rows/select |
104-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabaseSecurityState/rows/select |
105-
||Microsoft.Sql/sqlservers/SystemViewsAndFunctions/ServerSecurityMetadata/rows/select |
106-
||Microsoft.Sql/sqlservers/databases/SystemViewsAndFunctions/DatabaseSecurityMetadata/rows/select |
107-
|||
55+
## Role definition detail
56+
See the [mapping of DevOps role to data source actions](./how-to-policies-devops-authoring-generic.md#role-definition-detail)
10857

10958
## Next steps
110-
Check the blogs, videos and related docs
111-
* Blog: [Microsoft Purview DevOps policies enter General Availability](https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-purview-devops-policies-enter-ga-simplify-access/ba-p/3674057)
112-
* Blog: [Microsoft Purview DevOps policies enable at scale access provisioning for IT operations](https://techcommunity.microsoft.com/t5/microsoft-purview-blog/microsoft-purview-devops-policies-enable-at-scale-access/ba-p/3604725)
113-
* Video: [DevOps policies quick overview](https://aka.ms/Microsoft-Purview-DevOps-Policies-Video)
114-
* Video: [DevOps policies deep dive](https://youtu.be/UvClpdIb-6g)
115-
* Video: [Pre-requisite for policies: The "Data use management" option](https://youtu.be/v_lOzevLW-Q)
116-
* Doc: [Microsoft Purview DevOps policies on Azure Arc-enabled SQL Server](./how-to-policies-devops-arc-sql-server.md)
117-
* Doc: [Microsoft Purview DevOps policies on resource groups and subscriptions](./how-to-policies-devops-resource-group.md)
59+
See [related videos, blogs and documents](./how-to-policies-devops-authoring-generic.md#next-steps)
11860

11961

articles/purview/how-to-policies-devops-resource-group.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,11 @@ Follow this link for the steps to [update a DevOps policies in Microsoft Purview
5454
## Delete a DevOps policy
5555
Follow this link for the steps to [delete a DevOps policies in Microsoft Purview](how-to-policies-devops-authoring-generic.md#delete-a-devops-policy).
5656

57+
## Test the DevOps policy
58+
See how to [test the policy you created](./how-to-policies-devops-authoring-generic.md#test-the-devops-policy)
5759

58-
### Test the policy
59-
To test the policy see the DevOps policy guides for the underlying data sources listed in the [next steps section](#next-steps) of this document.
60+
## Role definition detail
61+
See the [mapping of DevOps role to data source actions](./how-to-policies-devops-authoring-generic.md#role-definition-detail)
6062

6163
## Next steps
62-
Check the blogs, videos and related docs
63-
* Blog: [Microsoft Purview DevOps policies enter General Availability](https://techcommunity.microsoft.com/t5/security-compliance-and-identity/microsoft-purview-devops-policies-enter-ga-simplify-access/ba-p/3674057)
64-
* Blog: [Microsoft Purview DevOps policies enable at scale access provisioning for IT operations](https://techcommunity.microsoft.com/t5/microsoft-purview-blog/microsoft-purview-devops-policies-enable-at-scale-access/ba-p/3604725)
65-
* Video: [DevOps policies quick overview](https://aka.ms/Microsoft-Purview-DevOps-Policies-Video)
66-
* Video: [DevOps policies deep dive](https://youtu.be/UvClpdIb-6g)
67-
* Video: [Pre-requisite for policies: The "Data use management" option](https://youtu.be/v_lOzevLW-Q)
68-
* Doc: [Microsoft Purview DevOps policies on Azure Arc-enabled SQL Server](./how-to-policies-devops-arc-sql-server.md)
69-
* Doc: [Microsoft Purview DevOps policies on Azure SQL DB](./how-to-policies-devops-azure-sql-db.md)
64+
See [related videos, blogs and documents](./how-to-policies-devops-authoring-generic.md#next-steps)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Troubleshoot Microsoft Purview policies for SQL data sources
3+
description: Check how to see if SQL data sources are receiving policies from Microsoft Purview.
4+
author: inward-eye
5+
ms.author: vlrodrig
6+
ms.service: purview
7+
ms.subservice: purview-data-policies
8+
ms.topic: tutorial
9+
ms.date: 03/10/2023
10+
---
11+
12+
# Tutorial: Troubleshoot Microsoft Purview policies for SQL data sources
13+
14+
In this tutorial, you learn how issue SQL commands to inspect the Microsoft Purview policies that have been communicated to the SQL instance, where they will be enforced. You will also learn how to force a download of the policies to the SQL instance. These commands are only used for troubleshooting and are not required during the normal operation of Microsoft Purview policies. These commands require a higher level of privileges in the SQL instance.
15+
16+
For more information about Microsoft Purview policies, see the concept guides listed in the [Next steps](#next-steps) section.
17+
18+
## Prerequisites
19+
20+
* An Azure subscription. If you don't already have one, [create a free subscription](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
21+
* A Microsoft Purview account. If you don't have one, see the [quickstart for creating a Microsoft Purview account](create-catalog-portal.md).
22+
* Register a data source, enable *Data use management*, and create a policy. To do so, use one of the Microsoft Purview policy guides. To follow along with the examples in this tutorial, you can [create a DevOps policy for Azure SQL Database](how-to-policies-devops-azure-sql-db.md).
23+
24+
## Test the policy
25+
Once you create a policy, the Azure AD principals referenced in the Subject of the policy should be able to connect to any database in the server to which the policies are published.
26+
27+
### Force policy download
28+
It is possible to force an immediate download of the latest published policies to the current SQL database by running the following command. The minimal permission required to run it is membership in ##MS_ServerStateManager##-server role.
29+
30+
```sql
31+
-- Force immediate download of latest published policies
32+
exec sp_external_policy_refresh reload
33+
```
34+
35+
### Analyze downloaded policy state from SQL
36+
The following DMVs can be used to analyze which policies have been downloaded and are currently assigned to Azure AD principals. The minimal permission required to run them is VIEW DATABASE SECURITY STATE - or assigned Action Group *SQL Security Auditor*.
37+
38+
```sql
39+
40+
-- Lists generally supported actions
41+
SELECT * FROM sys.dm_server_external_policy_actions
42+
43+
-- Lists the roles that are part of a policy published to this server
44+
SELECT * FROM sys.dm_server_external_policy_roles
45+
46+
-- Lists the links between the roles and actions, could be used to join the two
47+
SELECT * FROM sys.dm_server_external_policy_role_actions
48+
49+
-- Lists all Azure AD principals that were given connect permissions
50+
SELECT * FROM sys.dm_server_external_policy_principals
51+
52+
-- Lists Azure AD principals assigned to a given role on a given resource scope
53+
SELECT * FROM sys.dm_server_external_policy_role_members
54+
55+
-- Lists Azure AD principals, joined with roles, joined with their data actions
56+
SELECT * FROM sys.dm_server_external_policy_principal_assigned_actions
57+
```
58+
59+
## Next steps
60+
61+
Concept guides for Microsoft Purview access policies:
62+
- [DevOps policies](concept-policies-devops.md)
63+
- [Self-service access policies](concept-self-service-data-access-policy.md)
64+
- [Data owner policies](concept-policies-data-owner.md)

0 commit comments

Comments
 (0)