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: articles/synapse-analytics/security/how-to-set-up-access-control.md
+29-28Lines changed: 29 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: talk2rick
5
5
ms.service: azure-synapse-analytics
6
6
ms.topic: how-to
7
7
ms.subservice: security
8
-
ms.date: 5/23/2022
8
+
ms.date: 9/12/2024
9
9
ms.author: xurick
10
10
ms.reviewer: whhender, wiassaf
11
11
ms.custom: kr2b-contr-experiment
@@ -17,7 +17,7 @@ This article teaches you how to control access to a Microsoft Azure Synapse work
17
17
18
18
In this guide, you'll set up a workspace and configure a basic access control system. You can use this information in many types of Synapse projects. You'll also find advanced options for finer-grained control should you need it.
19
19
20
-
Synapse access control can be simplified by aligning roles and personas in your organization with security groups. This enables you to manage access to security groups simply by adding and removing users.
20
+
Synapse access control can be simplified by aligning roles and personas in your organization with security groups. This enables you to manage access to security groups simply by adding and removing users.
21
21
22
22
Before you begin this walkthrough, read the [Azure Synapse access control overview](./synapse-workspace-access-control-overview.md) to familiarize yourself with access control mechanisms used by Synapse Analytics.
23
23
@@ -42,22 +42,23 @@ This document uses standard names to simplify instructions. Replace them with na
42
42
| :------ | :-------------- | :---------- |
43
43
|**Synapse workspace**|`workspace1`| The name that the Azure Synapse workspace will have. |
44
44
|**ADLSGEN2 account**|`storage1`| The ADLS account to use with your workspace. |
45
-
|**Container**|`container1`| The container in STG1 that the workspace will use by default. |
46
-
|**Active directory tenant**|`contoso`| the active directory tenant name.|
45
+
|**Container**|`container1`| The container in storage1 that the workspace will use by default. |
46
+
|**Microsoft Entra ID tenant**|`contoso`| The Microsoft Entra ID tenant name.|
47
+
|**Service principal**|`SERVICEPRINCIPAL`| A [service principal](/entra/identity-platform/howto-create-service-principal-portal#register-an-application-with-microsoft-entra-id-and-create-a-service-principal) in your Microsoft Entra ID tenant.|
47
48
48
49
## Step 1: Set up security groups
49
50
50
-
>[!Note]
51
-
>During the preview, you were encouraged to create security groups and to map them to Azure Synapse **Synapse SQL Administrator** and **Synapse Apache Spark Administrator** roles. With the introduction of new finer-grained Synapse RBAC roles and scopes, you are now encouraged to use newer options to control access to your workspace. They give you greater configuration flexibility and they acknowledge that developers often use a mix of SQL and Spark to create analytics applications. So developers may need access to individual resources rather than an entire workspace. [Learn more](./synapse-workspace-synapse-rbac.md) about Synapse RBAC.
51
+
>[!TIP]
52
+
>You're encourage to use granular options to control access to your workspace, granting developers access to individual resources, rather than an entire workspace. [Learn more](./synapse-workspace-synapse-rbac.md) about Synapse RBAC.
52
53
53
54
Create the following security groups for your workspace:
54
55
55
-
-**`workspace1_SynapseAdministrators`**, for users who need complete control over a workspace. Add yourself to this security group, at least initially.
56
+
-**`workspace1_SynapseAdministrators`**, for users who need complete control over a workspace. Add yourself to this security group, at least initially.
56
57
-**`workspace1_SynapseContributors`**, for developers who need to develop, debug, and publish code to a service.
57
58
-**`workspace1_SynapseComputeOperators`**, for users who need to manage and monitor Apache Spark pools and Integration runtimes.
58
59
-**`workspace1_SynapseCredentialUsers`**, for users who need to debug and run orchestration pipelines using workspace MSI (managed service identity) credentials and cancel pipeline runs.
59
60
60
-
You'll assign Synapse roles to these groups at the workspace scope shortly.
61
+
You'll assign Synapse roles to these groups at the workspace scope shortly.
61
62
62
63
Also create this security group:
63
64
-**`workspace1_SQLAdmins`**, group for users who need SQL Active Directory Admin authority, within SQL pools in the workspace.
@@ -67,8 +68,8 @@ The `workspace1_SQLAdmins` group to configure SQL permissions when you create SQ
67
68
These five groups are sufficient for a basic setup. Later, you can add security groups to handle users who need more specialized access or restrict access to individual resources only.
68
69
69
70
> [!NOTE]
70
-
>- Learn how to create a security group in [Create a basic group and add members using Microsoft Entra ID](../../active-directory/fundamentals/active-directory-groups-create-azure-portal.md).
71
-
>- Learn how to add a security group from another security group in [Add or remove a group from another group using Microsoft Entra ID](../../active-directory/fundamentals/active-directory-groups-membership-azure-portal.md).
71
+
>- Learn how to create a security group in this article: [Create a basic group and add members using Microsoft Entra ID](../../active-directory/fundamentals/active-directory-groups-create-azure-portal.md#create-a-basic-group-and-add-members).
72
+
>- Learn how to add a security group from another security group in this article: [Add or remove a group from another group using Microsoft Entra ID](../../active-directory/fundamentals/active-directory-groups-membership-azure-portal.md#add-a-group-to-another-group).
72
73
>- When creating a security group make sure that the **Group Type** is **Security**. Microsoft 365 groups are not supported for Azure SQL.
73
74
74
75
>[!Tip]
@@ -91,11 +92,11 @@ Identify the following information about your storage:
91
92
- Select **Add** > **Add role assignment** to open the Add role assignment page.
92
93
93
94
- Assign the following role. For detailed steps, see [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.yml).
94
-
95
+
95
96
| Setting | Value |
96
97
| --- | --- |
97
98
| Role | Storage Blob Data Contributor |
98
-
| Assign access to |SERVICEPRINCIPAL |
99
+
| Assign access to |`SERVICEPRINCIPAL`|
99
100
| Members |workspace1_SynapseAdministrators, workspace1_SynapseContributors, and workspace1_SynapseComputeOperators|
100
101
101
102

@@ -114,7 +115,7 @@ In Azure portal, create a Synapse workspace:
114
115
115
116
- Choose `container1` for the container that is being used as the "filesystem".
116
117
117
-
- Open WS1 in Synapse Studio
118
+
- Open `workspace1` in Synapse Studio
118
119
119
120
- In Synapse Studio, navigate to **Manage** > **Access Control**. In **workspace scope**, assign Synapse roles to security groups as follows:
120
121
- Assign the **Synapse Administrator** role to `workspace1_SynapseAdministrators`
@@ -123,7 +124,7 @@ In Azure portal, create a Synapse workspace:
123
124
124
125
## Step 4: Grant the workspace MSI access to the default storage container
125
126
126
-
To run pipelines and perform system tasks, Azure Synapse requires managed service identity (MSI) to have access to `container1` in the default ADLS Gen2 account, for the workspace. For more information, see [Azure Synapse workspace managed identity](../../data-factory/data-factory-service-identity.md?context=/azure/synapse-analytics/context/context&tabs=synapse-analytics).
127
+
To run pipelines and perform system tasks, Azure Synapse requires managed service identity (MSI) to have access to `container1` in the default ADLS Gen2 account, for the workspace. For more information, see [Azure Synapse workspace managed identity](../synapse-service-identity.md).
127
128
128
129
- Open Azure portal
129
130
- Locate the storage account, `storage1`, and then `container1`.
@@ -145,7 +146,7 @@ To run pipelines and perform system tasks, Azure Synapse requires managed servic
145
146
146
147
## Step 5: Grant Synapse administrators an Azure Contributor role for the workspace
147
148
148
-
To create SQL pools, Apache Spark pools and Integration runtimes, users need an Azure Contributor role for the workspace, at minimum. A Contributor role also allows users to manage resources, including pausing and scaling. To use Azure portal or Synapse Studio to create SQL pools, Apache Spark pools and Integration runtimes, you need a Contributor role at the resource group level.
149
+
To create SQL pools, Apache Spark pools, and Integration runtimes, users need an Azure Contributor role for the workspace, at minimum. A Contributor role also allows users to manage resources, including pausing and scaling. To use Azure portal or Synapse Studio to create SQL pools, Apache Spark pools, and Integration runtimes, you need a Contributor role at the resource group level.
149
150
150
151
151
152
- Open Azure portal
@@ -156,38 +157,38 @@ To create SQL pools, Apache Spark pools and Integration runtimes, users need an
156
157
157
158
| Setting | Value |
158
159
| --- | --- |
159
-
| Role | Contributor |
160
-
| Assign access to | SERVICEPRINCIPAL |
160
+
| Role | Contributor (Listed under 'Privileged administrator roles')|
161
+
| Assign access to |`SERVICEPRINCIPAL`|
161
162
| Members | workspace1_SynapseAdministrators |
162
163
163
164

164
165
165
166
## Step 6: Assign an SQL Active Directory Admin role
166
167
167
-
The *workspace creator* is automatically assigned as *SQL Active Directory Admin* for the workspace. Only a single user or a group can be granted this role. In this step, you assign the SQL Active Directory Admin for the workspace to the `workspace1_SQLAdmins` security group. This gives the group highly privileged admin access to all SQL pools and databases in the workspace.
168
+
The *workspace creator* is automatically assigned as *SQL Active Directory Admin* for the workspace. Only a single user or a group can be granted this role. In this step, you assign the SQL Active Directory Admin for the workspace to the `workspace1_SQLAdmins` security group. This gives the group highly privileged admin access to all SQL pools and databases in the workspace.
168
169
169
170
- Open Azure portal
170
171
- Navigate to `workspace1`
171
172
- Under **Settings**, select **Microsoft Entra ID**
172
173
- Select **Set admin** and choose **`workspace1_SQLAdmins`**
173
174
174
175
>[!Note]
175
-
>Step 6 is optional. You might choose to grant the `workspace1_SQLAdmins` group a less privileged role. To assign `db_owner` or other SQL roles, you must run scripts on each SQL database.
176
+
>Step 6 is optional. You might choose to grant the `workspace1_SQLAdmins` group a less privileged role. To assign `db_owner` or other SQL roles, you must run scripts on each SQL database.
176
177
177
178
## Step 7: Grant access to SQL pools
178
179
179
180
The Synapse Administrator is by default given the SQL `db_owner` role for serverless SQL pools in the workspace as well.
180
181
181
-
Access to SQL pools for other users is controlled by SQL permissions. Assigning SQL permissions requires SQL scripts to be run on each SQL database post-creation. The following are examples that require you to run these scripts:
182
+
Access to SQL pools for other users is controlled by SQL permissions. Assigning SQL permissions requires SQL scripts to be run on each SQL database post-creation. The following are examples that require you to run these scripts:
182
183
1. To grant users access to the serverless SQL pool, 'Built-in', and its databases.
183
184
1. To grant users access to dedicated SQL pool databases. Example SQL scripts are included later in this article.
184
185
185
-
1. To grant access to a dedicated SQL pool database, scripts can be run by the workspace creator or any member of the `workspace1_SynapseAdministrators` group.
186
+
1. To grant access to a dedicated SQL pool database, scripts can be run by the workspace creator or any member of the `workspace1_SynapseAdministrators` group.
186
187
187
188
1. To grant access to the serverless SQL pool, 'Built-in', scripts can be run by any member of the `workspace1_SQLAdmins` group or the `workspace1_SynapseAdministrators` group.
188
189
189
190
> [!TIP]
190
-
>You can grant access to all SQL databases by taking the following steps for **each** SQL pool. Section [Configure-Workspace-scoped permissions](#configure-workspace-scoped-permissions) is an exception to the rule and it allows you to assign a user a sysadmin role at the workspace level.
191
+
>You can grant access to all SQL databases by taking the following steps for **each** SQL pool. Section [ConfigureWorkspace-scoped permissions](#configure-workspace-scoped-permissions) is an exception to the rule and it allows you to assign a user a sysadmin role at the workspace level.
191
192
192
193
### Step 7a: Serverless SQL pool, Built-in
193
194
@@ -267,23 +268,23 @@ As a final step to secure your workspace, you should secure network access, usin
267
268
268
269
- With and without a [managed virtual network](./synapse-workspace-managed-vnet.md), you can connect to your workspace from public networks. For more information, see [Connectivity Settings](connectivity-settings.md).
269
270
- Access from public networks can be controlled by enabling the [public network access feature](connectivity-settings.md#public-network-access) or the [workspace firewall](./synapse-workspace-ip-firewall.md).
270
-
- Alternatively, you can connect to your workspace using a [managed private endpoint](synapse-workspace-managed-private-endpoints.md) and [private Link](/azure/azure-sql/database/private-endpoint-overview). Azure Synapse workspaces without the [Azure Synapse Analytics Managed Virtual Network](synapse-workspace-managed-vnet.md) do not have the ability to connect via managed private endpoints.
271
+
- Alternatively, you can connect to your workspace using a [managed private endpoint](synapse-workspace-managed-private-endpoints.md) and [private Link](/azure/azure-sql/database/private-endpoint-overview). Azure Synapse workspaces without the [Azure Synapse Analytics Managed Virtual Network](synapse-workspace-managed-vnet.md) don't have the ability to connect via managed private endpoints.
271
272
272
273
## Step 10: Completion
273
274
274
275
Your workspace is now fully configured and secured.
275
276
276
277
## Supporting more advanced scenarios
277
278
278
-
This guide has focused on setting up a basic access control system. You can support more advanced scenarios by creating additional security groups and assigning these groups more granular roles at more specific scopes. Consider the following cases:
279
+
This guide has focused on setting up a basic access control system. You can support more advanced scenarios by creating other security groups and assigning these groups more granular roles at more specific scopes. Consider the following cases:
279
280
280
-
**Enable Git-support** for the workspace for more advanced development scenarios including CI/CD. While in Git mode, Git permissions and Synapse RBAC will determine whether a user can commit changes to their working branch. Publishing to the service only takes place from the collaboration branch. Consider creating a security group for developers who need to develop and debug updates in a working branch but don't need to publish changes to the live service.
281
+
**Enable Git-support** for the workspace for more advanced development scenarios including CI/CD. While in Git mode, Git permissions and Synapse RBAC will determine whether a user can commit changes to their working branch. Publishing to the service only takes place from the collaboration branch. Consider creating a security group for developers who need to develop and debug updates in a working branch but don't need to publish changes to the live service.
281
282
282
-
**Restrict developer access** to specific resources. Create additional finer-grained security groups for developers who need access only to specific resources. Assign these groups appropriate Azure Synapse roles that are scoped to specific Spark pools, Integration runtimes, or credentials.
283
+
**Restrict developer access** to specific resources. Create other finer-grained security groups for developers who need access only to specific resources. Assign these groups appropriate Azure Synapse roles that are scoped to specific Spark pools, Integration runtimes, or credentials.
283
284
284
-
**Restrict operators from accessing code artifacts**. Create security groups for operators who need to monitor operational status of Synapse compute resources and view logs but who don't need access to code or to publish updates to the service. Assign these groups the Compute Operator role scoped to specific Spark pools and Integration runtimes.
285
+
**Restrict operators from accessing code artifacts**. Create security groups for operators who need to monitor operational status of Synapse compute resources and view logs but who don't need access to code or to publish updates to the service. Assign these groups the Compute Operator role scoped to specific Spark pools and Integration runtimes.
285
286
286
-
**Disable local authentication**. By allowing only Microsoft Entra authentication, you can centrally manage access to Azure Synapse resources, such as SQL pools. Local authentication for all resources within the workspace can be disabled during or after workspace creation. For more information on Microsoft Entra-only authentication, see [Disabling local authentication in Azure Synapse Analytics](../sql/active-directory-authentication.md).
287
+
**Disable local authentication**. By allowing only Microsoft Entra authentication, you can centrally manage access to Azure Synapse resources, such as SQL pools. Local authentication for all resources within the workspace can be disabled during or after workspace creation. For more information on Microsoft Entra-only authentication, see [Disabling local authentication in Azure Synapse Analytics](../sql/active-directory-authentication.md#disable-local-authentication).
0 commit comments