-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLGN-398: remove last event returned in previous execution (#2008)
* PLGN-398: filter out any previously returned log events/update time format * PLGN-398: only update collection timestamp when new events returned.
- Loading branch information
1 parent
d469d61
commit 159ee23
Showing
17 changed files
with
357 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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,8 @@ | ||
{ | ||
"logs": [], | ||
"state": { | ||
"last_collection_timestamp": "2023-04-27T08:33:46.123Z" | ||
}, | ||
"has_more_pages": false, | ||
"status_code": 200 | ||
} |
81 changes: 81 additions & 0 deletions
81
plugins/okta/unit_test/expected/get_logs_filtered.json.exp
This file contains 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,81 @@ | ||
{ | ||
"logs": [ | ||
{ | ||
"actor": { | ||
"id": "12345", | ||
"type": "User", | ||
"alternateId": "user@example.com", | ||
"displayName": "User 2" | ||
}, | ||
"client": { | ||
"userAgent": { | ||
"rawUserAgent": "python-requests/2.26.0", | ||
"os": "Unknown", | ||
"browser": "UNKNOWN" | ||
}, | ||
"zone": "null", | ||
"device": "Unknown", | ||
"ipAddress": "198.51.100.1", | ||
"geographicalContext": {} | ||
}, | ||
"authenticationContext": { | ||
"externalSessionId": "12345" | ||
}, | ||
"displayMessage": "Clear user session", | ||
"eventType": "user.session.clear", | ||
"outcome": { | ||
"result": "SUCCESS" | ||
}, | ||
"published": "2023-04-27T09:49:21.777Z", | ||
"securityContext": { | ||
"asNumber": 12345, | ||
"asOrg": "test", | ||
"isp": "test", | ||
"domain": "example.com", | ||
"isProxy": false | ||
}, | ||
"severity": "INFO", | ||
"debugContext": { | ||
"debugData": { | ||
"requestId": "12345", | ||
"dtHash": "11111ecd0ecfb444ee1fcb9687ba8b174a3c8d251ce927e6016b871bc0222222", | ||
"requestUri": "/api/v1/users/12345/lifecycle/suspend", | ||
"url": "/api/v1/users/12345/lifecycle/suspend?" | ||
} | ||
}, | ||
"legacyEventType": "core.user_auth.session_clear", | ||
"transaction": { | ||
"type": "WEB", | ||
"id": "12345", | ||
"detail": { | ||
"requestApiTokenId": "12345" | ||
} | ||
}, | ||
"uuid": "9de5069c-5afe-602b-2ea0-a04b66beb2c0", | ||
"version": "0", | ||
"request": { | ||
"ipChain": [ | ||
{ | ||
"ip": "198.51.100.1", | ||
"geographicalContext": {}, | ||
"version": "V4" | ||
} | ||
] | ||
}, | ||
"target": [ | ||
{ | ||
"id": "12345", | ||
"type": "User", | ||
"alternateId": "user@example.com", | ||
"displayName": "User Test123" | ||
} | ||
] | ||
} | ||
], | ||
"state": { | ||
"last_collection_timestamp": "2023-04-27T09:49:21.777Z", | ||
"next_page_link": "https://example.com/nextLink?q=next" | ||
}, | ||
"has_more_pages": true, | ||
"status_code": 200 | ||
} |
This file contains 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,8 @@ | ||
{ | ||
"logs": [], | ||
"state": { | ||
"last_collection_timestamp": "2023-04-27T07:49:21.777Z" | ||
}, | ||
"has_more_pages": false, | ||
"status_code": 200 | ||
} |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"last_collection_timestamp": "2023-04-27T08:34:46", | ||
"last_collection_timestamp": "2023-04-27T07:49:21.777Z", | ||
"next_page_link": "https://example.com/nextLink?q=next" | ||
} |
This file contains 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"last_collection_timestamp": "2023-04-27T08:33:46" | ||
"last_collection_timestamp": "2023-04-27T08:33:46.123Z" | ||
} |
This file contains 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 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 @@ | ||
[] |
73 changes: 73 additions & 0 deletions
73
plugins/okta/unit_test/responses/get_logs_single_event.json.resp
This file contains 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,73 @@ | ||
[ | ||
{ | ||
"actor": { | ||
"id": "12345", | ||
"type": "User", | ||
"alternateId": "user@example.com", | ||
"displayName": "User 2" | ||
}, | ||
"client": { | ||
"userAgent": { | ||
"rawUserAgent": "python-requests/2.26.0", | ||
"os": "Unknown", | ||
"browser": "UNKNOWN" | ||
}, | ||
"zone": "null", | ||
"device": "Unknown", | ||
"ipAddress": "198.51.100.1", | ||
"geographicalContext": {} | ||
}, | ||
"authenticationContext": { | ||
"externalSessionId": "12345" | ||
}, | ||
"displayMessage": "Clear user session", | ||
"eventType": "user.session.clear", | ||
"outcome": { | ||
"result": "SUCCESS" | ||
}, | ||
"published": "2023-04-27T07:49:21.777Z", | ||
"securityContext": { | ||
"asNumber": 12345, | ||
"asOrg": "test", | ||
"isp": "test", | ||
"domain": "example.com", | ||
"isProxy": false | ||
}, | ||
"severity": "INFO", | ||
"debugContext": { | ||
"debugData": { | ||
"requestId": "12345", | ||
"dtHash": "11111ecd0ecfb444ee1fcb9687ba8b174a3c8d251ce927e6016b871bc0222222", | ||
"requestUri": "/api/v1/users/12345/lifecycle/suspend", | ||
"url": "/api/v1/users/12345/lifecycle/suspend?" | ||
} | ||
}, | ||
"legacyEventType": "core.user_auth.session_clear", | ||
"transaction": { | ||
"type": "WEB", | ||
"id": "12345", | ||
"detail": { | ||
"requestApiTokenId": "12345" | ||
} | ||
}, | ||
"uuid": "9de5069c-5afe-602b-2ea0-a04b66beb2c0", | ||
"version": "0", | ||
"request": { | ||
"ipChain": [ | ||
{ | ||
"ip": "198.51.100.1", | ||
"geographicalContext": {}, | ||
"version": "V4" | ||
} | ||
] | ||
}, | ||
"target": [ | ||
{ | ||
"id": "12345", | ||
"type": "User", | ||
"alternateId": "user@example.com", | ||
"displayName": "User Test123" | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.