Skip to content

Commit ef99b75

Browse files
committed
Move beta article into role api v2 article
1 parent 1e74f26 commit ef99b75

File tree

2 files changed

+44
-49
lines changed

2 files changed

+44
-49
lines changed

docs/api/role-management-v2.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: role-management-v2
3-
title: Role Management APIs v2 (Beta)
4-
sidebar_label: Roles
5-
description: Role Management APIs v2 (Beta) allow you to manage roles from HTTP endpoints.
3+
title: Role Management APIs V2 (Beta)
4+
sidebar_label: Roles V2
5+
description: Role Management APIs V2 (Beta) allow you to manage roles from HTTP endpoints.
66
---
77

88
import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -13,7 +13,7 @@ import ApiRoles from '../reuse/api-roles.md';
1313

1414
<p> <a href="/docs/beta"><span className="beta">Beta</span></a> </p>
1515

16-
Roles determine the functions that users are able to perform in Sumo Logic. The Role Management API (v2) allows you to configure access on partitions and manage roles from HTTP endpoints.
16+
Roles determine the functions that users are able to perform in Sumo Logic. The Role Management API (V2) allows you to configure access on partitions and manage roles from HTTP endpoints.
1717

1818
To manage roles, you must have an administrator role or your role must have been assigned the [Manage Users and Roles](/docs/manage/users-roles/) capability.
1919

@@ -34,6 +34,46 @@ To manage roles, you must have an administrator role or your role must have been
3434
| US1 | https://api.sumologic.com/docs/#tag/roleManagementV2 |
3535
| US2 | https://api.us2.sumologic.com/docs/#tag/roleManagementV2 |
3636

37+
## Migrate audit logs queries from Role Management API V1 to V2
38+
39+
If you use role-based [audit data filtering](/docs/manage/users-roles/roles/create-manage-roles/#create-a-role), we recommend you migrate the search from V1 to V2 audit logging.
40+
41+
With advanced search filters added, you can obtain more granular information about the selected role. The `filterPredicate` field in V1 audit logging is replaced with `logAnalyticsFilter`, `auditDataFilter`, and `securityDataFilter` fields in V2. In addition, we have also added `selectionType` and `selectedViews` fields to apply for audit data filtering.
42+
43+
Currently, [Roles Management APIs V2](/docs/api/role-management-v2) records both the V1 and V2 log line changes.
44+
45+
:::note
46+
V2 changes are **only** applicable for `RoleUpdate` and `RoleCreated` events.
47+
:::
48+
49+
<br/><img src={useBaseUrl('img/users-roles/JSON-diff-V1-V2.png')} alt="JSON-diff-V1-V2" style={{border: '1px solid gray'}} width="800"/>
50+
51+
For example, consider you are interested in querying upon audit logs with change in `RoleUpdated` or `RoleCreated` events. Now, if you perform this search you will initially see the V1 type of event in the search results. However, to view the results with the V2 event type, you are required to adjust the parameters in the query.
52+
53+
```sql title="V1 Audit Logging"
54+
(_index=sumologic_audit_events)
55+
| json fields=_raw "roleIdentity.roleName" as role_name
56+
| json fields=_raw "eventTime" as eventTime
57+
| json fields=_raw "role.filterPredicate" as create_role
58+
| json fields=_raw "to.filterPredicate" as update_role
59+
| json fields=_raw "operator.email" as actor
60+
| json fields=_raw "eventName" | where eventName matches "RoleCreated" OR eventName="RoleUpdate"
61+
| count by eventTime, eventName, actor, role_name, create_role, update_role
62+
```
63+
64+
```sql title="V2 Audit Logging"
65+
(_index=sumologic_audit_events)
66+
| json fields=_raw "roleIdentity.roleName" as role_name
67+
| json fields=_raw "eventTime" as eventTime
68+
| json fields=_raw "role.logAnalyticsFilter" as created_log_analytics_filter
69+
| json fields=_raw "role.auditDataFilter" as created_audit_data_filter
70+
| json fields=_raw "to.logAnalyticsFilter" as updated_log_analytics_filter
71+
| json fields=_raw "to.auditDataFilter" as updated_audit_data_filter
72+
| json fields=_raw "operator.email" as actor
73+
| json fields=_raw "eventName" | where eventName matches "RoleCreatedV2" OR eventName="RoleUpdateV2"
74+
| count by eventTime, eventName, actor, role_name, created_log_analytics_filter, created_audit_data_filter, updated_log_analytics_filter, updated_log_analytics_filter
75+
```
76+
3777
<!-- ## Required role capabilities
3878
3979
<ApiRoles/>

docs/manage/users-roles/roles/migrate-audit-logging.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)