-
Notifications
You must be signed in to change notification settings - Fork 515
o365: fix handling of file size values and numeric IDs #14289
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
Conversation
72e6ab8 to
755443b
Compare
🚀 Benchmarks reportTo see the full report comment with |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
I ran this update on a test instance, and it looks like it fails if the My test cases. The first is currently failing, and the rest are passing. Prior to this change, the first two would pass and the last three failed. POST /_ingest/pipeline/logs-o365.audit-TEST/_simulate
{"docs":[
{"_source": {"o365audit": {"FileSizeBytes": 1249604}}},
{"_source": {"o365audit": {"FileSizeBytes": "1249604"}}},
{"_source": {"o365audit": {"FileSizeBytes": 1249604.0}}},
{"_source": {"o365audit": {"FileSizeBytes": "1249604.0"}}},
{"_source": {"o365audit": {"FileSizeBytes": "1.249604E6"}}}
]} |
packages/o365/data_stream/audit/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
b8979dd to
f86de30
Compare
O365 audit data may inclued decimal points and sizes may be represented with e-notation. These break the convert processor. To work around this, in the case of strings, non-digit characters were removed to allow parsing, but this was incorrect since it would add, e.g. significant zeros. Fix this all by using painless to conditionally convert/parse the values of the size field and render them in long.
f86de30 to
8461b69
Compare
💚 Build Succeeded
History
cc @efd6 |
|
|
Package o365 - 2.18.4 containing this change is available at https://epr.elastic.co/package/o365/2.18.4/ |
O365 audit file size data may include decimal points and sizes may be represented with e-notation. These break the convert processor. To work around this, in the case of strings, non-digit characters were removed to allow parsing, but this was incorrect since it would add, e.g. significant zeros. Fix this all by using painless to conditionally convert/parse the values of the size field and render them in long. It appears that Microsoft will sometimes send IDs as numeric values so be more careful when assessing for email-like IDs. Incidentally, also take more care when checking for port delimiters in IP values.




Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots