-
Notifications
You must be signed in to change notification settings - Fork 474
[integration][windows] - Fixed parsing of winlog.event_data.MemberName in forwarded data stream when extra commas are present #8408
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
…m when extra commas are present
packages/windows/data_stream/forwarded/elasticsearch/ingest_pipeline/security.yml
Outdated
Show resolved
Hide resolved
packages/windows/data_stream/forwarded/elasticsearch/ingest_pipeline/security.yml
Outdated
Show resolved
Hide resolved
🌐 Coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the original issue shows that the comma is preceded by a backslash, it seems to me that this could be done with a split processor; something like {"split": {"if": "ctx.winlog?.event_data?.MemberName != null", "field": "winlog.event_data.MemberName", "target_field": "_temp.MemberNameParts", "separator":"(?<!\\\\),"}
with _temp.MemberNameParts
being used as the direct source of the script's memberNameParts
var.
@efd6 true, but we don't know if that's always the case or not, hence more of a generic approach was taken. |
I have asked at the original issue. If it is guaranteed, the simpler approach would be preferable. Note that you can use the key part of the list in a zw-look ahead. It's more costly than the lookbehind since that is only a single code point behind, but I still think preferable in terms of maintenance. |
Reference info for the distinguished name format:
Event IDs containing |
The key is in the table here. |
@efd6, @leehinman I've updated the PR with the split processor logic as suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
packages/windows/data_stream/forwarded/elasticsearch/ingest_pipeline/security.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…peline/security.yml Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼
Package windows - 1.42.1 containing this change is available at https://epr.elastic.co/search?package=windows |
Type of change
Please label this PR with one of the following labels, depending on the scope of your change:
Proposed commit message
ISSUE: The Windows integration did not parse winlog.event_data.MemberName properly and map it to user.target.name when user CN contained extra "," characters. For example
CN=Reyes\, Elena (FFF),OU=Basic,OU=Domain Users,DC=ddd,DC=ccc,DC=fff
will be parsed to user.target.nameReyes\,
which is wrong.FIX: Fixed parsing of winlog.event_data.MemberName in forwarded data stream by removing the old splitToken method and replaced it with a custom split processor logic that splits on the basis of commas but ignores escaped commas.
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots