-
Notifications
You must be signed in to change notification settings - Fork 228
DOCS-493 - Migrate Audit Logging from V1 to V2 docs #4643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0615a55
Migrate Audit Logging from V1 to V2 docs
JV0812 9196078
examples and query added
JV0812 e7dfe46
minor fix
JV0812 c6b2b1e
spellcheck
JV0812 a0848b7
Updates from review
jpipkin1 1e74f26
Merge branch 'main' into rbac-v1-to-v2-audit-logging-migration-doc
jpipkin1 ef99b75
Move beta article into role api v2 article
jpipkin1 abbf36e
Merge branch 'main' into rbac-v1-to-v2-audit-logging-migration-doc
jpipkin1 f70b82a
Final tweaks
jpipkin1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| id: migrate-audit-logging | ||
| title: Migrating Audit Logs from Role V1 to V2 | ||
| description: Learn to migrate from V1 to V2 audit logging by changing the search queries. | ||
| --- | ||
|
|
||
| <p><a href="/docs/beta"><span className="beta">Beta</span></a></p> | ||
|
|
||
| import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
|
|
||
| With [RBAC for Indexes](/docs/manage/users-roles/roles/rbac-for-indexes/), role audit log lines will be changed and you are recommended to migrate the search from V1 to V2 audit logging. 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 RBAC for indexes. | ||
jpipkin1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Currently, [Roles Management APIs v2](/docs/api/role-management-v2) records both the V1 and V2 log line changes. | ||
|
|
||
| :::note | ||
| V2 changes are **only** applicable for `RoleUpdate` and `RoleCreated` events. | ||
| ::: | ||
|
|
||
| <br/><img src={useBaseUrl('img/users-roles/JSON-diff-V1-V2.png')} alt="JSON-diff-V1-V2" style={{border: '1px solid gray'}} width="800"/> | ||
|
|
||
| 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. | ||
|
|
||
| ```sql title="V1 Audit Logging" | ||
| (_index=sumologic_audit_events) | ||
| | json fields=_raw "roleIdentity.roleName" as role_name | ||
| | json fields=_raw "eventTime" as eventTime | ||
| | json fields=_raw "role.filterPredicate" as create_role | ||
| | json fields=_raw "to.filterPredicate" as update_role | ||
| | json fields=_raw "operator.email" as actor | ||
| | json fields=_raw "eventName" | where eventName matches "RoleCreated" OR eventName="RoleUpdate" | ||
| | count by eventTime, eventName, actor, role_name, create_role, update_role | ||
| ``` | ||
|
|
||
| ```sql title="V2 Audit Logging" | ||
| (_index=sumologic_audit_events) | ||
| | json fields=_raw "roleIdentity.roleName" as role_name | ||
| | json fields=_raw "eventTime" as eventTime | ||
| | json fields=_raw "role.logAnalyticsFilter" as created_log_analytics_filter | ||
| | json fields=_raw "role.auditDataFilter" as created_audit_data_filter | ||
| | json fields=_raw "to.logAnalyticsFilter" as updated_log_analytics_filter | ||
| | json fields=_raw "to.auditDataFilter" as updated_audit_data_filter | ||
| | json fields=_raw "operator.email" as actor | ||
| | json fields=_raw "eventName" | where eventName matches "RoleCreatedV2" OR eventName="RoleUpdateV2" | ||
| | count by eventTime, eventName, actor, role_name, created_log_analytics_filter, created_audit_data_filter, updated_log_analytics_filter, updated_log_analytics_filter | ||
| ``` | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.