macOS Unified Access Logging (UAL)#7598
Conversation
…e position of the enumerator
…_log' into unifiedlogs_api
…osquery#7591) * Limits the number of rows the unified log table returns * Adds a flag to configure that limit * Implements a sequential extraction
|
|
…ng to unified log Adds hidden column for max row number, deletes flag Modifies the trigger for sequential access
|
The last changes implement what we discussed at the osquery office hours 2022-05-24. Getting data sequentially is now triggered by the command Instead of a flag, a HIDDEN column is used for max_rows. The default value is 100, the way to modify it is by adding the clause User shall combine both clauses, i.e. |
|
Finishes the work done in #7259 |
|
@directionless is going to re-review but it's moving to the 5.5 milestone |
directionless
left a comment
There was a problem hiding this comment.
Code looks mostly fine to me. @alessandrogario @Smjert either you look?
One question -- I think this has a single tracking state for the last seen state. So if you had two queries each using this table and the -1 it wouldn't work. Correct?
specs/darwin/unified_log.table
Outdated
| table_name("unified_log") | ||
| description("Queries the OSLog framework for entries in the system log. " | ||
| "The maximum number of rows returned is limited for performance issues. " | ||
| "The condition \"max_rows = N\" sets the maximum number of rows returned (100 by default). " |
There was a problem hiding this comment.
| "The condition \"max_rows = N\" sets the maximum number of rows returned (100 by default). " |
|
I tried And I realized an awkward spot... If the SQL has |
|
Ha. Correcting myself, And |
As you said before, SQLite allows only the data with |
|
I think this is probably mergable? At least, I don't think I have other comments. @Smjert, @alessandrogario Either of you have comments? @dabresua I don't know if it makes sense, you could consider tossing in the github |
directionless
left a comment
There was a problem hiding this comment.
Sounds like we all think this is approvable. wooo!
Thank you so much for sticking with it @dabresua it's a huge PR and improvement
This PR completes the work done by @puffyCid in #7259 which also continued the work made by @GarretReece and @mike-myers-tob.
The funcionality enables osquery to read from UAL using its API.
My contribution is explained in the blueprint #7591 which, in summary:
select * from unified_logreturns the rows continuing from the last one, so user can extract all the logs by querying multiple times.Adds unitary tests for the flag and for the sequential extraction.
Closes:
Co-authored-by: puffycyan@gmail.com
Co-authored-by: GarretReece@users.noreply.github.com