-
Notifications
You must be signed in to change notification settings - Fork 615
[Azure] Fix degraded auditlogs: raise keyword limits, fix missing field mappings, add pipeline tests #20132
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
[Azure] Fix degraded auditlogs: raise keyword limits, fix missing field mappings, add pipeline tests #20132
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8702aeb
azure: raise ignore_above to 8191 on auditlogs fields to reduce degra…
shmsr e89e6bd
azure: update changelog link to PR #20131
shmsr 2af8863
azure: update changelog link to PR #20132
shmsr 1579d78
Merge branch 'main' into fix/azure-auditlogs-degraded-docs
shmsr 519ec2e
azure: normalize resultDescription to result_description in auditlogs…
shmsr 2c2a741
azure: update changelog and remove inaccurate comments from auditlogs…
shmsr 094ffc1
Merge branch 'main' into fix/azure-auditlogs-degraded-docs
shmsr d65fdcf
azure/auditlogs: add pipeline test fixture for resultDescription rename
shmsr 14579d3
Merge branch 'main' into fix/azure-auditlogs-degraded-docs
shmsr fcf9499
azure/auditlogs: add missing properties.result_description field and …
shmsr f0b0c9a
azure/auditlogs: complete changelog and fix Vale latinism
shmsr b8d2cbf
Apply suggestion from @shmsr
shmsr ac626a0
Merge branch 'main' into fix/azure-auditlogs-degraded-docs
shmsr 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
2 changes: 2 additions & 0 deletions
2
...ages/azure/data_stream/auditlogs/_dev/test/pipeline/test-auditlogs-result-description.log
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,2 @@ | ||
| { "time": "2022-01-22T18:15:02.3875429Z", "resourceId": "/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam", "operationName": "Update service principal", "operationVersion": "1.0", "category": "AuditLogs", "tenantId": "4bbb79f7-5724-4c9e-95f3-de075f6ec090", "resultSignature": "None", "resultDescription": "User policy updated by administrator", "durationMs": 0, "callerIpAddress": "::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6", "correlationId": "87979703-118b-498f-99c2-ccd1a56f1a5a", "identity": "Managed Service Identity", "Level": 4, "properties": {"id":"Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938566","category":"ApplicationManagement","correlationId":"87979703-118b-498f-99c2-ccd1a56f1a5a","result":"success","resultReason":"","activityDisplayName":"Update service principal","activityDateTime":"2022-01-22T18:15:02.3875429+00:00","loggedByService":"Core Directory","operationType":"Update","userAgent":null,"initiatedBy":{"app":{"appId":null,"displayName":"Managed Service Identity","servicePrincipalId":"b9814691-9ca1-4e55-a1ac-8ef5dd010ec0","servicePrincipalName":null}},"targetResources":[{"id":"a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42","displayName":"billing-test-wus","type":"ServicePrincipal","modifiedProperties":[{"displayName":"TargetId.ServicePrincipalNames","oldValue":null,"newValue":"\"a70a7931-c387-4dce-9f35-fbf95bdcc91e;https://identity.azure.net/N8CUySpCeRFU3iB/PEuFlON4zd8+n8d3qgzrF1MviSY=\""}],"administrativeUnits":[]}],"additionalDetails":[{"key":"User-Agent","value":"Microsoft Azure Graph Client Library 2.1.17-internal"},{"key":"AppId","value":"a70a7931-c387-4dce-9f35-fbf95bdcc91e"}]}} | ||
| { "time": "2022-01-22T18:15:02.3875429Z", "resourceId": "/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam", "operationName": "Update policy", "operationVersion": "1.0", "category": "AuditLogs", "tenantId": "4bbb79f7-5724-4c9e-95f3-de075f6ec090", "resultSignature": "None", "durationMs": 0, "callerIpAddress": "::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6", "correlationId": "87979703-118b-498f-99c2-ccd1a56f1a5a", "identity": "Managed Service Identity", "Level": 4, "properties": {"id":"Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938567","category":"Policy","correlationId":"87979703-118b-498f-99c2-ccd1a56f1a5a","result":"success","resultReason":"","resultDescription":"Conditional access policy was updated.","activityDisplayName":"Update policy","activityDateTime":"2022-01-22T18:15:02.3875429+00:00","loggedByService":"Core Directory","operationType":"Update","userAgent":null,"initiatedBy":{"app":{"appId":null,"displayName":"Managed Service Identity","servicePrincipalId":"b9814691-9ca1-4e55-a1ac-8ef5dd010ec0","servicePrincipalName":null}},"targetResources":[{"id":"a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42","displayName":"TestPolicy","type":"Policy","modifiedProperties":[{"displayName":"PolicyName","oldValue":"\"OldPolicyName\"","newValue":"\"NewPolicyName\""}],"administrativeUnits":[]}],"additionalDetails":[]}} |
164 changes: 164 additions & 0 deletions
164
...a_stream/auditlogs/_dev/test/pipeline/test-auditlogs-result-description.log-expected.json
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,164 @@ | ||
| { | ||
| "expected": [ | ||
| { | ||
| "@timestamp": "2022-01-22T18:15:02.387Z", | ||
| "azure": { | ||
| "auditlogs": { | ||
| "category": "AuditLogs", | ||
| "identity": "Managed Service Identity", | ||
| "level": 4, | ||
| "operation_name": "Update service principal", | ||
| "operation_version": "1.0", | ||
| "properties": { | ||
| "activity_datetime": "2022-01-22T18:15:02.3875429+00:00", | ||
| "activity_display_name": "Update service principal", | ||
| "additional_details": [ | ||
| { | ||
| "key": "User-Agent", | ||
| "value": "Microsoft Azure Graph Client Library 2.1.17-internal" | ||
| }, | ||
| { | ||
| "key": "AppId", | ||
| "value": "a70a7931-c387-4dce-9f35-fbf95bdcc91e" | ||
| } | ||
| ], | ||
| "category": "ApplicationManagement", | ||
| "correlation_id": "87979703-118b-498f-99c2-ccd1a56f1a5a", | ||
| "id": "Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938566", | ||
| "initiated_by": { | ||
| "app": { | ||
| "displayName": "Managed Service Identity", | ||
| "servicePrincipalId": "b9814691-9ca1-4e55-a1ac-8ef5dd010ec0" | ||
| } | ||
| }, | ||
| "logged_by_service": "Core Directory", | ||
| "operation_type": "Update", | ||
| "result_reason": "", | ||
| "target_resources": { | ||
| "0": { | ||
| "display_name": "billing-test-wus", | ||
| "id": "a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42", | ||
| "modified_properties": { | ||
| "0": { | ||
| "display_name": "TargetId.ServicePrincipalNames", | ||
| "new_value": "\"a70a7931-c387-4dce-9f35-fbf95bdcc91e;https://identity.azure.net/N8CUySpCeRFU3iB/PEuFlON4zd8+n8d3qgzrF1MviSY=\"" | ||
| } | ||
| }, | ||
| "type": "ServicePrincipal" | ||
| } | ||
| } | ||
| }, | ||
| "result_description": "User policy updated by administrator", | ||
| "result_signature": "None" | ||
| }, | ||
| "correlation_id": "87979703-118b-498f-99c2-ccd1a56f1a5a", | ||
| "resource": { | ||
| "id": "/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam", | ||
| "provider": "Microsoft.aadiam" | ||
| }, | ||
| "tenant_id": "4bbb79f7-5724-4c9e-95f3-de075f6ec090" | ||
| }, | ||
| "cloud": { | ||
| "provider": "azure" | ||
| }, | ||
| "ecs": { | ||
| "version": "8.11.0" | ||
| }, | ||
| "event": { | ||
| "action": "Update service principal", | ||
| "duration": 0, | ||
| "kind": "event", | ||
| "original": "{ \"time\": \"2022-01-22T18:15:02.3875429Z\", \"resourceId\": \"/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam\", \"operationName\": \"Update service principal\", \"operationVersion\": \"1.0\", \"category\": \"AuditLogs\", \"tenantId\": \"4bbb79f7-5724-4c9e-95f3-de075f6ec090\", \"resultSignature\": \"None\", \"resultDescription\": \"User policy updated by administrator\", \"durationMs\": 0, \"callerIpAddress\": \"::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6\", \"correlationId\": \"87979703-118b-498f-99c2-ccd1a56f1a5a\", \"identity\": \"Managed Service Identity\", \"Level\": 4, \"properties\": {\"id\":\"Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938566\",\"category\":\"ApplicationManagement\",\"correlationId\":\"87979703-118b-498f-99c2-ccd1a56f1a5a\",\"result\":\"success\",\"resultReason\":\"\",\"activityDisplayName\":\"Update service principal\",\"activityDateTime\":\"2022-01-22T18:15:02.3875429+00:00\",\"loggedByService\":\"Core Directory\",\"operationType\":\"Update\",\"userAgent\":null,\"initiatedBy\":{\"app\":{\"appId\":null,\"displayName\":\"Managed Service Identity\",\"servicePrincipalId\":\"b9814691-9ca1-4e55-a1ac-8ef5dd010ec0\",\"servicePrincipalName\":null}},\"targetResources\":[{\"id\":\"a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42\",\"displayName\":\"billing-test-wus\",\"type\":\"ServicePrincipal\",\"modifiedProperties\":[{\"displayName\":\"TargetId.ServicePrincipalNames\",\"oldValue\":null,\"newValue\":\"\\\"a70a7931-c387-4dce-9f35-fbf95bdcc91e;https://identity.azure.net/N8CUySpCeRFU3iB/PEuFlON4zd8+n8d3qgzrF1MviSY=\\\"\"}],\"administrativeUnits\":[]}],\"additionalDetails\":[{\"key\":\"User-Agent\",\"value\":\"Microsoft Azure Graph Client Library 2.1.17-internal\"},{\"key\":\"AppId\",\"value\":\"a70a7931-c387-4dce-9f35-fbf95bdcc91e\"}]}}", | ||
| "outcome": "success" | ||
| }, | ||
| "related": { | ||
| "entity": [ | ||
| "b9814691-9ca1-4e55-a1ac-8ef5dd010ec0", | ||
| "a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42" | ||
| ] | ||
| }, | ||
| "source": { | ||
| "address": "::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6" | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event" | ||
| ] | ||
| }, | ||
| { | ||
| "@timestamp": "2022-01-22T18:15:02.387Z", | ||
| "azure": { | ||
| "auditlogs": { | ||
| "category": "AuditLogs", | ||
| "identity": "Managed Service Identity", | ||
| "level": 4, | ||
| "operation_name": "Update policy", | ||
| "operation_version": "1.0", | ||
| "properties": { | ||
| "activity_datetime": "2022-01-22T18:15:02.3875429+00:00", | ||
| "activity_display_name": "Update policy", | ||
| "additional_details": [], | ||
| "category": "Policy", | ||
| "correlation_id": "87979703-118b-498f-99c2-ccd1a56f1a5a", | ||
| "id": "Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938567", | ||
| "initiated_by": { | ||
| "app": { | ||
| "displayName": "Managed Service Identity", | ||
| "servicePrincipalId": "b9814691-9ca1-4e55-a1ac-8ef5dd010ec0" | ||
| } | ||
| }, | ||
| "logged_by_service": "Core Directory", | ||
| "operation_type": "Update", | ||
| "result_description": "Conditional access policy was updated.", | ||
| "result_reason": "", | ||
| "target_resources": { | ||
| "0": { | ||
| "display_name": "TestPolicy", | ||
| "id": "a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42", | ||
| "modified_properties": { | ||
| "0": { | ||
| "display_name": "PolicyName", | ||
| "new_value": "\"NewPolicyName\"", | ||
| "old_value": "\"OldPolicyName\"" | ||
| } | ||
| }, | ||
| "type": "Policy" | ||
| } | ||
| } | ||
| }, | ||
| "result_signature": "None" | ||
| }, | ||
| "correlation_id": "87979703-118b-498f-99c2-ccd1a56f1a5a", | ||
| "resource": { | ||
| "id": "/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam", | ||
| "provider": "Microsoft.aadiam" | ||
| }, | ||
| "tenant_id": "4bbb79f7-5724-4c9e-95f3-de075f6ec090" | ||
| }, | ||
| "cloud": { | ||
| "provider": "azure" | ||
| }, | ||
| "ecs": { | ||
| "version": "8.11.0" | ||
| }, | ||
| "event": { | ||
| "action": "Update policy", | ||
| "duration": 0, | ||
| "kind": "event", | ||
| "original": "{ \"time\": \"2022-01-22T18:15:02.3875429Z\", \"resourceId\": \"/tenants/4bbb79f7-5724-4c9e-95f3-de075f6ec090/providers/Microsoft.aadiam\", \"operationName\": \"Update policy\", \"operationVersion\": \"1.0\", \"category\": \"AuditLogs\", \"tenantId\": \"4bbb79f7-5724-4c9e-95f3-de075f6ec090\", \"resultSignature\": \"None\", \"durationMs\": 0, \"callerIpAddress\": \"::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6\", \"correlationId\": \"87979703-118b-498f-99c2-ccd1a56f1a5a\", \"identity\": \"Managed Service Identity\", \"Level\": 4, \"properties\": {\"id\":\"Directory_87979703-118b-498f-99c2-ccd1a56f1a5a_ULAYA_144938567\",\"category\":\"Policy\",\"correlationId\":\"87979703-118b-498f-99c2-ccd1a56f1a5a\",\"result\":\"success\",\"resultReason\":\"\",\"resultDescription\":\"Conditional access policy was updated.\",\"activityDisplayName\":\"Update policy\",\"activityDateTime\":\"2022-01-22T18:15:02.3875429+00:00\",\"loggedByService\":\"Core Directory\",\"operationType\":\"Update\",\"userAgent\":null,\"initiatedBy\":{\"app\":{\"appId\":null,\"displayName\":\"Managed Service Identity\",\"servicePrincipalId\":\"b9814691-9ca1-4e55-a1ac-8ef5dd010ec0\",\"servicePrincipalName\":null}},\"targetResources\":[{\"id\":\"a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42\",\"displayName\":\"TestPolicy\",\"type\":\"Policy\",\"modifiedProperties\":[{\"displayName\":\"PolicyName\",\"oldValue\":\"\\\"OldPolicyName\\\"\",\"newValue\":\"\\\"NewPolicyName\\\"\"}],\"administrativeUnits\":[]}],\"additionalDetails\":[]}}", | ||
| "outcome": "success" | ||
| }, | ||
| "related": { | ||
| "entity": [ | ||
| "b9814691-9ca1-4e55-a1ac-8ef5dd010ec0", | ||
| "a7d5dcbe-0627-4ddf-a2f4-86b6785bcc42" | ||
| ] | ||
| }, | ||
| "source": { | ||
| "address": "::2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6" | ||
| }, | ||
| "tags": [ | ||
| "preserve_original_event" | ||
| ] | ||
| } | ||
| ] | ||
| } |
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
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
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
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
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.