Skip to content

Commit 13e80c7

Browse files
Merge pull request #231683 from guywi-ms/patch-48
Roll back of new table-level RBAC
2 parents 4e1d1f6 + 8251c00 commit 13e80c7

File tree

1 file changed

+6
-96
lines changed

1 file changed

+6
-96
lines changed

articles/azure-monitor/logs/manage-access.md

Lines changed: 6 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -297,105 +297,15 @@ In addition to using the built-in roles for a Log Analytics workspace, you can c
297297

298298
## Set table-level read access
299299

300-
To create a [custom role](../../role-based-access-control/custom-roles.md) that lets specific users or groups read data from specific tables in a workspace:
301-
302-
1. Create a custom role that grants users permission to execute queries in the Log Analytics workspace, based on the built-in Azure Monitor Logs **Reader** role:
303-
304-
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
305-
306-
1. Right-click the **Reader** role and select **Clone**.
307-
308-
:::image type="content" source="media/manage-access/access-control-clone-role.png" alt-text="Screenshot that shows the Roles tab of the Access control screen with the clone button highlighted for the Reader role." lightbox="media/manage-access/access-control-clone-role.png":::
309-
310-
This opens the **Create a custom role** screen.
311-
312-
1. On the **Basics** tab of the screen, enter a **Custom role name** value and, optionally, provide a description.
313-
314-
:::image type="content" source="media/manage-access/manage-access-create-custom-role.png" alt-text="Screenshot that shows the Basics tab of the Create a custom role screen with the Custom role name and Description fields highlighted." lightbox="media/manage-access/manage-access-create-custom-role.png":::
315-
316-
1. Select the **JSON** tab > **Edit**::
317-
318-
1. In the `"actions"` section, add:
319-
320-
- `Microsoft.OperationalInsights/workspaces/read`
321-
- `Microsoft.OperationalInsights/workspaces/query/read`
322-
- `Microsoft.OperationalInsights/workspaces/analytics/query/action`
323-
- `Microsoft.OperationalInsights/workspaces/search/action`
324-
325-
1. In the `"not actions"` section, add `Microsoft.OperationalInsights/workspaces/sharedKeys/read`.
326-
327-
:::image type="content" source="media/manage-access/manage-access-create-custom-role-json.png" alt-text="Screenshot that shows the JSON tab of the Create a custom role screen with the actions section of the JSON file highlighted." lightbox="media/manage-access/manage-access-create-custom-role-json.png":::
328-
329-
1. Select **Save** > **Review + Create** at the bottom of the screen, and then **Create** on the next page.
330-
331-
1. Assign your custom role to the relevant users or groups:
332-
1. Select **Access control (AIM)** > **Add** > **Add role assignment**.
333-
334-
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-button.png" alt-text="Screenshot that shows the Access control screen with the Add role assignment button highlighted." lightbox="media/manage-access/manage-access-add-role-assignment-button.png":::
335-
336-
1. Select the custom role you created and select **Next**.
337-
338-
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-screen.png" alt-text="Screenshot that shows the Add role assignment screen with a custom role and the Next button highlighted." lightbox="media/manage-access/manage-access-add-role-assignment-screen.png":::
339-
340-
341-
This opens the **Members** tab of the **Add custom role assignment** screen.
342-
343-
1. Click **+ Select members** to open the **Select members** screen.
344-
345-
:::image type="content" source="media/manage-access/manage-access-add-role-assignment-select-members.png" alt-text="Screenshot that shows the Select members screen." lightbox="media/manage-access/manage-access-add-role-assignment-select-members.png":::
346-
347-
1. Search for and select the relevant user or group and click **Select**.
348-
1. Select **Review and assign**.
349-
350-
1. Grant the users or groups read access to specific tables in a workspace by calling the `https://management.azure.com/batch?api-version=2020-06-01` POST API and sending the following details in the request body:
351-
352-
```json
353-
{
354-
"requests": [
355-
{
356-
"content": {
357-
"Id": "<GUID_1>",
358-
"Properties": {
359-
"PrincipalId": "<user_object_ID>",
360-
"PrincipalType": "User",
361-
"RoleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
362-
"Scope": "/subscriptions/<subscription_ID>/resourceGroups/<resource_group_name>/providers/Microsoft.OperationalInsights/workspaces/<workspace_name>/Tables/<table_name>",
363-
"Condition": null,
364-
"ConditionVersion": null
365-
}
366-
},
367-
"httpMethod": "PUT",
368-
"name": "<GUID_2>",
369-
"requestHeaderDetails": {
370-
"commandName": "Microsoft_Azure_AD."
371-
},
372-
"url": "/subscriptions/<subscription_ID>/resourceGroups/<resource_group_name>/providers/Microsoft.OperationalInsights/workspaces/<workspace_name>/Tables/<table_name>/providers/Microsoft.Authorization/roleAssignments/<GUID_1>?api-version=2020-04-01-preview"
373-
}
374-
]
375-
}
376-
```
377-
378-
Where:
379-
- You can generate a GUID for `<GUID 1>` and `<GUID 2>` using any GUID generator.
380-
- `<user_object_ID>` is the object ID of the user to which you want to grant table read access.
381-
- `<subscription_ID>` is the ID of the subscription related to the workspace.
382-
- `<resource_group_name>` is the resource group of the workspace.
383-
- `<workspace_name>` is the name of the workspace.
384-
- `<table_name>` is the name of the table to which you want to assign the user or group permission to read data from.
385-
386-
### Legacy method of setting table-level read access
387-
388-
[Azure custom roles](../../role-based-access-control/custom-roles.md) let you grant access to specific tables in the workspace, although we recommend defining [table-level read access](#set-table-level-read-access) as described above.
389-
390-
Azure custom roles apply to workspaces with either workspace-context or resource-context [access control modes](#access-control-mode) regardless of the user's [access mode](#access-mode).
300+
[Azure custom roles](../../role-based-access-control/custom-roles.md) let you grant specific users or groups access to specific tables in the workspace. Azure custom roles apply to workspaces with either workspace-context or resource-context [access control modes](#access-control-mode) regardless of the user's [access mode](#access-mode).
391301

392302
To define access to a particular table, create a [custom role](../../role-based-access-control/custom-roles.md):
393303

394304
* Set the user permissions in the **Actions** section of the role definition.
395305
* Use `Microsoft.OperationalInsights/workspaces/query/*` to grant access to all tables.
396306
* To exclude access to specific tables when you use a wildcard in **Actions**, list the tables excluded tables in the **NotActions** section of the role definition.
397307

398-
#### Examples
308+
### Examples
399309

400310
Here are examples of custom role actions to grant and deny access to specific tables.
401311

@@ -434,14 +344,14 @@ Grant access to all tables except the _SecurityAlert_ table:
434344
],
435345
```
436346

437-
#### Custom tables
347+
### Custom tables
438348

439-
Custom tables store data you collect from data sources such as [text logs](../agents/data-sources-custom-logs.md) and the [HTTP Data Collector API](data-collector-api.md). To identify the table type, [view table information in Log Analytics](./log-analytics-tutorial.md#view-table-information).
349+
Custom tables store data you collect from data sources such as [text logs](../agents/data-sources-custom-logs.md) and the [HTTP Data Collector API](data-collector-api.md). To identify the table type, [view table information in Log Analytics](./log-analytics-tutorial.md#view-table-information).
440350

441351
> [!NOTE]
442352
> Tables created by the [Logs ingestion API](../essentials/../logs/logs-ingestion-api-overview.md) don't yet support table-level RBAC.
443353
444-
You can't grant access to individual custom log tables, but you can grant access to all custom logs. To create a role with access to all custom log tables, create a custom role by using the following actions:
354+
You can't grant access to individual custom log tables at the table level, but you can grant access to all custom log tables. To create a role with access to all custom log tables, create a custom role by using the following actions:
445355

446356
```
447357
"Actions": [
@@ -457,7 +367,7 @@ Some custom logs come from sources that aren't directly associated to a specific
457367

458368
For example, if a specific firewall is sending custom logs, create a resource group called *MyFireWallLogs*. Make sure that the API requests contain the resource ID of *MyFireWallLogs*. The firewall log records are then accessible only to users who were granted access to *MyFireWallLogs* or those users with full workspace access.
459369

460-
#### Considerations
370+
### Considerations
461371

462372
- If a user is granted global read permission with the standard Reader or Contributor roles that include the _\*/read_ action, it will override the per-table access control and give them access to all log data.
463373
- If a user is granted per-table access but no other permissions, they can access log data from the API but not from the Azure portal. To provide access from the Azure portal, use Log Analytics Reader as its base role.

0 commit comments

Comments
 (0)