Skip to content

Commit fc692be

Browse files
authored
Merge pull request #205488 from dominicbetts/central-auditing
IoT Central: describe audit log feature
2 parents 33c3306 + 8a18a5c commit fc692be

18 files changed

+153
-25
lines changed

articles/iot-central/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@
242242
href: core/howto-administer.md
243243
- name: Manage users and roles
244244
href: core/howto-manage-users-roles.md
245+
- name: Use audit logs
246+
href: core/howto-use-audit-logs.md
245247
- name: Manage organizations
246248
href: core/howto-create-organizations.md
247249
- name: Customize application UI

articles/iot-central/core/concepts-architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ In IoT Central, you can configure and manage security in the following areas:
4848
- Device access to your application.
4949
- Programmatic access to your application.
5050
- Authentication to other services from your application.
51+
- Audit logs track activity in your application.
5152

5253
To learn more, see the [IoT Central security guide](overview-iot-central-security.md).
5354

articles/iot-central/core/concepts-iiot-architecture.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Secure your IIoT solution by using the following IoT Central features:
7777

7878
- Ensure safe, secure data exports with Azure Active Directory managed identities.
7979

80+
- Use audit logs to track activity in your IoT Central application.
81+
8082
## Patterns
8183

8284
:::image type="content" source="media/concepts-iiot-architecture/automation-pyramid.svg" alt-text="Diagram that shows the five levels of the automation pyramid." border="false":::

articles/iot-central/core/howto-authorize-rest-api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Authorize REST API in Azure IoT Central
33
description: How to authenticate and authorize IoT Central REST API calls
44
author: dominicbetts
55
ms.author: dobett
6-
ms.date: 06/22/2022
6+
ms.date: 07/25/2022
77
ms.topic: how-to
88
ms.service: iot-central
99
services: iot-central
@@ -62,6 +62,9 @@ To get a bearer token for a service principal, see [Service principal authentica
6262

6363
To get an API token, you can use the IoT Central UI or a REST API call. Administrators associated with the root organization and users assigned to the correct role can create API tokens.
6464

65+
> [!TIP]
66+
> Create and delete operations on API tokens are recorded in the [audit log](howto-use-audit-logs.md).
67+
6568
In the IoT Central UI:
6669

6770
1. Navigate to **Permissions > API tokens**.

articles/iot-central/core/howto-faq.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ sections:
146146
answer: |
147147
The first time you access the application, you must navigate to the application URL link you received from the administrator
148148
149-
150149
- name: Organizations
151150
questions:
152151
- question: |
@@ -168,3 +167,15 @@ sections:
168167
Can device groups, dashboards, and jobs be associated with multiple organizations?
169168
answer: |
170169
No, experiences such as device groups, dashboards, and jobs are associated with a single organization.
170+
171+
- name: Monitoring and logging
172+
questions:
173+
- question: |
174+
What are the differences between monitoring an IoT Central application in the Azure portal and using the audit logs within in IoT Central application.
175+
answer: |
176+
Monitoring in the Azure portal is useful for operations monitoring. The audit log in an IoT Central application lets you see who made changes to entities within the application.
177+
- question: |
178+
Can I extend the audit log to store more than 30 days of data?
179+
answer: |
180+
Currently, you can't store more tha 30 days of data in the audit log. Entries older than 30 days are deleted automatically.
181+

articles/iot-central/core/howto-manage-iot-central-from-portal.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ You can configure role assignments in the Azure portal or use the Azure CLI:
8787

8888
You can use the set of metrics provided by IoT Central to assess the health of devices connected to your IoT Central application and the health of your running data exports.
8989

90+
> [!NOTE]
91+
> IoT Central applications have an internal [audit log](howto-use-audit-logs.md) to track activity within the application.
92+
9093
Metrics are enabled by default for your IoT Central application and you access them from the [Azure portal](https://portal.azure.com/). The [Azure Monitor data platform exposes these metrics](../../azure-monitor/essentials/data-platform-metrics.md) and provides several ways for you to interact with them. For example, you can use charts in the Azure portal, a REST API, or queries in PowerShell or the Azure CLI.
9194

9295
Access to metrics in the Azure portal is managed by [Azure role based access control](../../role-based-access-control/overview.md). Use the Azure portal to add users to the IoT Central application/resource group/subscription to grant them access. You must add a user in the portal even they're already added to the IoT Central application. Use [Azure built-in roles](../../role-based-access-control/built-in-roles.md) for finer grained access control.

articles/iot-central/core/howto-manage-users-roles-with-rest-api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ The IoT Central REST API lets you develop client applications that integrate wit
1616

1717
Every IoT Central REST API call requires an authorization header. To learn more, see [How to authenticate and authorize IoT Central REST API calls](howto-authorize-rest-api.md).
1818

19+
> [!NOTE]
20+
> Operations on users and roles are recorded in the IoT Central [audit log](howto-use-audit-logs.md).
21+
1922
For the reference documentation for the IoT Central REST API, see [Azure IoT Central REST API reference](/rest/api/iotcentral/).
2023

2124
[!INCLUDE [iot-central-postman-collection](../../../includes/iot-central-postman-collection.md)]

articles/iot-central/core/howto-manage-users-roles.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Manage users and roles in Azure IoT Central application | Microsoft Docs
33
description: As an administrator, how to manage users and roles in your Azure IoT Central application
44
author: dominicbetts
55
ms.author: dobett
6-
ms.date: 06/22/2022
6+
ms.date: 08/01/2022
77
ms.topic: how-to
88
ms.service: iot-central
99
services: iot-central
@@ -226,6 +226,16 @@ When you define a custom role, you choose the set of permissions that a user is
226226
| Manage | None |
227227
| Full Control | Manage |
228228

229+
**Audit log permissions**
230+
231+
| Name | Dependencies |
232+
| ---- | -------- |
233+
| View | None |
234+
| Full Control | View |
235+
236+
> [!CAUTION]
237+
> Any user granted permission to view the audit log can see all log entries even if they don't have permission to view or modify the entities listed in the log. Therefore, any user who can view the log can view the identity of and changes made to any modified entity.
238+
229239
#### Managing users and roles
230240

231241
**Custom roles permissions**
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Use Azure IoT Central audit logs | Microsoft Docs
3+
description: Learn how to use audit logs in IoT Central to track changes made in an IoT Central application
4+
author: dominicbetts
5+
ms.author: dobett
6+
ms.date: 07/25/2022
7+
ms.topic: how-to
8+
ms.service: iot-central
9+
services: iot-central
10+
11+
# Administrator
12+
---
13+
14+
# Use audit logs to track activity in your IoT Central application
15+
16+
This article describes how to use audit logs to track who made what changes at what time in your IoT Central applications. You can:
17+
18+
- Sort the audit log.
19+
- Filter the audit log.
20+
- Customize the audit log.
21+
- Manage access to the audit log.
22+
23+
The audit log records information about who made a change, information about the modified entity, the action that made change, and when the change was made. The log tracks changes made through the UI, programatically with the REST API, and through the CLI.
24+
25+
The log records changes to the following IoT Central entities:
26+
27+
- [Users](howto-manage-users-roles.md#add-users)
28+
- [Roles](howto-manage-users-roles.md#manage-roles)
29+
- [API tokens](howto-authorize-rest-api.md#token-types)
30+
- [Application template export](howto-create-iot-central-application.md#create-and-use-a-custom-application-template)
31+
- [File upload configuration](howto-configure-file-uploads.md#configure-device-file-uploads)
32+
- [Application customization](howto-customize-ui.md)
33+
- [Device enrollment groups](concepts-device-authentication.md)
34+
- [Device templates](howto-set-up-template.md)
35+
- [Device lifecycle events](howto-export-to-blob-storage.md#device-lifecycle-changes-format)
36+
37+
The log records changes made by the following types of user:
38+
39+
- IoT Central user - the log shows the user's email.
40+
- API token - the log shows the token name.
41+
- Azure Active Directory user - the log shows the user email or ID.
42+
- Service principal - the log shows the service principal name.
43+
44+
The log stores data for 30 days, after which it's no longer available.
45+
46+
The following screenshot shows the audit log view with the location of the sorting and filtering controls highlighted:
47+
48+
:::image type="content" source="media/howto-use-audit-logs/audit-log.png" alt-text="Screenshot that shows the audit log. The location of the sort and filter controls is highlighted.":::
49+
50+
## Customize the log
51+
52+
Select **Column options** to customize the audit log view. You can add and remove columns, reorder the columns, and change the column widths:
53+
54+
:::image type="content" source="media/howto-use-audit-logs/audit-logs-column-options.png" alt-text="Screenshot that shows the audit log column options.":::
55+
56+
## Sort the log
57+
58+
You can sort the log into ascending or descending timestamp order. To sort, select **Timestamp**:
59+
60+
:::image type="content" source="media/howto-use-audit-logs/audit-logs-sorting.png" alt-text="Screenshot that shows how to sort the log into descending timestamp order.":::
61+
62+
## Filter the log
63+
64+
To focus on a specific time, filter the log by time range. Select **Edit time range** and specify the range you're interested in:
65+
66+
:::image type="content" source="media/howto-use-audit-logs/audit-logs-time.png" alt-text="Screenshot that shows how filter the log to show the last hour of entries.":::
67+
68+
To focus on specific entries, filter by entity type or action. Select **Filter** and use the multi-select drop-downs to specify your filter conditions:
69+
70+
:::image type="content" source="media/howto-use-audit-logs/audit-logs-filter.png" alt-text="Screenshot that shows how filter the log to show only updates to user entities.":::
71+
72+
## Manage access
73+
74+
The built-in **App Administrator** role has access to the audit logs by default. The administrator can grant access to other roles. An administrator can assign either **Full control** or **View** audit log permissions to other roles. To learn more, see [Manage users and roles in your IoT Central application](howto-manage-users-roles.md).
75+
76+
> [!IMPORTANT]
77+
> Any user granted permission to view the audit log can see all log entries even if they don't have permission to view or modify the entities listed in the log. Therefore, any user who can view the log can view the identity of and changes made to any modified entity.
78+
79+
## Next steps
80+
81+
Now that you've learned how to manage users and roles in your IoT Central application, the suggested next step is to learn how to [Manage IoT Central organizations](howto-create-organizations.md).
43.3 KB
Loading

0 commit comments

Comments
 (0)