|
1 | 1 | ---
|
2 |
| -title: Access provisioning by data owner to Azure Storage datasets |
3 |
| -description: Step-by-step guide showing how data owners can create access policies to datasets in Azure Storage |
| 2 | +title: Tutorial to provision access for Azure Storage |
| 3 | +description: This tutorial describes how a data owner can create access policies for Azure Storage resources. |
4 | 4 | author: inward-eye
|
5 | 5 | ms.author: vlrodrig
|
6 | 6 | ms.service: purview
|
7 | 7 | ms.subservice: purview-data-policies
|
8 | 8 | ms.topic: tutorial
|
9 |
| -ms.date: 03/14/2022 |
10 |
| -ms.custom: |
| 9 | +ms.date: 04/07/2022 |
11 | 10 | ---
|
12 | 11 |
|
13 | 12 | # Tutorial: Access provisioning by data owner to Azure Storage datasets (preview)
|
14 | 13 |
|
15 | 14 | [!INCLUDE [feature-in-preview](includes/feature-in-preview.md)]
|
16 | 15 |
|
17 |
| -This tutorial describes how a data owner can leverage Azure Purview to enable access to datasets in Azure Storage. At this point, only the following data sources are supported: |
18 |
| -- Blob storage |
19 |
| -- Azure Data Lake Storage (ADLS) Gen2 |
| 16 | +[!INCLUDE [feature-in-preview](includes/feature-in-preview.md)] |
| 17 | + |
| 18 | +[Policies](concept-data-owner-policies.md) in Azure Purview allow you to enable access to data sources that have been registered to a collection. This tutorial describes how a data owner can leverage Azure Purview to enable access to datasets in Azure Storage though Azure Purview. |
20 | 19 |
|
21 | 20 | In this tutorial, you learn how to:
|
22 | 21 | > [!div class="checklist"]
|
23 |
| -> * Prerequisites |
24 |
| -> * Configure permissions |
25 |
| -> * Register a data asset for Data use governance |
26 |
| -> * Create and publish a policy |
| 22 | +> * Prepare your Azure environment |
| 23 | +> * Configure permissions to allow Azure Purview to connect to your resources |
| 24 | +> * Register your Azure Storage resource for data use governance |
| 25 | +> * Create and publish a policy for your resource group or subscription |
27 | 26 |
|
28 | 27 | ## Prerequisites
|
| 28 | + |
29 | 29 | [!INCLUDE [Access policies generic pre-requisites](./includes/access-policies-prerequisites-generic.md)]
|
30 | 30 |
|
31 | 31 | [!INCLUDE [Azure Storage specific pre-requisites](./includes/access-policies-prerequisites-storage.md)]
|
32 | 32 |
|
33 | 33 | ## Configuration
|
34 | 34 | [!INCLUDE [Access policies generic configuration](./includes/access-policies-configuration-generic.md)]
|
35 | 35 |
|
36 |
| -### Register the data sources in Azure Purview for Data use governance |
37 |
| -Register and scan each Storage account with Azure Purview to later define access policies. You can follow these guides: |
| 36 | +### Register the data sources in Azure Purview for data use governance |
| 37 | + |
| 38 | +Your Azure Storage account needs to be registered in Azure Purview to later define access policies, and during registration we will enable data use governance. **Data use governance** is an available feature in Azure Purview that allows users to manage access to a resource from within Azure Purview. This allows you to centralize data discovery and access management, however it is a feature that directly impacts your data security. |
| 39 | + |
| 40 | +> [!WARNING] |
| 41 | +> Before enabling data use governance for any of your resources, read through our [data use governance article](how-to-enable-data-use-governance.md) |
| 42 | +> |
| 43 | +> This article includes data use governance best practices to help you ensure that your information is secure. |
| 44 | +
|
| 45 | + |
| 46 | +To register your resource and enable data use governance, follow these steps: |
| 47 | + |
| 48 | +> [!Note] |
| 49 | +> You need to be an owner of the subscription or resource group to be able to add a managed identity on an Azure resource. |
| 50 | +
|
| 51 | +1. From the [Azure portal](https://portal.azure.com), find the Azure Blob storage account that you would like to register. |
| 52 | + |
| 53 | +<!--- Migrate image ---> |
| 54 | + :::image type="content" source="media/register-scan-azure-blob-storage-source/register-blob-storage-acct.png" alt-text="Screenshot that shows the storage account"::: |
| 55 | + |
| 56 | +1. Select **Access Control (IAM)** in the left navigation and then select **+ Add** --> **Add role assignment** |
| 57 | + |
| 58 | +<!--- Migrate image ---> |
| 59 | + :::image type="content" source="media/register-scan-azure-blob-storage-source/register-blob-access-control.png" alt-text="Screenshot that shows the access control for the storage account"::: |
| 60 | + |
| 61 | +1. Set the **Role** to **Storage Blob Data Reader** and enter your _Azure Purview account name_ under the **Select** input box. Then, select **Save** to give this role assignment to your Azure Purview account. |
| 62 | + |
| 63 | +<!--- Migrate image ---> |
| 64 | + :::image type="content" source="media/register-scan-azure-blob-storage-source/register-blob-assign-permissions.png" alt-text="Screenshot that shows the details to assign permissions for the Azure Purview account"::: |
| 65 | + |
| 66 | +1. If you have a firewall enabled on your Storage account, follow these steps as well: |
| 67 | + 1. Go into your Azure Storage account in [Azure portal](https://portal.azure.com) |
| 68 | + 1. Navigate to **Security + networking > Networking** |
| 69 | + 1. Choose **Selected Networks** under **Allow access from** |
| 70 | + 1. In the **Exceptions** section, select **Allow trusted Microsoft services to access this storage account** and select **Save** |
| 71 | + <!--- Migrate image ---> |
| 72 | + :::image type="content" source="media/register-scan-azure-blob-storage-source/register-blob-permission.png" alt-text="Screenshot that shows the exceptions to allow trusted Microsoft services to access the storage account"::: |
| 73 | + |
| 74 | +1. Once you have set up authentication for , go to the [Azure Purview Studio](https://web.purview.azure.com/). |
| 75 | +1. Select **Data Map** on the left menu. |
| 76 | +1. Select **Register**. |
| 77 | +1. On **Register sources**, select **Azure Blob Storage**. |
| 78 | + |
| 79 | + :::image type="content" source="media/tutorial-data-owner-policies-storage/select-azure-blob-storage.png" alt-text="Screenshot that shows the tile for Azure Multiple on the screen for registering multiple sources."::: |
| 80 | + |
| 81 | +1. Select **Continue**. |
| 82 | +1. On the **Register sources (Azure)** screen, do the following: |
| 83 | + 1. In the **Name** box, enter a friendly name that the data source will be listed with in the catalog. |
| 84 | + 1. In the **Subscription** dropdown list boxes, select the subscription where your storage account is housed. Then select your storage account under **Storage account name**. In **Select a collection** select the collection where you'd like to register your Azure Storage account. |
| 85 | + |
| 86 | + :::image type="content" source="media/tutorial-data-owner-policies-storage/register-data-source-for-policy-storage.png" alt-text="Screenshot that shows the boxes for selecting a storage account."::: |
| 87 | + |
| 88 | + 1. In the **Select a collection** box, select a collection or create a new one (optional). |
| 89 | + 1. Set the *Data use governance* toggle to **Enabled**, as shown in the image below. |
| 90 | + |
| 91 | + :::image type="content" source="./media/tutorial-data-owner-policies-storage/register-data-source-for-policy-storage.png" alt-text="Screenshot that shows Data use governance toggle set to active on the registered resource page."::: |
| 92 | + |
| 93 | + >[!TIP] |
| 94 | + >If the data use governance toggle is greyed out and unable to be selected: |
| 95 | + > 1. Confirm you have followed all prerequisites to enable Data use governance across your resources. |
| 96 | + > 1. Confirm that you have selected a subscription or a resource group to be registered. |
| 97 | + > 1. It may be that this resource is already registered in another Azure Purview account. Hover over it to know the name of the Azure Purview account that has registered the data resource.first. |
| 98 | +
|
| 99 | + 1. Select **Register** to register the resource group or subscription with Azure Purview with data use governance enabled. |
| 100 | + |
| 101 | +>[!TIP] |
| 102 | +> For more information about data use governance, including best practices or known issues, see our [data use governance article](how-to-enable-data-use-governance.md). |
38 | 103 |
|
39 |
| -- [Register and scan Azure Storage Blob - Azure Purview](register-scan-azure-blob-storage-source.md) |
| 104 | +## Create a data owner policy |
40 | 105 |
|
41 |
| -- [Register and scan Azure Data Lake Storage (ADLS) Gen2 - Azure Purview](register-scan-adls-gen2.md) |
| 106 | +1. Sign in to the [Azure Purview Studio](https://web.purview.azure.com/resource/). |
42 | 107 |
|
43 |
| -Follow this link to [Enable the data source for access policies](./how-to-enable-data-use-governance.md) in Azure Purview by setting the **Data use governance** toggle to **Enabled**, as shown in the picture. |
| 108 | +1. Navigate to the **Data policy** feature using the left side panel. Then select **Data policies**. |
44 | 109 |
|
45 |
| - |
| 110 | +1. Select the **New Policy** button in the policy page. |
46 | 111 |
|
47 |
| -## Create and publish a data owner policy |
48 |
| -Execute the steps in the [data-owner policy authoring tutorial](how-to-data-owner-policy-authoring-generic.md) to create and publish a policy similar to the example shown in the image: a policy that provides group *Contoso Team* *read* access to Storage account *marketinglake1*: |
| 112 | + :::image type="content" source="./media/access-policies-common/policy-onboard-guide-1.png" alt-text="Data owner can access the Policy functionality in Azure Purview when it wants to create policies."::: |
| 113 | + |
| 114 | +1. The new policy page will appear. Enter the policy **Name** and **Description**. |
| 115 | + |
| 116 | +1. To add policy statements to the new policy, select the **New policy statement** button. This will bring up the policy statement builder. |
| 117 | + |
| 118 | + :::image type="content" source="./media/access-policies-common/create-new-policy.png" alt-text="Data owner can create a new policy statement."::: |
| 119 | + |
| 120 | +1. Select the **Effect** button and choose *Allow* from the drop-down list. |
| 121 | + |
| 122 | +1. Select the **Action** button and choose *Read* or *Modify* from the drop-down list. |
| 123 | + |
| 124 | +1. Select the **Data Resources** button to bring up the window to enter Data resource information, which will open to the right. |
| 125 | + |
| 126 | +1. Under the **Data Resources** Panel do one of two things depending on the granularity of the policy: |
| 127 | + - To create a broad policy statement that covers an entire data source, resource group, or subscription that was previously registered, use the **Data sources** box and select its **Type**. |
| 128 | + - To create a fine-grained policy, use the **Assets** box instead. Enter the **Data Source Type** and the **Name** of a previously registered and scanned data source. See example in the image. |
| 129 | + |
| 130 | + :::image type="content" source="./media/access-policies-common/select-data-source-type.png" alt-text="Data owner can select a Data Resource when editing a policy statement."::: |
| 131 | + |
| 132 | +1. Select the **Continue** button and transverse the hierarchy to select and underlying data-object (for example: folder, file, etc.). Select **Recursive** to apply the policy from that point in the hierarchy down to any child data-objects. Then select the **Add** button. This will take you back to the policy editor. |
| 133 | + |
| 134 | + :::image type="content" source="./media/access-policies-common/select-asset.png" alt-text="Data owner can select the asset when creating or editing a policy statement."::: |
| 135 | + |
| 136 | +1. Select the **Subjects** button and enter the subject identity as a principal, group, or MSI. Then select the **OK** button. This will take you back to the policy editor |
| 137 | + |
| 138 | + :::image type="content" source="./media/access-policies-common/select-subject.png" alt-text="Data owner can select the subject when creating or editing a policy statement."::: |
| 139 | + |
| 140 | +1. Repeat the steps #5 to #11 to enter any more policy statements. |
| 141 | + |
| 142 | +1. Select the **Save** button to save the policy. |
49 | 143 |
|
50 | 144 | 
|
51 | 145 |
|
| 146 | +## Publish a data owner policy |
| 147 | + |
| 148 | +1. Sign in to the [Azure Purview Studio](https://web.purview.azure.com/resource/). |
| 149 | + |
| 150 | +1. Navigate to the **Data policy** feature using the left side panel. Then select **Data policies**. |
| 151 | + |
| 152 | + :::image type="content" source="./media/access-policies-common/policy-onboard-guide-2.png" alt-text="Data owner can access the Policy functionality in Azure Purview when it wants to update a policy by selecting 'Data policies'."::: |
| 153 | + |
| 154 | +1. The Policy portal will present the list of existing policies in Azure Purview. Locate the policy that needs to be published. Select the **Publish** button on the right top corner of the page. |
| 155 | + |
| 156 | + :::image type="content" source="./media/access-policies-common/publish-policy.png" alt-text="Data owner can publish a policy."::: |
| 157 | + |
| 158 | +1. A list of data sources is displayed. You can enter a name to filter the list. Then, select each data source where this policy is to be published and then select the **Publish** button. |
| 159 | + |
| 160 | + :::image type="content" source="./media/access-policies-common/select-data-sources-publish-policy.png" alt-text="Data owner can select the data source where the policy will be published."::: |
52 | 161 |
|
53 | 162 | >[!Important]
|
54 | 163 | > - Publish is a background operation. It can take up to **2 hours** for the changes to be reflected in Storage account(s).
|
55 | 164 |
|
| 165 | +## Clean up resources |
56 | 166 |
|
57 |
| -## Additional information |
58 |
| -- Policy statements set below container level on a Storage account are supported. If no access has been provided at Storage account level or container level, then the App that requests the data must execute a direct access by providing a fully qualified name to the data object. If the App attempts to crawl down the hierarchy starting from the Storage account or Container, and there is no access at that level, the request will fail. The following documents show examples of how to do perform a direct access. See also blogs in the *Next steps* section of this tutorial. |
59 |
| - - [*abfs* for ADLS Gen2](../hdinsight/hdinsight-hadoop-use-data-lake-storage-gen2.md#access-files-from-the-cluster) |
60 |
| - - [*az storage blob download* for Blob Storage](../storage/blobs/storage-quickstart-blobs-cli.md#download-a-blob) |
61 |
| -- Creating a policy at Storage account level will enable the Subjects to access system containers e.g., *$logs*. If this is undesired, first scan the data source(s) and then create finer-grained policies for each (i.e., at container or sub-container level). |
62 |
| - |
| 167 | +To delete a policy in Azure Purview, follow these steps: |
63 | 168 |
|
64 |
| -### Limits |
65 |
| -- The limit for Azure Purview policies that can be enforced by Storage accounts is 100MB per subscription, which roughly equates to 5000 policies. |
| 169 | +1. Sign in to the [Azure Purview Studio](https://web.purview.azure.com/resource/). |
66 | 170 |
|
67 |
| -### Known issues |
| 171 | +1. Navigate to the **Data policy** feature using the left side panel. Then select **Data policies**. |
68 | 172 |
|
69 |
| -> [!Warning] |
70 |
| -> **Known issues** related to Policy creation |
71 |
| -> - Do not create policy statements based on Azure Purview resource sets. Even if displayed in Azure Purview policy authoring UI, they are not yet enforced. Learn more about [resource sets](concept-resource-sets.md). |
| 173 | + :::image type="content" source="./media/access-policies-common/policy-onboard-guide-2.png" alt-text="Data owner can access the Policy functionality in Azure Purview when it wants to update a policy."::: |
72 | 174 |
|
73 |
| -### Policy action mapping |
| 175 | +1. The Policy portal will present the list of existing policies in Azure Purview. Select the policy that needs to be updated. |
74 | 176 |
|
75 |
| -This section contains a reference of how actions in Azure Purview data policies map to specific actions in Azure Storage. |
| 177 | +1. The policy details page will appear, including Edit and Delete options. Select the **Edit** button, which brings up the policy statement builder. Now, any parts of the statements in this policy can be updated. To delete the policy, use the **Delete** button. |
76 | 178 |
|
77 |
| -| **Azure Purview policy action** | **Data source specific actions** | |
78 |
| -|---------------------------|-----------------------------------------------------------------------------------------| |
79 |
| -||| |
80 |
| -| *Read* |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/read | |
81 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read | |
82 |
| -||| |
83 |
| -| *Modify* |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read | |
84 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write | |
85 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action | |
86 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/move/action | |
87 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/blobs/delete | |
88 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/read | |
89 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/write | |
90 |
| -| |<sub>Microsoft.Storage/storageAccounts/blobServices/containers/delete | |
91 |
| -||| |
| 179 | + :::image type="content" source="./media/access-policies-common/edit-policy.png" alt-text="Data owner can edit or delete a policy statement."::: |
92 | 180 |
|
93 | 181 |
|
94 | 182 | ## Next steps
|
|
0 commit comments